core.git: Branch 'libreoffice-24-8' - formula/uiconfig
formula/uiconfig/ui/structpage.ui |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1b88db8c1c0a92229a1998d4dcc4d5c488163f5a Author: Bayram Çiçek AuthorDate: Tue May 28 18:35:57 2024 +0300 Commit: Adolfo Jayme Barrientos CommitDate: Wed Jun 12 01:10:49 2024 +0200 tdf#161502: change Structure label of Function Wizard dialog - label "Structure:" changed to "Content:" - this change also removes the duplicated "Structure" text from the dialog which makes the UX better Signed-off-by: Bayram Çiçek Change-Id: I6d70e019b80d4ef0d7207b62e1d0aa6d1f0a3b73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168161 Tested-by: Pedro Silva Tested-by: Jenkins CollaboraOffice Reviewed-by: Pedro Silva (cherry picked from commit dc3e624b52e43bb197417b5d9339890afe7c5379) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168612 Reviewed-by: Adolfo Jayme Barrientos Tested-by: Jenkins (cherry picked from commit 9bbb02bcd7cf26b3e69e12481ffd041019d76082) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168626 diff --git a/formula/uiconfig/ui/structpage.ui b/formula/uiconfig/ui/structpage.ui index e4548ca33d4f..6faff9151657 100644 --- a/formula/uiconfig/ui/structpage.ui +++ b/formula/uiconfig/ui/structpage.ui @@ -25,7 +25,7 @@ True False start -_Structure: +Content: True struct
core.git: formula/uiconfig
formula/uiconfig/ui/structpage.ui |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 9bbb02bcd7cf26b3e69e12481ffd041019d76082 Author: Bayram Çiçek AuthorDate: Tue May 28 18:35:57 2024 +0300 Commit: Adolfo Jayme Barrientos CommitDate: Tue Jun 11 19:52:30 2024 +0200 tdf#161502: change Structure label of Function Wizard dialog - label "Structure:" changed to "Content:" - this change also removes the duplicated "Structure" text from the dialog which makes the UX better Signed-off-by: Bayram Çiçek Change-Id: I6d70e019b80d4ef0d7207b62e1d0aa6d1f0a3b73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168161 Tested-by: Pedro Silva Tested-by: Jenkins CollaboraOffice Reviewed-by: Pedro Silva (cherry picked from commit dc3e624b52e43bb197417b5d9339890afe7c5379) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168612 Reviewed-by: Adolfo Jayme Barrientos Tested-by: Jenkins diff --git a/formula/uiconfig/ui/structpage.ui b/formula/uiconfig/ui/structpage.ui index e4548ca33d4f..6faff9151657 100644 --- a/formula/uiconfig/ui/structpage.ui +++ b/formula/uiconfig/ui/structpage.ui @@ -25,7 +25,7 @@ True False start -_Structure: +Content: True struct
core.git: cui/source
cui/source/options/treeopt.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit 734914261347d51dfd4f1140b037c52c86060277 Author: Bayram Çiçek AuthorDate: Tue Jun 4 15:21:41 2024 +0300 Commit: Heiko Tietze CommitDate: Thu Jun 6 10:00:49 2024 +0200 tdf#159375: turn cursor into a wait cursor while search - Tools>Options: change cursor type to "wait cursor" while search is running - m_xSearchEdit->set_busy_cursor(true) adds a spinner next to/(or in place of) the mouse cursor. Signed-off-by: Bayram Çiçek Change-Id: I944db49b14a652b4a52f0d38696f60385ee9f85b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168402 Reviewed-by: Heiko Tietze Tested-by: Jenkins diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index f010df6f42a1..27d3d8f243e8 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -793,7 +793,8 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, SearchUpdateHdl, weld::Entry&, void) IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, Timer*, void) { // initializeAllDialogs() can take a long time, show wait cursor and disable input -std::unique_ptr xWait(m_pParent ? new weld::WaitObject(m_pParent) : nullptr); +m_xSearchEdit->set_editable(false); +m_xSearchEdit->set_busy_cursor(true); // Pause redraw xTreeLB->freeze(); @@ -820,6 +821,9 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, Timer*, void) // select first child of first node after the search done if (nMatchFound != -1) selectFirstEntry(); + +m_xSearchEdit->set_editable(true); +m_xSearchEdit->set_busy_cursor(false); } void OfaTreeOptionsDialog::selectFirstEntry()
core.git: Branch 'distro/collabora/co-24.04' - formula/uiconfig
formula/uiconfig/ui/structpage.ui |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit dc3e624b52e43bb197417b5d9339890afe7c5379 Author: Bayram Çiçek AuthorDate: Tue May 28 18:35:57 2024 +0300 Commit: Pedro Silva CommitDate: Wed May 29 17:37:41 2024 +0200 change Structure label of Function Wizard dialog - label "_Structure:" changed to "Functions in use and their validity:" for better description of Structure tab - this change also removes the second "Structure" text from the dialog which makes the UX better Signed-off-by: Bayram Çiçek Change-Id: I6d70e019b80d4ef0d7207b62e1d0aa6d1f0a3b73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168161 Tested-by: Pedro Silva Tested-by: Jenkins CollaboraOffice Reviewed-by: Pedro Silva diff --git a/formula/uiconfig/ui/structpage.ui b/formula/uiconfig/ui/structpage.ui index e4548ca33d4f..904ea2fa7a4e 100644 --- a/formula/uiconfig/ui/structpage.ui +++ b/formula/uiconfig/ui/structpage.ui @@ -25,7 +25,7 @@ True False start -_Structure: +Functions in use and their validity: True struct
core.git: Branch 'distro/collabora/co-24.04' - sc/source
sc/source/ui/view/gridwin.cxx | 29 + 1 file changed, 29 insertions(+) New commits: commit a3f4d31783721f61b8436c5f8032321b4c97de1a Author: Bayram Çiçek AuthorDate: Mon May 27 12:14:56 2024 +0300 Commit: Szymon Kłos CommitDate: Tue May 28 14:11:23 2024 +0200 add AutoFill menu items - LOK_CALLBACK_CONTEXT_MENU - added AutoFill menu items "Copy cells" and "Fill series" - send information with LOK_CALLBACK_CONTEXT_MENU Signed-off-by: Bayram Çiçek Change-Id: I3118f5535f74cfa4ab049e643930df83512b6850 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168086 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 1a36f83d88a8..b5cd268e4cc4 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -2366,7 +2366,36 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt ) } } else +{ mrViewData.GetDispatcher().Execute( FID_FILL_AUTO, SfxCallMode::SLOT | SfxCallMode::RECORD ); + +// prepare AutoFill menu items for "Copy Cells" and "Fill Series" +ScTabViewShell* pViewShell = mrViewData.GetViewShell(); +boost::property_tree::ptree aMenu; +boost::property_tree::ptree aItemTree; + +aItemTree.put("text", "~Copy Cells"); +aItemTree.put("type", "command"); +aItemTree.put("command", ".uno:AutoFill?Copy:bool=true"); +aItemTree.put("enabled", "true"); +aMenu.push_back(std::make_pair("", aItemTree)); + +aItemTree.put("text", "~Fill Series"); +aItemTree.put("type", "command"); +aItemTree.put("command", ".uno:AutoFill?Copy:bool=false"); +aItemTree.put("enabled", "true"); +aMenu.push_back(std::make_pair("", aItemTree)); +aItemTree.clear(); + +boost::property_tree::ptree aRoot; +aRoot.add_child("menu", aMenu); + +std::stringstream aStream; +boost::property_tree::write_json(aStream, aRoot, true); + +pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CONTEXT_MENU, + OString(aStream.str())); +} } else if (mrViewData.GetFillMode() == ScFillMode::MATRIX) {
core.git: sc/sdi sc/source
sc/sdi/scalc.sdi |2 +- sc/source/ui/view/cellsh1.cxx | 35 +++ 2 files changed, 32 insertions(+), 5 deletions(-) New commits: commit 35c93c5f8e40dff4819849b240044cd9d99221a0 Author: Bayram Çiçek AuthorDate: Thu May 16 09:58:28 2024 +0300 Commit: Caolán McNamara CommitDate: Thu May 16 15:50:03 2024 +0200 make AutoFill work for Copy cells and Fill series FID_FILL_AUTO (.uno:AutoFill): - added new parameter: SfxBoolItem Copy FN_PARAM_1 - if the parameter is true, we use "Copy cells", otherwise use "Fill series" Signed-off-by: Bayram Çiçek Change-Id: I639828021dcbba52f6bc21366f23faf7e38bb03e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167726 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara (cherry picked from commit 95575b8bd026e3ae4aaddf3a023488d7a5fa0976) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167677 Tested-by: Jenkins diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi index 4240bb5ffc86..3591ca10f199 100644 --- a/sc/sdi/scalc.sdi +++ b/sc/sdi/scalc.sdi @@ -338,7 +338,7 @@ SfxBoolItem AutoComplete FID_AUTOCOMPLETE SfxVoidItem AutoFill FID_FILL_AUTO -(SfxStringItem EndCell FID_FILL_AUTO) +(SfxStringItem EndCell FID_FILL_AUTO,SfxBoolItem Copy FN_PARAM_1) [ AutoUpdate = FALSE, FastCall = FALSE, diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index ae55a3312d25..3c59c4dfed9f 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -876,6 +876,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SCROW nFillRow = GetViewData().GetRefEndY(); ScDocument& rDoc = GetViewData().GetDocument(); +sal_uInt16 nOrigScFillModeMouseModifier = nScFillModeMouseModifier; +bool bUseSelection = true; + if( pReqArgs != nullptr ) { if( const SfxStringItem* pItem = pReqArgs->GetItemIfSet( FID_FILL_AUTO ) ) @@ -888,13 +891,33 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) nFillRow = aScAddress.Row(); nFillCol = aScAddress.Col(); } + +SCTAB nStartTab, nEndTab; +GetViewData().GetSimpleArea(nStartCol, nStartRow, nStartTab, nEndCol, +nEndRow, nEndTab); +bUseSelection = false; } -SCTAB nStartTab, nEndTab; -GetViewData().GetSimpleArea( nStartCol,nStartRow,nStartTab, - nEndCol,nEndRow,nEndTab ); +const SfxPoolItem* pItem; +if (pReqArgs->HasItem(FN_PARAM_1, )) +{ +/* +nScFillModeMouseModifier controls if we "Copy cells" or "Fill series" +- if nScFillModeMouseModifier is set to "KEY_MOD1", use "Copy cells" +- otherwise use "Fill series" + +This is also the same with auto fill by dragging mouse +- dragging with Ctrl key will set nScFillModeMouseModifier to KEY_MOD1, use "Copy cells" +- only dragging will use "Fill series" (no Ctrl key) +*/ +const bool bCopyCells = static_cast(pItem)->GetValue(); +nScFillModeMouseModifier &= ~KEY_MOD1; // turn off, reset to 0 + +if (bCopyCells) +nScFillModeMouseModifier |= KEY_MOD1; // turn on +} } -else// call via mouse +if (bUseSelection) // call via mouse or if FN_PARAM_1 exists { // not in a merged cell @@ -968,6 +991,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) OSL_FAIL( "Direction not unique for autofill" ); } } + +// reset nScFillModeMouseModifier to its original state +// otherwise, auto fill by dragging will not work as expected +nScFillModeMouseModifier = nOrigScFillModeMouseModifier; } break; case FID_FILL_SINGLE_EDIT:
core.git: Branch 'distro/collabora/co-24.04' - sc/sdi sc/source
sc/sdi/scalc.sdi |2 +- sc/source/ui/view/cellsh1.cxx | 35 +++ 2 files changed, 32 insertions(+), 5 deletions(-) New commits: commit 564b16720ee59d0275aa3de34ad10b3a86bbeda6 Author: Bayram Çiçek AuthorDate: Thu May 16 09:58:28 2024 +0300 Commit: Caolán McNamara CommitDate: Thu May 16 15:49:47 2024 +0200 make AutoFill work for Copy cells and Fill series FID_FILL_AUTO (.uno:AutoFill): - added new parameter: SfxBoolItem Copy FN_PARAM_1 - if the parameter is true, we use "Copy cells", otherwise use "Fill series" Signed-off-by: Bayram Çiçek Change-Id: I639828021dcbba52f6bc21366f23faf7e38bb03e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167726 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara (cherry picked from commit 95575b8bd026e3ae4aaddf3a023488d7a5fa0976) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167676 diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi index 4240bb5ffc86..3591ca10f199 100644 --- a/sc/sdi/scalc.sdi +++ b/sc/sdi/scalc.sdi @@ -338,7 +338,7 @@ SfxBoolItem AutoComplete FID_AUTOCOMPLETE SfxVoidItem AutoFill FID_FILL_AUTO -(SfxStringItem EndCell FID_FILL_AUTO) +(SfxStringItem EndCell FID_FILL_AUTO,SfxBoolItem Copy FN_PARAM_1) [ AutoUpdate = FALSE, FastCall = FALSE, diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 4907b6b50c05..dfdcb2281251 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -873,6 +873,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SCROW nFillRow = GetViewData().GetRefEndY(); ScDocument& rDoc = GetViewData().GetDocument(); +sal_uInt16 nOrigScFillModeMouseModifier = nScFillModeMouseModifier; +bool bUseSelection = true; + if( pReqArgs != nullptr ) { if( const SfxStringItem* pItem = pReqArgs->GetItemIfSet( FID_FILL_AUTO ) ) @@ -885,13 +888,33 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) nFillRow = aScAddress.Row(); nFillCol = aScAddress.Col(); } + +SCTAB nStartTab, nEndTab; +GetViewData().GetSimpleArea(nStartCol, nStartRow, nStartTab, nEndCol, +nEndRow, nEndTab); +bUseSelection = false; } -SCTAB nStartTab, nEndTab; -GetViewData().GetSimpleArea( nStartCol,nStartRow,nStartTab, - nEndCol,nEndRow,nEndTab ); +const SfxPoolItem* pItem; +if (pReqArgs->HasItem(FN_PARAM_1, )) +{ +/* +nScFillModeMouseModifier controls if we "Copy cells" or "Fill series" +- if nScFillModeMouseModifier is set to "KEY_MOD1", use "Copy cells" +- otherwise use "Fill series" + +This is also the same with auto fill by dragging mouse +- dragging with Ctrl key will set nScFillModeMouseModifier to KEY_MOD1, use "Copy cells" +- only dragging will use "Fill series" (no Ctrl key) +*/ +const bool bCopyCells = static_cast(pItem)->GetValue(); +nScFillModeMouseModifier &= ~KEY_MOD1; // turn off, reset to 0 + +if (bCopyCells) +nScFillModeMouseModifier |= KEY_MOD1; // turn on +} } -else// call via mouse +if (bUseSelection) // call via mouse or if FN_PARAM_1 exists { // not in a merged cell @@ -965,6 +988,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) OSL_FAIL( "Direction not unique for autofill" ); } } + +// reset nScFillModeMouseModifier to its original state +// otherwise, auto fill by dragging will not work as expected +nScFillModeMouseModifier = nOrigScFillModeMouseModifier; } break; case FID_FILL_SINGLE_EDIT:
core.git: Branch 'distro/collabora/co-23.05' - sc/sdi sc/source
sc/sdi/scalc.sdi |2 +- sc/source/ui/view/cellsh1.cxx | 35 +++ 2 files changed, 32 insertions(+), 5 deletions(-) New commits: commit 95575b8bd026e3ae4aaddf3a023488d7a5fa0976 Author: Bayram Çiçek AuthorDate: Thu May 16 09:58:28 2024 +0300 Commit: Caolán McNamara CommitDate: Thu May 16 12:24:13 2024 +0200 make AutoFill work for Copy cells and Fill series FID_FILL_AUTO (.uno:AutoFill): - added new parameter: SfxBoolItem Copy FN_PARAM_1 - if the parameter is true, we use "Copy cells", otherwise use "Fill series" Signed-off-by: Bayram Çiçek Change-Id: I639828021dcbba52f6bc21366f23faf7e38bb03e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167726 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi index db3832133b70..f158aa4bbede 100644 --- a/sc/sdi/scalc.sdi +++ b/sc/sdi/scalc.sdi @@ -338,7 +338,7 @@ SfxBoolItem AutoComplete FID_AUTOCOMPLETE SfxVoidItem AutoFill FID_FILL_AUTO -(SfxStringItem EndCell FID_FILL_AUTO) +(SfxStringItem EndCell FID_FILL_AUTO,SfxBoolItem Copy FN_PARAM_1) [ AutoUpdate = FALSE, FastCall = FALSE, diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 9a0542355497..3a44db570119 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -873,6 +873,9 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) SCROW nFillRow = GetViewData().GetRefEndY(); ScDocument& rDoc = GetViewData().GetDocument(); +sal_uInt16 nOrigScFillModeMouseModifier = nScFillModeMouseModifier; +bool bUseSelection = true; + if( pReqArgs != nullptr ) { if( const SfxStringItem* pItem = pReqArgs->GetItemIfSet( FID_FILL_AUTO ) ) @@ -885,13 +888,33 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) nFillRow = aScAddress.Row(); nFillCol = aScAddress.Col(); } + +SCTAB nStartTab, nEndTab; +GetViewData().GetSimpleArea(nStartCol, nStartRow, nStartTab, nEndCol, +nEndRow, nEndTab); +bUseSelection = false; } -SCTAB nStartTab, nEndTab; -GetViewData().GetSimpleArea( nStartCol,nStartRow,nStartTab, - nEndCol,nEndRow,nEndTab ); +const SfxPoolItem* pItem; +if (pReqArgs->HasItem(FN_PARAM_1, )) +{ +/* +nScFillModeMouseModifier controls if we "Copy cells" or "Fill series" +- if nScFillModeMouseModifier is set to "KEY_MOD1", use "Copy cells" +- otherwise use "Fill series" + +This is also the same with auto fill by dragging mouse +- dragging with Ctrl key will set nScFillModeMouseModifier to KEY_MOD1, use "Copy cells" +- only dragging will use "Fill series" (no Ctrl key) +*/ +const bool bCopyCells = static_cast(pItem)->GetValue(); +nScFillModeMouseModifier &= ~KEY_MOD1; // turn off, reset to 0 + +if (bCopyCells) +nScFillModeMouseModifier |= KEY_MOD1; // turn on +} } -else// call via mouse +if (bUseSelection) // call via mouse or if FN_PARAM_1 exists { // not in a merged cell @@ -965,6 +988,10 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) OSL_FAIL( "Direction not unique for autofill" ); } } + +// reset nScFillModeMouseModifier to its original state +// otherwise, auto fill by dragging will not work as expected +nScFillModeMouseModifier = nOrigScFillModeMouseModifier; } break; case FID_FILL_SINGLE_EDIT:
core.git: Branch 'distro/collabora/co-24.04' - cui/source
cui/source/inc/treeopt.hxx |4 ++-- cui/source/options/treeopt.cxx | 22 +++--- 2 files changed, 5 insertions(+), 21 deletions(-) New commits: commit f2f4ceb79a0adfec6654e6ebf122928cc7927036 Author: Bayram Çiçek AuthorDate: Thu May 2 22:40:22 2024 +0300 Commit: Caolán McNamara CommitDate: Fri May 10 11:20:06 2024 +0200 tdf#159375: remove initialization on Tools>Options - Initializing some dialogs at the startup of Options makes it opening very slow on some low-power systems. - This patch removes this initialization. This means, all dialogs will be initialized at the time of search. Therefore, we should wait a bit longer when typing on the search bar to get the results... - remove the default parameter "nNumberOfNode" from initializeFirstNDialog() - rename initializeFirstNDialog() to initializeAllDialogs() Change-Id: I4fd9c5673f7edecfe6a6621b6018d5d405f112a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167023 Tested-by: Jenkins Reviewed-by: Andreas Heinisch Reviewed-by: Moritz Duge (cherry picked from commit dd3953f705cc19aad4b0fcec7fd2961246b659e3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167450 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara Tested-by: Jenkins CollaboraOffice diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx index 307c70f9edd5..1522ded3d7c4 100644 --- a/cui/source/inc/treeopt.hxx +++ b/cui/source/inc/treeopt.hxx @@ -229,8 +229,8 @@ public: voidActivatePage( const OUString& rPageURL ); voidApplyItemSets(); -// default value initializes all dialogs -void initializeFirstNDialog(sal_Int16 nNumberOfNode = -1); +// initialize all dialogs in "Tools > Options" +void initializeAllDialogs(); // helper functions to call the Languages and Locales TabPage from the SpellDialog static void ApplyLanguageOptions(const SfxItemSet& rSet); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index d8fe793e10b7..029c5f773f8f 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -790,7 +790,7 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, SearchUpdateHdl, weld::Entry&, void) IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, Timer*, void) { -// initializeFirstNDialog() can take a long time, show wait cursor and disable input +// initializeAllDialogs() can take a long time, show wait cursor and disable input std::unique_ptr xWait(m_pParent ? new weld::WaitObject(m_pParent) : nullptr); // Pause redraw @@ -801,7 +801,7 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, Timer*, void) m_xSearchEdit->freeze(); xTreeLB->hide(); -initializeFirstNDialog(); +initializeAllDialogs(); m_xSearchEdit->thaw(); xTreeLB->show(); @@ -847,10 +847,9 @@ void OfaTreeOptionsDialog::selectFirstEntry() } } -void OfaTreeOptionsDialog::initializeFirstNDialog(sal_Int16 nNumberOfNode) +void OfaTreeOptionsDialog::initializeAllDialogs() { std::unique_ptr xEntry; -sal_Int16 nCount = 0; std::unique_ptr xTemp = xTreeLB->make_iterator(); bool bTemp = xTreeLB->get_iter_first(*xTemp); @@ -877,12 +876,6 @@ void OfaTreeOptionsDialog::initializeFirstNDialog(sal_Int16 nNumberOfNode) } } -/* if nNumberOfNode is -1 (which is the default value if no parameter provided), - this function will initialize all dialogs since nCount always greater than -1 */ -if (nCount == nNumberOfNode) -break; - -++nCount; bTemp = xTreeLB->iter_next(*xTemp); } } @@ -1187,15 +1180,6 @@ void OfaTreeOptionsDialog::ActivateLastSelection() xTreeLB->select(*xEntry); m_xSearchEdit->grab_focus(); SelectHdl_Impl(); - -// initializeFirstNDialog() can take a long time, show wait cursor -std::unique_ptr xWait(m_pParent ? new weld::WaitObject(m_pParent) : nullptr); - -/* initialize first 25 dialogs which are almost half of the dialogs -in a row while Options dialog opens. then clear to avoid UI test failures. */ -initializeFirstNDialog(25); -clearOptionsDialog(); -SelectHdl_Impl(); } void OfaTreeOptionsDialog::InitItemSets(OptionsGroupInfo& rGroupInfo)
core.git: Branch 'libreoffice-24-2' - cui/source
cui/source/inc/treeopt.hxx |4 ++-- cui/source/options/treeopt.cxx | 22 +++--- 2 files changed, 5 insertions(+), 21 deletions(-) New commits: commit 0aef29521b824e61b81bb6be1079b8ddd77e39a9 Author: Bayram Çiçek AuthorDate: Thu May 2 22:40:22 2024 +0300 Commit: Thorsten Behrens CommitDate: Wed May 8 11:44:21 2024 +0200 tdf#159375: remove initialization on Tools>Options - Initializing some dialogs at the startup of Options makes it opening very slow on some low-power systems. - This patch removes this initialization. This means, all dialogs will be initialized at the time of search. Therefore, we should wait a bit longer when typing on the search bar to get the results... - remove the default parameter "nNumberOfNode" from initializeFirstNDialog() - rename initializeFirstNDialog() to initializeAllDialogs() Change-Id: I4fd9c5673f7edecfe6a6621b6018d5d405f112a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167023 Tested-by: Jenkins Reviewed-by: Andreas Heinisch Reviewed-by: Moritz Duge (cherry picked from commit dd3953f705cc19aad4b0fcec7fd2961246b659e3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167222 Reviewed-by: Thorsten Behrens diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx index 307c70f9edd5..1522ded3d7c4 100644 --- a/cui/source/inc/treeopt.hxx +++ b/cui/source/inc/treeopt.hxx @@ -229,8 +229,8 @@ public: voidActivatePage( const OUString& rPageURL ); voidApplyItemSets(); -// default value initializes all dialogs -void initializeFirstNDialog(sal_Int16 nNumberOfNode = -1); +// initialize all dialogs in "Tools > Options" +void initializeAllDialogs(); // helper functions to call the Languages and Locales TabPage from the SpellDialog static void ApplyLanguageOptions(const SfxItemSet& rSet); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index d8fe793e10b7..029c5f773f8f 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -790,7 +790,7 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, SearchUpdateHdl, weld::Entry&, void) IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, Timer*, void) { -// initializeFirstNDialog() can take a long time, show wait cursor and disable input +// initializeAllDialogs() can take a long time, show wait cursor and disable input std::unique_ptr xWait(m_pParent ? new weld::WaitObject(m_pParent) : nullptr); // Pause redraw @@ -801,7 +801,7 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, Timer*, void) m_xSearchEdit->freeze(); xTreeLB->hide(); -initializeFirstNDialog(); +initializeAllDialogs(); m_xSearchEdit->thaw(); xTreeLB->show(); @@ -847,10 +847,9 @@ void OfaTreeOptionsDialog::selectFirstEntry() } } -void OfaTreeOptionsDialog::initializeFirstNDialog(sal_Int16 nNumberOfNode) +void OfaTreeOptionsDialog::initializeAllDialogs() { std::unique_ptr xEntry; -sal_Int16 nCount = 0; std::unique_ptr xTemp = xTreeLB->make_iterator(); bool bTemp = xTreeLB->get_iter_first(*xTemp); @@ -877,12 +876,6 @@ void OfaTreeOptionsDialog::initializeFirstNDialog(sal_Int16 nNumberOfNode) } } -/* if nNumberOfNode is -1 (which is the default value if no parameter provided), - this function will initialize all dialogs since nCount always greater than -1 */ -if (nCount == nNumberOfNode) -break; - -++nCount; bTemp = xTreeLB->iter_next(*xTemp); } } @@ -1187,15 +1180,6 @@ void OfaTreeOptionsDialog::ActivateLastSelection() xTreeLB->select(*xEntry); m_xSearchEdit->grab_focus(); SelectHdl_Impl(); - -// initializeFirstNDialog() can take a long time, show wait cursor -std::unique_ptr xWait(m_pParent ? new weld::WaitObject(m_pParent) : nullptr); - -/* initialize first 25 dialogs which are almost half of the dialogs -in a row while Options dialog opens. then clear to avoid UI test failures. */ -initializeFirstNDialog(25); -clearOptionsDialog(); -SelectHdl_Impl(); } void OfaTreeOptionsDialog::InitItemSets(OptionsGroupInfo& rGroupInfo)
core.git: Branch 'feature/cib_contract49c' - cui/source
cui/source/inc/treeopt.hxx |4 ++-- cui/source/options/treeopt.cxx | 22 +++--- 2 files changed, 5 insertions(+), 21 deletions(-) New commits: commit a97b6e3426ad6bab862bb8ddb98ea367c5ee2e7f Author: Bayram Çiçek AuthorDate: Thu May 2 22:40:22 2024 +0300 Commit: Thorsten Behrens CommitDate: Wed May 8 10:41:26 2024 +0200 tdf#159375: remove initialization on Tools>Options - Initializing some dialogs at the startup of Options makes it opening very slow on some low-power systems. - This patch removes this initialization. This means, all dialogs will be initialized at the time of search. Therefore, we should wait a bit longer when typing on the search bar to get the results... - remove the default parameter "nNumberOfNode" from initializeFirstNDialog() - rename initializeFirstNDialog() to initializeAllDialogs() Change-Id: I4fd9c5673f7edecfe6a6621b6018d5d405f112a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167023 Tested-by: Jenkins Reviewed-by: Andreas Heinisch Reviewed-by: Moritz Duge (cherry picked from commit dd3953f705cc19aad4b0fcec7fd2961246b659e3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167223 Tested-by: Thorsten Behrens Reviewed-by: Thorsten Behrens diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx index 307c70f9edd5..1522ded3d7c4 100644 --- a/cui/source/inc/treeopt.hxx +++ b/cui/source/inc/treeopt.hxx @@ -229,8 +229,8 @@ public: voidActivatePage( const OUString& rPageURL ); voidApplyItemSets(); -// default value initializes all dialogs -void initializeFirstNDialog(sal_Int16 nNumberOfNode = -1); +// initialize all dialogs in "Tools > Options" +void initializeAllDialogs(); // helper functions to call the Languages and Locales TabPage from the SpellDialog static void ApplyLanguageOptions(const SfxItemSet& rSet); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index d8fe793e10b7..029c5f773f8f 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -790,7 +790,7 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, SearchUpdateHdl, weld::Entry&, void) IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, Timer*, void) { -// initializeFirstNDialog() can take a long time, show wait cursor and disable input +// initializeAllDialogs() can take a long time, show wait cursor and disable input std::unique_ptr xWait(m_pParent ? new weld::WaitObject(m_pParent) : nullptr); // Pause redraw @@ -801,7 +801,7 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, Timer*, void) m_xSearchEdit->freeze(); xTreeLB->hide(); -initializeFirstNDialog(); +initializeAllDialogs(); m_xSearchEdit->thaw(); xTreeLB->show(); @@ -847,10 +847,9 @@ void OfaTreeOptionsDialog::selectFirstEntry() } } -void OfaTreeOptionsDialog::initializeFirstNDialog(sal_Int16 nNumberOfNode) +void OfaTreeOptionsDialog::initializeAllDialogs() { std::unique_ptr xEntry; -sal_Int16 nCount = 0; std::unique_ptr xTemp = xTreeLB->make_iterator(); bool bTemp = xTreeLB->get_iter_first(*xTemp); @@ -877,12 +876,6 @@ void OfaTreeOptionsDialog::initializeFirstNDialog(sal_Int16 nNumberOfNode) } } -/* if nNumberOfNode is -1 (which is the default value if no parameter provided), - this function will initialize all dialogs since nCount always greater than -1 */ -if (nCount == nNumberOfNode) -break; - -++nCount; bTemp = xTreeLB->iter_next(*xTemp); } } @@ -1187,15 +1180,6 @@ void OfaTreeOptionsDialog::ActivateLastSelection() xTreeLB->select(*xEntry); m_xSearchEdit->grab_focus(); SelectHdl_Impl(); - -// initializeFirstNDialog() can take a long time, show wait cursor -std::unique_ptr xWait(m_pParent ? new weld::WaitObject(m_pParent) : nullptr); - -/* initialize first 25 dialogs which are almost half of the dialogs -in a row while Options dialog opens. then clear to avoid UI test failures. */ -initializeFirstNDialog(25); -clearOptionsDialog(); -SelectHdl_Impl(); } void OfaTreeOptionsDialog::InitItemSets(OptionsGroupInfo& rGroupInfo)
core.git: cui/source
cui/source/inc/treeopt.hxx |4 ++-- cui/source/options/treeopt.cxx | 22 +++--- 2 files changed, 5 insertions(+), 21 deletions(-) New commits: commit dd3953f705cc19aad4b0fcec7fd2961246b659e3 Author: Bayram Çiçek AuthorDate: Thu May 2 22:40:22 2024 +0300 Commit: Andreas Heinisch CommitDate: Mon May 6 16:45:25 2024 +0200 tdf#159375: remove initialization on Tools>Options - Initializing some dialogs at the startup of Options makes it opening very slow on some low-power systems. - This patch removes this initialization. This means, all dialogs will be initialized at the time of search. Therefore, we should wait a bit longer when typing on the search bar to get the results... - remove the default parameter "nNumberOfNode" from initializeFirstNDialog() - rename initializeFirstNDialog() to initializeAllDialogs() Change-Id: I4fd9c5673f7edecfe6a6621b6018d5d405f112a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167023 Tested-by: Jenkins Reviewed-by: Andreas Heinisch Reviewed-by: Moritz Duge diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx index 6d07d0981d5a..367d42c8ff50 100644 --- a/cui/source/inc/treeopt.hxx +++ b/cui/source/inc/treeopt.hxx @@ -231,8 +231,8 @@ public: voidActivatePage( const OUString& rPageURL ); voidApplyItemSets(); -// default value initializes all dialogs -void initializeFirstNDialog(sal_Int16 nNumberOfNode = -1); +// initialize all dialogs in "Tools > Options" +void initializeAllDialogs(); // helper functions to call the Languages and Locales TabPage from the SpellDialog static void ApplyLanguageOptions(const SfxItemSet& rSet); diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index 6ab767bb8044..cf9cecfcb101 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -795,7 +795,7 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, SearchUpdateHdl, weld::Entry&, void) IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, Timer*, void) { -// initializeFirstNDialog() can take a long time, show wait cursor and disable input +// initializeAllDialogs() can take a long time, show wait cursor and disable input std::unique_ptr xWait(m_pParent ? new weld::WaitObject(m_pParent) : nullptr); // Pause redraw @@ -806,7 +806,7 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, Timer*, void) m_xSearchEdit->freeze(); xTreeLB->hide(); -initializeFirstNDialog(); +initializeAllDialogs(); m_xSearchEdit->thaw(); xTreeLB->show(); @@ -852,10 +852,9 @@ void OfaTreeOptionsDialog::selectFirstEntry() } } -void OfaTreeOptionsDialog::initializeFirstNDialog(sal_Int16 nNumberOfNode) +void OfaTreeOptionsDialog::initializeAllDialogs() { std::unique_ptr xEntry; -sal_Int16 nCount = 0; std::unique_ptr xTemp = xTreeLB->make_iterator(); bool bTemp = xTreeLB->get_iter_first(*xTemp); @@ -882,12 +881,6 @@ void OfaTreeOptionsDialog::initializeFirstNDialog(sal_Int16 nNumberOfNode) } } -/* if nNumberOfNode is -1 (which is the default value if no parameter provided), - this function will initialize all dialogs since nCount always greater than -1 */ -if (nCount == nNumberOfNode) -break; - -++nCount; bTemp = xTreeLB->iter_next(*xTemp); } } @@ -1192,15 +1185,6 @@ void OfaTreeOptionsDialog::ActivateLastSelection() xTreeLB->select(*xEntry); m_xSearchEdit->grab_focus(); SelectHdl_Impl(); - -// initializeFirstNDialog() can take a long time, show wait cursor -std::unique_ptr xWait(m_pParent ? new weld::WaitObject(m_pParent) : nullptr); - -/* initialize first 25 dialogs which are almost half of the dialogs -in a row while Options dialog opens. then clear to avoid UI test failures. */ -initializeFirstNDialog(25); -clearOptionsDialog(); -SelectHdl_Impl(); } void OfaTreeOptionsDialog::InitItemSets(OptionsGroupInfo& rGroupInfo)
core.git: Branch 'distro/collabora/co-24.04' - sc/sdi sc/source
sc/sdi/scalc.sdi |2 sc/source/ui/attrdlg/scdlgfact.cxx |7 + sc/source/ui/attrdlg/scdlgfact.hxx |5 - sc/source/ui/inc/viewfunc.hxx |3 sc/source/ui/view/tabvwshf.cxx | 160 +++-- sc/source/ui/view/viewfun2.cxx | 61 +- 6 files changed, 188 insertions(+), 50 deletions(-) New commits: commit d24b3ee8195d96846649a407606ae9068ef2114c Author: Bayram Çiçek AuthorDate: Tue Oct 17 11:48:18 2023 +0300 Commit: Caolán McNamara CommitDate: Tue Jan 23 15:43:42 2024 +0100 sc: make inactive sheets movable and copyable - move and copy use the same ScViewFunc::MoveTable function - added 3 new parameters to "SfxVoidItem Move FID_TAB_MOVE" - SfxBoolItem FromContextMenu FN_PARAM_4, - SfxUInt16Item ContextMenuIndex FN_PARAM_5, - SfxBoolItem MoveOrCopySheetDialog FN_PARAM_6 - moveLeft and moveRight of inactive tabs are implemented - move and copy of inactive tabs from the Move/Copy Sheet dialog are implemented - made Move/Copy Sheet dialog async Change-Id: I97461780a6c46f601bce9490315cd5cbea9505d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158078 Tested-by: Jenkins CollaboraOffice Reviewed-by: Gökay ŞATIR (cherry picked from commit 4d5f8b43b04734805f48b921b98a74fd9ab67d0f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162387 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi index 38151604a3d9..4240bb5ffc86 100644 --- a/sc/sdi/scalc.sdi +++ b/sc/sdi/scalc.sdi @@ -3598,7 +3598,7 @@ SfxVoidItem Mirror SID_OBJECT_MIRROR SfxVoidItem Move FID_TAB_MOVE -(SfxStringItem DocName FID_TAB_MOVE,SfxUInt16Item Index FN_PARAM_1,SfxBoolItem Copy FN_PARAM_2,SfxBoolItem UseCurrentDocument FN_PARAM_3) +(SfxStringItem DocName FID_TAB_MOVE,SfxUInt16Item Index FN_PARAM_1,SfxBoolItem Copy FN_PARAM_2,SfxBoolItem UseCurrentDocument FN_PARAM_3,SfxBoolItem FromContextMenu FN_PARAM_4,SfxUInt16Item ContextMenuIndex FN_PARAM_5,SfxBoolItem MoveOrCopySheetDialog FN_PARAM_6) [ AutoUpdate = FALSE, FastCall = FALSE, diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index 050b6d957737..7fe3435d1bce 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -214,6 +214,11 @@ short AbstractScMoveTableDlg_Impl::Execute() return m_xDlg->run(); } +bool AbstractScMoveTableDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext& rCtx) +{ +return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn); +} + BitmapEx AbstractScMoveTableDlg_Impl::createScreenshot() const { VclPtr xDialogSurface(m_xDlg->getDialog()->screenshot()); @@ -1166,7 +1171,7 @@ VclPtr ScAbstractDialogFactory_Impl::CreateScMetricInp VclPtr ScAbstractDialogFactory_Impl::CreateScMoveTableDlg(weld::Window* pParent, const OUString& rDefault) { -return VclPtr::Create(std::make_unique(pParent, rDefault)); +return VclPtr::Create(std::make_shared(pParent, rDefault)); } VclPtr ScAbstractDialogFactory_Impl::CreateScNameCreateDlg(weld::Window * pParent, CreateNameFlags nFlags) diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index 5de1ca37834e..880c1f153652 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -361,13 +361,14 @@ public: class AbstractScMoveTableDlg_Impl : public AbstractScMoveTableDlg { -std::unique_ptr m_xDlg; +std::shared_ptr m_xDlg; public: -explicit AbstractScMoveTableDlg_Impl(std::unique_ptr p) +explicit AbstractScMoveTableDlg_Impl(std::shared_ptr p) : m_xDlg(std::move(p)) { } virtual short Execute() override; +virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext& rCtx) override; virtual sal_uInt16 GetSelectedDocument () const override; virtual sal_uInt16 GetSelectedTable() const override; virtual boolGetCopyTable() const override; diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx index 52e2aedd9d22..bf6a9a77269a 100644 --- a/sc/source/ui/inc/viewfunc.hxx +++ b/sc/source/ui/inc/viewfunc.hxx @@ -271,7 +271,8 @@ public: voidDeleteTables(SCTAB nTab, SCTAB nSheets); boolRenameTable( const OUString& rName, SCTAB nTabNr ); -voidMoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, bool bCopy, const OUString* pNewTabName = nullptr ); +voidMoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, bool bCopy, const OUString* pNewTabName = nullptr, + bool bContextMenu = false, SCTAB nContextMenuSourceTab = -1 ); voidImportTables( ScDocShell* pSrcShell, SCTAB nCount, const SCTAB* pSrcTabs, bool
core.git: sc/sdi sc/source
sc/sdi/scalc.sdi |2 sc/source/ui/attrdlg/scdlgfact.cxx |7 + sc/source/ui/attrdlg/scdlgfact.hxx |5 - sc/source/ui/inc/viewfunc.hxx |3 sc/source/ui/view/tabvwshf.cxx | 160 +++-- sc/source/ui/view/viewfun2.cxx | 61 +- 6 files changed, 188 insertions(+), 50 deletions(-) New commits: commit e0ef57a2d05cacc4e8bf215e8086924b239cc2e1 Author: Bayram Çiçek AuthorDate: Tue Oct 17 11:48:18 2023 +0300 Commit: Caolán McNamara CommitDate: Tue Jan 23 12:41:44 2024 +0100 sc: make inactive sheets movable and copyable - move and copy use the same ScViewFunc::MoveTable function - added 3 new parameters to "SfxVoidItem Move FID_TAB_MOVE" - SfxBoolItem FromContextMenu FN_PARAM_4, - SfxUInt16Item ContextMenuIndex FN_PARAM_5, - SfxBoolItem MoveOrCopySheetDialog FN_PARAM_6 - moveLeft and moveRight of inactive tabs are implemented - move and copy of inactive tabs from the Move/Copy Sheet dialog are implemented - made Move/Copy Sheet dialog async Change-Id: I97461780a6c46f601bce9490315cd5cbea9505d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158078 Tested-by: Jenkins CollaboraOffice Reviewed-by: Gökay ŞATIR (cherry picked from commit 4d5f8b43b04734805f48b921b98a74fd9ab67d0f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162385 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi index 38151604a3d9..4240bb5ffc86 100644 --- a/sc/sdi/scalc.sdi +++ b/sc/sdi/scalc.sdi @@ -3598,7 +3598,7 @@ SfxVoidItem Mirror SID_OBJECT_MIRROR SfxVoidItem Move FID_TAB_MOVE -(SfxStringItem DocName FID_TAB_MOVE,SfxUInt16Item Index FN_PARAM_1,SfxBoolItem Copy FN_PARAM_2,SfxBoolItem UseCurrentDocument FN_PARAM_3) +(SfxStringItem DocName FID_TAB_MOVE,SfxUInt16Item Index FN_PARAM_1,SfxBoolItem Copy FN_PARAM_2,SfxBoolItem UseCurrentDocument FN_PARAM_3,SfxBoolItem FromContextMenu FN_PARAM_4,SfxUInt16Item ContextMenuIndex FN_PARAM_5,SfxBoolItem MoveOrCopySheetDialog FN_PARAM_6) [ AutoUpdate = FALSE, FastCall = FALSE, diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index 050b6d957737..7fe3435d1bce 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -214,6 +214,11 @@ short AbstractScMoveTableDlg_Impl::Execute() return m_xDlg->run(); } +bool AbstractScMoveTableDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext& rCtx) +{ +return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn); +} + BitmapEx AbstractScMoveTableDlg_Impl::createScreenshot() const { VclPtr xDialogSurface(m_xDlg->getDialog()->screenshot()); @@ -1166,7 +1171,7 @@ VclPtr ScAbstractDialogFactory_Impl::CreateScMetricInp VclPtr ScAbstractDialogFactory_Impl::CreateScMoveTableDlg(weld::Window* pParent, const OUString& rDefault) { -return VclPtr::Create(std::make_unique(pParent, rDefault)); +return VclPtr::Create(std::make_shared(pParent, rDefault)); } VclPtr ScAbstractDialogFactory_Impl::CreateScNameCreateDlg(weld::Window * pParent, CreateNameFlags nFlags) diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index 5de1ca37834e..880c1f153652 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -361,13 +361,14 @@ public: class AbstractScMoveTableDlg_Impl : public AbstractScMoveTableDlg { -std::unique_ptr m_xDlg; +std::shared_ptr m_xDlg; public: -explicit AbstractScMoveTableDlg_Impl(std::unique_ptr p) +explicit AbstractScMoveTableDlg_Impl(std::shared_ptr p) : m_xDlg(std::move(p)) { } virtual short Execute() override; +virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext& rCtx) override; virtual sal_uInt16 GetSelectedDocument () const override; virtual sal_uInt16 GetSelectedTable() const override; virtual boolGetCopyTable() const override; diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx index 52e2aedd9d22..bf6a9a77269a 100644 --- a/sc/source/ui/inc/viewfunc.hxx +++ b/sc/source/ui/inc/viewfunc.hxx @@ -271,7 +271,8 @@ public: voidDeleteTables(SCTAB nTab, SCTAB nSheets); boolRenameTable( const OUString& rName, SCTAB nTabNr ); -voidMoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, bool bCopy, const OUString* pNewTabName = nullptr ); +voidMoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, bool bCopy, const OUString* pNewTabName = nullptr, + bool bContextMenu = false, SCTAB nContextMenuSourceTab = -1 ); voidImportTables( ScDocShell* pSrcShell, SCTAB nCount, const SCTAB* pSrcTabs, bool bLink,SCTAB nTab);
core.git: Branch 'distro/collabora/co-23.05' - sc/sdi sc/source
sc/sdi/scalc.sdi |2 sc/source/ui/attrdlg/scdlgfact.cxx |7 + sc/source/ui/attrdlg/scdlgfact.hxx |5 - sc/source/ui/inc/viewfunc.hxx |3 sc/source/ui/view/tabvwshf.cxx | 160 +++-- sc/source/ui/view/viewfun2.cxx | 61 +- 6 files changed, 188 insertions(+), 50 deletions(-) New commits: commit 4d5f8b43b04734805f48b921b98a74fd9ab67d0f Author: Bayram Çiçek AuthorDate: Tue Oct 17 11:48:18 2023 +0300 Commit: Gökay ŞATIR CommitDate: Mon Jan 22 11:44:25 2024 +0100 sc: make inactive sheets movable and copyable - move and copy use the same ScViewFunc::MoveTable function - added 3 new parameters to "SfxVoidItem Move FID_TAB_MOVE" - SfxBoolItem FromContextMenu FN_PARAM_4, - SfxUInt16Item ContextMenuIndex FN_PARAM_5, - SfxBoolItem MoveOrCopySheetDialog FN_PARAM_6 - moveLeft and moveRight of inactive tabs are implemented - move and copy of inactive tabs from the Move/Copy Sheet dialog are implemented - made Move/Copy Sheet dialog async Change-Id: I97461780a6c46f601bce9490315cd5cbea9505d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158078 Tested-by: Jenkins CollaboraOffice Reviewed-by: Gökay ŞATIR diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi index c62c8c549d10..db3832133b70 100644 --- a/sc/sdi/scalc.sdi +++ b/sc/sdi/scalc.sdi @@ -3598,7 +3598,7 @@ SfxVoidItem Mirror SID_OBJECT_MIRROR SfxVoidItem Move FID_TAB_MOVE -(SfxStringItem DocName FID_TAB_MOVE,SfxUInt16Item Index FN_PARAM_1,SfxBoolItem Copy FN_PARAM_2,SfxBoolItem UseCurrentDocument FN_PARAM_3) +(SfxStringItem DocName FID_TAB_MOVE,SfxUInt16Item Index FN_PARAM_1,SfxBoolItem Copy FN_PARAM_2,SfxBoolItem UseCurrentDocument FN_PARAM_3,SfxBoolItem FromContextMenu FN_PARAM_4,SfxUInt16Item ContextMenuIndex FN_PARAM_5,SfxBoolItem MoveOrCopySheetDialog FN_PARAM_6) [ AutoUpdate = FALSE, FastCall = FALSE, diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index 0eca6bafb8a7..648f178dc312 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -214,6 +214,11 @@ short AbstractScMoveTableDlg_Impl::Execute() return m_xDlg->run(); } +bool AbstractScMoveTableDlg_Impl::StartExecuteAsync(VclAbstractDialog::AsyncContext& rCtx) +{ +return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn); +} + BitmapEx AbstractScMoveTableDlg_Impl::createScreenshot() const { VclPtr xDialogSurface(m_xDlg->getDialog()->screenshot()); @@ -1161,7 +1166,7 @@ VclPtr ScAbstractDialogFactory_Impl::CreateScMetricInp VclPtr ScAbstractDialogFactory_Impl::CreateScMoveTableDlg(weld::Window* pParent, const OUString& rDefault) { -return VclPtr::Create(std::make_unique(pParent, rDefault)); +return VclPtr::Create(std::make_shared(pParent, rDefault)); } VclPtr ScAbstractDialogFactory_Impl::CreateScNameCreateDlg(weld::Window * pParent, CreateNameFlags nFlags) diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index e39428018287..e92a4e70e361 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -361,13 +361,14 @@ public: class AbstractScMoveTableDlg_Impl : public AbstractScMoveTableDlg { -std::unique_ptr m_xDlg; +std::shared_ptr m_xDlg; public: -explicit AbstractScMoveTableDlg_Impl(std::unique_ptr p) +explicit AbstractScMoveTableDlg_Impl(std::shared_ptr p) : m_xDlg(std::move(p)) { } virtual short Execute() override; +virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext& rCtx) override; virtual sal_uInt16 GetSelectedDocument () const override; virtual sal_uInt16 GetSelectedTable() const override; virtual boolGetCopyTable() const override; diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx index a62406020de5..f2a4111c72b1 100644 --- a/sc/source/ui/inc/viewfunc.hxx +++ b/sc/source/ui/inc/viewfunc.hxx @@ -271,7 +271,8 @@ public: voidDeleteTables(SCTAB nTab, SCTAB nSheets); boolRenameTable( const OUString& rName, SCTAB nTabNr ); -voidMoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, bool bCopy, const OUString* pNewTabName = nullptr ); +voidMoveTable( sal_uInt16 nDestDocNo, SCTAB nDestTab, bool bCopy, const OUString* pNewTabName = nullptr, + bool bContextMenu = false, SCTAB nContextMenuSourceTab = -1 ); voidImportTables( ScDocShell* pSrcShell, SCTAB nCount, const SCTAB* pSrcTabs, bool bLink,SCTAB nTab); diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index b3db07466984..1533094eccda 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@
[Libreoffice-commits] core.git: cui/source sc/source sd/source sfx2/source starmath/source svx/source sw/source
cui/source/options/connpooloptions.cxx | 10 +++ cui/source/options/dbregister.cxx |5 + cui/source/options/fontsubs.cxx | 10 +++ cui/source/options/optaccessibility.cxx | 10 +++ cui/source/options/optasian.cxx | 10 +++ cui/source/options/optbasic.cxx | 10 +++ cui/source/options/optchart.cxx | 10 +++ cui/source/options/optcolor.cxx |5 + cui/source/options/optctl.cxx | 15 - cui/source/options/optdeepl.cxx |8 ++- cui/source/options/optfltr.cxx | 20 ++- cui/source/options/optgdlg.cxx | 33 ++-- cui/source/options/optgenrl.cxx |5 + cui/source/options/opthtml.cxx | 10 +++ cui/source/options/optinet2.cxx | 28 -- cui/source/options/optjava.cxx | 15 - cui/source/options/optjsearch.cxx | 10 +++ cui/source/options/optlanguagetool.cxx | 13 +++-- cui/source/options/optlingu.cxx |5 + cui/source/options/optopencl.cxx|5 + cui/source/options/optpath.cxx |4 + cui/source/options/optsave.cxx | 10 +++ cui/source/options/optupdt.cxx | 15 - cui/source/options/personalization.cxx |8 ++- cui/source/tabpages/tparea.cxx |5 + sc/source/ui/optdlg/opredlin.cxx|5 + sc/source/ui/optdlg/tpcalc.cxx | 15 - sc/source/ui/optdlg/tpcompatibility.cxx |5 + sc/source/ui/optdlg/tpdefaults.cxx |5 + sc/source/ui/optdlg/tpformula.cxx | 15 - sc/source/ui/optdlg/tpprint.cxx | 10 +++ sc/source/ui/optdlg/tpusrlst.cxx| 10 +++ sc/source/ui/optdlg/tpview.cxx | 25 +++-- sd/source/ui/dlg/prntopts.cxx | 15 - sd/source/ui/dlg/tpoption.cxx | 20 ++- sfx2/source/dialog/printopt.cxx | 15 - starmath/source/dialog.cxx | 15 - svx/source/dialog/optgrid.cxx | 10 +++ sw/source/ui/config/mailconfigpage.cxx | 15 - sw/source/ui/config/optcomp.cxx |5 + sw/source/ui/config/optload.cxx | 23 ++-- sw/source/ui/config/optpage.cxx | 83 +--- 42 files changed, 452 insertions(+), 118 deletions(-) New commits: commit 0eb05b47a6d89fdfc533515483584fc739962b65 Author: Bayram Çiçek AuthorDate: Wed Sep 20 14:37:08 2023 +0300 Commit: Andreas Heinisch CommitDate: Mon Sep 25 11:05:25 2023 +0200 tdf#49895: search in Options: check if label exists (related to tdf#157266) - since ids in ui files can be changed or removed, we have to check if they are exits or not, to prevent any crash or misbehavior. - Proper solution will be iterating over the widget ids and collecting their strings without based on a list of identifiers. Change-Id: I2088af6842ad0acd00838a37295dc2e6140096f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157103 Reviewed-by: Andreas Heinisch Tested-by: Andreas Heinisch diff --git a/cui/source/options/connpooloptions.cxx b/cui/source/options/connpooloptions.cxx index b13561898ab0..00101bed4fb6 100644 --- a/cui/source/options/connpooloptions.cxx +++ b/cui/source/options/connpooloptions.cxx @@ -165,12 +165,18 @@ namespace offapp OUString labels[] = { "label1", "driverslabel", "driverlabel", "timeoutlabel", "driver" }; for (const auto& label : labels) -sAllStrings += m_xBuilder->weld_label(label)->get_label() + " "; +{ +if (const auto& pString = m_xBuilder->weld_label(label)) +sAllStrings += pString->get_label() + " "; +} OUString checkButton[] = { "connectionpooling", "enablepooling" }; for (const auto& check : checkButton) -sAllStrings += m_xBuilder->weld_check_button(check)->get_label() + " "; +{ +if (const auto& pString = m_xBuilder->weld_check_button(check)) +sAllStrings += pString->get_label() + " "; +} return sAllStrings.replaceAll("_", ""); } diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx index d1c8abb4d102..8386cc546595 100644 --- a/cui/source/options/dbregister.cxx +++ b/cui/source/options/dbregister.cxx @@ -133,7 +133,10 @@ std::unique_ptr DbRegistrationOptionsPage::Create( weld::Container* OUString DbRegistrationOptionsPage::GetAllStrings() { -OUString sAllStrings = m_xBuilder->weld_label("label1")->get_label() + " "; +OUString sAllStrings; + +if (const auto& pString = m_xBuilder->weld_label("label1")) +sAllStrings += pString->get_label() + " "; return sAllStrings.replaceAll("_", ""); } diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index b2fb0604dcf8..eaf00e2364dd 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -146,12 +146,18 @@ OUString
[Libreoffice-commits] core.git: cui/source
cui/source/options/treeopt.cxx | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) New commits: commit c68e1dca3a5a06248ce129bfb13206753163d71d Author: Bayram Çiçek AuthorDate: Thu Aug 31 00:01:56 2023 +0300 Commit: Andreas Heinisch CommitDate: Mon Sep 4 13:10:26 2023 +0200 tdf#49895: show wait cursor while Options dialog loads initializing of the dialogs happens at two stage: - at the loading of the Options dialog - at the time of searching We have to notify the user that there is a process ongoing. Therefore, a wait cursor indicator added to the both stage of the initialization. Change-Id: Ia1c6318aa961424e957ae27ac2ff5f496180cb81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156312 Reviewed-by: Andreas Heinisch Tested-by: Jenkins diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index d514b7deeb7f..1b5e29e2aca2 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -791,6 +791,12 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, SearchUpdateHdl, weld::Entry&, void) IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, Timer*, void) { +// initializeFirstNDialog() can take a long time, show wait cursor and disable input +std::unique_ptr xWait(m_pParent ? new weld::WaitObject(m_pParent) : nullptr); + +// Pause redraw +xTreeLB->freeze(); + if (bIsFirtsInitialize) { m_xSearchEdit->freeze(); @@ -803,9 +809,6 @@ IMPL_LINK_NOARG(OfaTreeOptionsDialog, ImplUpdateDataHdl, Timer*, void) bIsFirtsInitialize = false; } -// Pause redraw -xTreeLB->freeze(); - // Apply the search filter OUString aSearchTerm(m_xSearchEdit->get_text()); int nMatchFound = applySearchFilter(aSearchTerm); @@ -1186,6 +1189,9 @@ void OfaTreeOptionsDialog::ActivateLastSelection() m_xSearchEdit->grab_focus(); SelectHdl_Impl(); +// initializeFirstNDialog() can take a long time, show wait cursor +std::unique_ptr xWait(m_pParent ? new weld::WaitObject(m_pParent) : nullptr); + /* initialize first 25 dialogs which are almost half of the dialogs in a row while Options dialog opens. then clear to avoid UI test failures. */ initializeFirstNDialog(25);
[Libreoffice-commits] core.git: cui/Library_cui.mk cui/source cui/uiconfig include/sfx2 include/svx sc/source sd/source sfx2/source starmath/inc starmath/source svx/source sw/source
cui/Library_cui.mk |1 cui/source/inc/cuioptgenrl.hxx |2 cui/source/inc/cuitabarea.hxx |2 cui/source/inc/dbregister.hxx |2 cui/source/inc/optasian.hxx |3 cui/source/inc/optlingu.hxx |2 cui/source/inc/optpath.hxx |2 cui/source/inc/treeopt.hxx | 49 ++ cui/source/options/connpooloptions.cxx | 16 cui/source/options/connpooloptions.hxx |1 cui/source/options/dbregister.cxx |7 cui/source/options/fontsubs.cxx | 16 cui/source/options/fontsubs.hxx |3 cui/source/options/optaccessibility.cxx | 17 cui/source/options/optaccessibility.hxx |3 cui/source/options/optasian.cxx | 20 cui/source/options/optbasic.cxx | 17 cui/source/options/optbasic.hxx |3 cui/source/options/optchart.cxx | 16 cui/source/options/optchart.hxx |3 cui/source/options/optcolor.cxx | 12 cui/source/options/optcolor.hxx |2 cui/source/options/optctl.cxx | 21 cui/source/options/optctl.hxx |3 cui/source/options/optdeepl.cxx | 13 cui/source/options/optdeepl.hxx |2 cui/source/options/optfltr.cxx | 35 + cui/source/options/optfltr.hxx |4 cui/source/options/optgdlg.cxx | 61 ++ cui/source/options/optgdlg.hxx |6 cui/source/options/optgenrl.cxx | 17 cui/source/options/opthtml.cxx | 18 cui/source/options/opthtml.hxx |2 cui/source/options/optinet2.cxx | 52 ++ cui/source/options/optinet2.hxx |8 cui/source/options/optjava.cxx | 21 cui/source/options/optjava.hxx |2 cui/source/options/optjsearch.cxx | 33 + cui/source/options/optjsearch.hxx |2 cui/source/options/optlanguagetool.cxx | 20 cui/source/options/optlanguagetool.hxx |2 cui/source/options/optlingu.cxx | 13 cui/source/options/optopencl.cxx| 13 cui/source/options/optopencl.hxx|1 cui/source/options/optpath.cxx |6 cui/source/options/optsave.cxx | 20 cui/source/options/optsave.hxx |2 cui/source/options/optupdt.cxx | 25 + cui/source/options/optupdt.hxx |2 cui/source/options/personalization.cxx | 13 cui/source/options/personalization.hxx |2 cui/source/options/treeopt.cxx | 721 ++-- cui/source/options/treeopthelper.cxx| 184 cui/source/tabpages/tparea.cxx | 12 cui/uiconfig/ui/optionsdialog.ui| 75 ++- include/sfx2/printopt.hxx |3 include/sfx2/tabdlg.hxx |1 include/svx/optgrid.hxx |2 sc/source/ui/inc/opredlin.hxx |2 sc/source/ui/inc/tpcalc.hxx |3 sc/source/ui/inc/tpcompatibility.hxx|2 sc/source/ui/inc/tpdefaults.hxx |2 sc/source/ui/inc/tpformula.hxx |2 sc/source/ui/inc/tpprint.hxx|2 sc/source/ui/inc/tpusrlst.hxx |3 sc/source/ui/inc/tpview.hxx |6 sc/source/ui/optdlg/opredlin.cxx| 11 sc/source/ui/optdlg/tpcalc.cxx | 24 + sc/source/ui/optdlg/tpcompatibility.cxx | 13 sc/source/ui/optdlg/tpdefaults.cxx | 13 sc/source/ui/optdlg/tpformula.cxx | 28 + sc/source/ui/optdlg/tpprint.cxx | 16 sc/source/ui/optdlg/tpusrlst.cxx| 16 sc/source/ui/optdlg/tpview.cxx | 43 + sd/source/ui/dlg/prntopts.cxx | 24 + sd/source/ui/dlg/tpoption.cxx | 37 + sd/source/ui/inc/prntopts.hxx |2 sd/source/ui/inc/tpoption.hxx |4 sfx2/source/dialog/printopt.cxx | 30 + sfx2/source/dialog/tabdlg.cxx | 13 starmath/inc/dialog.hxx |2 starmath/source/dialog.cxx | 22 svx/source/dialog/optgrid.cxx | 20 sw/source/ui/config/mailconfigpage.cxx | 22 sw/source/ui/config/optcomp.cxx | 13 sw/source/ui/config/optload.cxx | 38 + sw/source/ui/config/optpage.cxx | 163 +++ sw/source/uibase/inc/mailconfigpage.hxx |2 sw/source/uibase/inc/optcomp.hxx|2 sw/source/uibase/inc/optload.hxx|4 sw/source/uibase/inc/optpage.hxx| 16 91 files changed, 2169 insertions(+), 47 deletions(-) New commits: commit a4633dadb4233ad5587bd238449671d610540c81 Author: Bayram Çiçek AuthorDate: Fri Jun 2 08:24:25 2023 +0300 Commit: Andreas Heinisch CommitDate: Tue Aug 29 18:01:40 2023 +0200 tdf#49895: Add search functionality to Options dialog - Search field added. - Dialog names of all treeview nodes with their parent names were included in searching. - Strings of labels,
[Libreoffice-commits] core.git: sd/source
sd/source/ui/func/futext.cxx | 104 +-- sd/source/ui/inc/futext.hxx |1 2 files changed, 22 insertions(+), 83 deletions(-) New commits: commit 059f1e8f291404addeba9341d2c4989976af Author: Bayram Çiçek AuthorDate: Fri Apr 14 00:34:52 2023 +0300 Commit: Maxim Monastirsky CommitDate: Tue Apr 18 01:18:57 2023 +0200 tdf#90253: Impress: make TextBox retain its height - [Impress] drawing a new Text Box and Vertical Text minimize itself to the height of one line. - This behavior has changed and inserting a new TextBox/VerticalText does not shrink itself to height of one line. - Unified some common Draw and Impress codes - removed unnecessary ImpSetAttributesFitCommon(pText) function, as ImpSetAttributesForNewTextObject(pText) takes care of the Text Box creations. - SID_ATTR_CHAR (.uno:Text) - SID_ATTR_CHAR_VERTICAL (.uno:VerticalText) Change-Id: Ia944c2b64d5b1fa6970f6afabf41d36bf1643efa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150377 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index 60e36e2674b3..f01851668f76 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -509,59 +509,34 @@ bool FuText::MouseMove(const MouseEvent& rMEvt) void FuText::ImpSetAttributesForNewTextObject(SdrTextObj* pTxtObj) { -if(mpDoc->GetDocumentType() == DocumentType::Impress) +if( nSlotId == SID_ATTR_CHAR ) { -if( nSlotId == SID_ATTR_CHAR ) -{ -/* Create Impress text object (rescales to line height) - We get the correct height during the subsequent creation of the - object, otherwise we draw too much */ -SfxItemSet aSet(mpViewShell->GetPool()); -aSet.Put(makeSdrTextMinFrameHeightItem(0)); -aSet.Put(makeSdrTextAutoGrowWidthItem(false)); -aSet.Put(makeSdrTextAutoGrowHeightItem(true)); -pTxtObj->SetMergedItemSet(aSet); -pTxtObj->AdjustTextFrameWidthAndHeight(); - aSet.Put(makeSdrTextMaxFrameHeightItem(pTxtObj->GetLogicRect().GetSize().Height())); -pTxtObj->SetMergedItemSet(aSet); -const SfxViewShell* pCurrentViewShell = SfxViewShell::Current(); -if (pCurrentViewShell && (pCurrentViewShell->isLOKMobilePhone() || pCurrentViewShell->isLOKTablet())) -pTxtObj->SetText(SdResId(STR_PRESOBJ_TEXT_EDIT_MOBILE)); -} -else if( nSlotId == SID_ATTR_CHAR_VERTICAL ) -{ -SfxItemSet aSet(mpViewShell->GetPool()); -aSet.Put(makeSdrTextMinFrameWidthItem(0)); -aSet.Put(makeSdrTextAutoGrowWidthItem(true)); -aSet.Put(makeSdrTextAutoGrowHeightItem(false)); - -// Needs to be set since default is SDRTEXTHORZADJUST_BLOCK -aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT)); -pTxtObj->SetMergedItemSet(aSet); -pTxtObj->AdjustTextFrameWidthAndHeight(); - aSet.Put(makeSdrTextMaxFrameWidthItem(pTxtObj->GetLogicRect().GetSize().Width())); -pTxtObj->SetMergedItemSet(aSet); -} +SfxItemSet aSet(mpViewShell->GetPool()); +aSet.Put(makeSdrTextAutoGrowWidthItem(false)); +aSet.Put(makeSdrTextAutoGrowHeightItem(true)); +pTxtObj->SetMergedItemSet(aSet); +pTxtObj->AdjustTextFrameWidthAndHeight(); +const SfxViewShell* pCurrentViewShell = SfxViewShell::Current(); +if (pCurrentViewShell && (pCurrentViewShell->isLOKMobilePhone() || pCurrentViewShell->isLOKTablet())) +pTxtObj->SetText(SdResId(STR_PRESOBJ_TEXT_EDIT_MOBILE)); } -else +else if( nSlotId == SID_ATTR_CHAR_VERTICAL ) { -if( nSlotId == SID_ATTR_CHAR_VERTICAL ) -{ -// draw text object, needs to be initialized when vertical text is used -SfxItemSet aSet(mpViewShell->GetPool()); +// draw text object, needs to be initialized when vertical text is used +SfxItemSet aSet(mpViewShell->GetPool()); -aSet.Put(makeSdrTextAutoGrowWidthItem(true)); -aSet.Put(makeSdrTextAutoGrowHeightItem(false)); +aSet.Put(makeSdrTextAutoGrowWidthItem(true)); +aSet.Put(makeSdrTextAutoGrowHeightItem(false)); -// Set defaults for vertical click-n'drag text object, pool defaults are: -// SdrTextVertAdjustItem: SDRTEXTVERTADJUST_TOP -// SdrTextHorzAdjustItem: SDRTEXTHORZADJUST_BLOCK -// Analog to that: -aSet.Put(SdrTextVertAdjustItem(SDRTEXTVERTADJUST_BLOCK)); -aSet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_RIGHT)); +// Set defaults for vertical click-n'drag text object, pool defaults are: +// SdrTextVertAdjustItem: SDRTEXTVERTADJUST_TOP +//
[Libreoffice-commits] core.git: sax/source
sax/source/tools/converter.cxx | 34 -- 1 file changed, 4 insertions(+), 30 deletions(-) New commits: commit 9bee4cec215e2694f6e6e1aa4a463b47b69cc1ff Author: Bayram Çiçek AuthorDate: Tue Apr 11 22:46:12 2023 +0300 Commit: Mike Kaganski CommitDate: Wed Apr 12 14:45:51 2023 +0200 tdf#39593: remove trim(), use o3tl::trim() instead trim(std::u16string_view in) and trim(std::string_view in) functions were removed and replaced with o3tl::trim(rString) function Change-Id: I29b2274422dbfe9dc26177c3e1dbf20786c811d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150245 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx index e9ef4494c5de..818d04a9bd1a 100644 --- a/sax/source/tools/converter.cxx +++ b/sax/source/tools/converter.cxx @@ -913,32 +913,6 @@ void Converter::convertDuration(OUStringBuffer& rBuffer, rBuffer.append( 'S'); } -static std::u16string_view trim(std::u16string_view in) { - auto left = in.begin(); - for (;; ++left) { -if (left == in.end()) - return std::u16string_view(); -if (!isspace(*left)) - break; - } - auto right = in.end() - 1; - for (; right > left && isspace(*right); --right); - return std::u16string_view(&*left, std::distance(left, right) + 1); -} - -static std::string_view trim(std::string_view in) { - auto left = in.begin(); - for (;; ++left) { -if (left == in.end()) - return std::string_view(); -if (!isspace(*left)) - break; - } - auto right = in.end() - 1; - for (; right > left && isspace(*right); --right); - return std::string_view(&*left, std::distance(left, right) + 1); -} - /** helper function of Converter::convertDuration */ template static bool convertDurationHelper(double& rfTime, V pStr) @@ -1068,7 +1042,7 @@ static bool convertDurationHelper(double& rfTime, V pStr) bool Converter::convertDuration(double& rfTime, std::string_view rString) { -std::string_view aTrimmed = trim(rString); +std::string_view aTrimmed = o3tl::trim(rString); const char* pStr = aTrimmed.data(); return convertDurationHelper(rfTime, pStr); @@ -1429,14 +1403,14 @@ static bool convertDurationHelper(util::Duration& rDuration, V string) bool Converter::convertDuration(util::Duration& rDuration, std::u16string_view rString) { -return convertDurationHelper(rDuration, trim(rString)); +return convertDurationHelper(rDuration, o3tl::trim(rString)); } /** convert ISO8601 "duration" string to util::Duration */ bool Converter::convertDuration(util::Duration& rDuration, std::string_view rString) { -return convertDurationHelper(rDuration, trim(rString)); +return convertDurationHelper(rDuration, o3tl::trim(rString)); } static void @@ -1824,7 +1798,7 @@ static bool lcl_parseDateTime( { bool bSuccess = true; -string = trim(string); +string = o3tl::trim(string); bool isNegative(false); sal_Int32 nYear(0);
[Libreoffice-commits] core.git: extensions/source
extensions/source/bibliography/framectr.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 71311f88f7d83d8669576a98d300780d3d8bd02a Author: Bayram Çiçek AuthorDate: Sun Mar 12 01:18:15 2023 +0300 Commit: Andreas Heinisch CommitDate: Thu Mar 23 10:37:12 2023 + tdf#146150: Use dispatch command in framectr.cxx - "slot:5503" changed to ".uno:CloseDoc" Change-Id: Ia2748cfe13191a9b93fd76f9f26fe6fadbd2d0b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148693 Tested-by: Jenkins Reviewed-by: Andreas Heinisch diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx index 98c06079d491..31fef580448b 100644 --- a/extensions/source/bibliography/framectr.cxx +++ b/extensions/source/bibliography/framectr.cxx @@ -481,7 +481,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen { RemoveFilter(); } -else if( _rURL.Complete == "slot:5503" || aCommand == "CloseDoc" ) +else if( _rURL.Complete == ".uno:CloseDoc" || aCommand == "CloseDoc" ) { Application::PostUserEvent( LINK( this, BibFrameController_Impl, DisposeHdl ) );
[Libreoffice-commits] core.git: sw/source
sw/source/filter/html/htmlatr.cxx | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) New commits: commit 66d38ba8e9ccb7ba0ef5b3feb67b241a5b6b2e80 Author: Bayram Çiçek AuthorDate: Thu Mar 9 15:58:04 2023 +0300 Commit: Andreas Heinisch CommitDate: Thu Mar 16 09:49:49 2023 + tdf#140226: use StaticWhichCast in htmlatr.cxx Change-Id: If7694d45827630ec690004d4fd2c5fbacbc46f09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148541 Tested-by: Jenkins Reviewed-by: Andreas Heinisch diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index a3b1335501a7..5d9fb561de98 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -1208,7 +1208,7 @@ HTMLOnOffState HTMLEndPosLst::GetHTMLItemState( const SfxPoolItem& rItem ) break; case RES_CHRATR_CROSSEDOUT: -switch( static_cast(rItem).GetStrikeout() ) +switch( rItem.StaticWhichCast(RES_CHRATR_CROSSEDOUT).GetStrikeout() ) { case STRIKEOUT_SINGLE: case STRIKEOUT_DOUBLE: @@ -1223,7 +1223,7 @@ HTMLOnOffState HTMLEndPosLst::GetHTMLItemState( const SfxPoolItem& rItem ) break; case RES_CHRATR_ESCAPEMENT: -switch( static_cast(static_cast(rItem).GetEnumValue()) ) +switch( static_cast(rItem.StaticWhichCast(RES_CHRATR_ESCAPEMENT).GetEnumValue()) ) { case SvxEscapement::Superscript: case SvxEscapement::Subscript: @@ -1238,7 +1238,7 @@ HTMLOnOffState HTMLEndPosLst::GetHTMLItemState( const SfxPoolItem& rItem ) break; case RES_CHRATR_UNDERLINE: -switch( static_cast(rItem).GetLineStyle() ) +switch( rItem.StaticWhichCast(RES_CHRATR_UNDERLINE).GetLineStyle() ) { case LINESTYLE_SINGLE: eState = HTML_ON_VALUE; @@ -1278,7 +1278,7 @@ HTMLOnOffState HTMLEndPosLst::GetHTMLItemState( const SfxPoolItem& rItem ) break; case RES_CHRATR_BLINK: -eState = static_cast(rItem).GetValue() ? HTML_ON_VALUE +eState = rItem.StaticWhichCast(RES_CHRATR_BLINK).GetValue() ? HTML_ON_VALUE : HTML_OFF_VALUE; break; @@ -1644,7 +1644,7 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem, { OSL_ENSURE( RES_TXTATR_CHARFMT == rItem.Which(), "Not a character style after all" ); -const SwFormatCharFormat& rChrFormat = static_cast(rItem); +const SwFormatCharFormat& rChrFormat = rItem.StaticWhichCast(RES_TXTATR_CHARFMT); const SwCharFormat* pFormat = rChrFormat.GetCharFormat(); const SwHTMLFormatInfo *pFormatInfo = GetFormatInfo( *pFormat, rFormatInfos ); @@ -1664,7 +1664,9 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem, case HTML_AUTOFMT_VALUE: { -const SwFormatAutoFormat& rAutoFormat = static_cast(rItem); +OSL_ENSURE( RES_TXTATR_AUTOFMT == rItem.Which(), +"Not an automatic style, after all" ); +const SwFormatAutoFormat& rAutoFormat = rItem.StaticWhichCast(RES_TXTATR_AUTOFMT); const std::shared_ptr& pSet = rAutoFormat.GetStyleHandle(); if( pSet ) Insert( *pSet, nStart, nEnd, rFormatInfos, true, bParaAttrs ); @@ -1677,7 +1679,7 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem, { OSL_ENSURE( RES_CHRATR_COLOR == rItem.Which(), "Not a foreground color, after all" ); -Color aColor( static_cast(rItem).GetValue() ); +Color aColor( rItem.StaticWhichCast(RES_CHRATR_COLOR).GetValue() ); if( COL_AUTO == aColor ) aColor = COL_BLACK; bSet = !bParaAttrs || !m_xDefaultColor || !m_xDefaultColor->IsRGBEqual(aColor); @@ -1688,7 +1690,7 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem, { OSL_ENSURE( RES_PARATR_DROP == rItem.Which(), "Not a drop cap, after all" ); -const SwFormatDrop& rDrop = static_cast(rItem); +const SwFormatDrop& rDrop = rItem.StaticWhichCast(RES_PARATR_DROP); nEnd = nStart + rDrop.GetChars(); if (!m_bOutStyles) { @@ -1752,7 +1754,7 @@ void HTMLEndPosLst::Insert( const SfxPoolItem& rItem, break; case RES_TXTATR_CHARFMT: { -const SwFormatCharFormat& rChrFormat = static_cast(rItem); +const SwFormatCharFormat& rChrFormat = rItem.StaticWhichCast(RES_TXTATR_CHARFMT); const SwCharFormat* pFormat = rChrFormat.GetCharFormat(); const SwHTMLFormatInfo *pFormatInfo = GetFormatInfo( *pFormat, rFormatInfos ); if( pFormatInfo->bScriptDependent ) @@ -2406,7 +2408,7 @@ SwHTMLWriter& OutHTML_SwTextNode( SwHTMLWriter& rWrt, const SwContentNode&
[Libreoffice-commits] core.git: svx/source
svx/source/tbxctrls/tbcontrl.cxx | 104 +-- 1 file changed, 79 insertions(+), 25 deletions(-) New commits: commit adbaec38eca4847915871c817b67f5c722f0997d Author: Bayram Çiçek AuthorDate: Sun Jan 16 20:47:42 2022 +0300 Commit: Heiko Tietze CommitDate: Tue Jan 25 15:07:36 2022 +0100 tdf#146407: Hide diagonal border icons for Writer - Writer and Calc use the same 'Borders' UI. - svx/source/tbxctrls/tbcontrl.cxx - Diagonal borders for Writer has not been implemented yet. Therefore, diagonal borders don't work when clicking on them. - It would be convenient to hide diagonal border icons until the functionality is implemented. Change-Id: I6601ef924dbfb0acd40c3144300fecf74922c49f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128487 Tested-by: Jenkins Tested-by: Heiko Tietze Reviewed-by: Heiko Tietze diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 3f2c8f8b634a..e7f168fc9340 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -457,6 +457,7 @@ private: std::unique_ptr mxFrameSetWin; std::vector> aImgVec; boolbParagraphMode; +boolm_bIsWriter; void InitImageList(); void CalcSizeValueSet(); @@ -2177,7 +2178,13 @@ SvxFrameWindow_Impl::SvxFrameWindow_Impl(SvxFrameToolBoxControl* pControl, weld: , mxFrameSet(new SvxFrmValueSet_Impl) , mxFrameSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", *mxFrameSet)) , bParagraphMode(false) +, m_bIsWriter(false) { + +// check whether the document is Writer or not +if (Reference xSI{ m_xFrame->getController()->getModel(), UNO_QUERY }) +m_bIsWriter = xSI->supportsService("com.sun.star.text.TextDocument"); + mxFrameSet->SetStyle(WB_ITEMBORDER | WB_DOUBLEBORDER | WB_3DLOOK | WB_NO_DIRECTSELECT); AddStatusListener(".uno:BorderReducedMode"); InitImageList(); @@ -2193,15 +2200,22 @@ SvxFrameWindow_Impl::SvxFrameWindow_Impl(SvxFrameToolBoxControl* pControl, weld: sal_uInt16 i = 0; -for ( i=1; i<11; i++ ) +// diagonal borders available only for Calc. +// Therefore, Calc uses 10 border types while +// Writer uses 8 of them - for a single cell. +for ( i=1; i < (m_bIsWriter ? 9 : 11); i++ ) mxFrameSet->InsertItem(i, Image(aImgVec[i-1].first), aImgVec[i-1].second); //bParagraphMode should have been set in StateChanged if ( !bParagraphMode ) -for ( i = 11; i < 16; i++ ) +// when multiple cell selected: +// Writer has 12 border types and Calc has 15 of them. +for ( i = (m_bIsWriter ? 9 : 11); i < (m_bIsWriter ? 13 : 16); i++ ) mxFrameSet->InsertItem(i, Image(aImgVec[i-1].first), aImgVec[i-1].second); -mxFrameSet->SetColCount( 5 ); +// adjust frame column for Writer +sal_uInt16 colCount = m_bIsWriter ? 4 : 5; +mxFrameSet->SetColCount( colCount ); mxFrameSet->SetSelectHdl( LINK( this, SvxFrameWindow_Impl, SelectHdl ) ); CalcSizeValueSet(); @@ -2259,6 +2273,17 @@ IMPL_LINK_NOARG(SvxFrameWindow_Impl, SelectHdl, ValueSet*, void) // cell border using the border formatting tool in the standard toolbar theDefLine.GuessLinesWidths(theDefLine.GetBorderLineStyle(), SvxBorderLineWidth::Thin); +// nSel has 15 cases which means 15 border +// types for Calc. But Writer uses only 12 +// of them - when diagonal borders excluded. +if (m_bIsWriter) +{ +// add appropriate increments +// to match the correct borders. +if (nSel > 8) { nSel += 2; } +else if (nSel > 4) { nSel++; } +} + switch ( nSel ) { case 1: nValidFlags |= FrmValidFlags::AllMask; @@ -2416,18 +2441,19 @@ void SvxFrameWindow_Impl::statusChanged( const css::frame::FeatureStateEvent& rE if(!mxFrameSet->GetItemCount()) return; -bool bTableMode = ( mxFrameSet->GetItemCount() == 15 ); +// set 12 border types for Writer, otherwise 15 for Calc. +bool bTableMode = ( mxFrameSet->GetItemCount() == static_cast(m_bIsWriter ? 12 : 15) ); bool bResize= false; if ( bTableMode && bParagraphMode ) { -for ( sal_uInt16 i = 11; i < 16; i++ ) +for ( sal_uInt16 i = (m_bIsWriter ? 9 : 11); i < (m_bIsWriter ? 13 : 16); i++ ) mxFrameSet->RemoveItem(i); bResize = true; } else if ( !bTableMode && !bParagraphMode ) { -for ( sal_uInt16 i = 11; i < 16; i++ ) +for ( sal_uInt16 i = (m_bIsWriter ? 9 : 11); i < (m_bIsWriter ? 13 : 16); i++ ) mxFrameSet->InsertItem(i, Image(aImgVec[i-1].first), aImgVec[i-1].second); bResize = true; } @@ -2450,25 +2476,53 @@ void SvxFrameWindow_Impl::CalcSizeValueSet() void SvxFrameWindow_Impl::InitImageList() { -aImgVec = { -
[Libreoffice-commits] core.git: include/svx sc/qa svx/source
include/svx/strings.hrc | 40 +- sc/qa/unit/ucalc.cxx | 50 ++-- svx/source/tbxctrls/tbcontrl.cxx | 156 +++ 3 files changed, 106 insertions(+), 140 deletions(-) New commits: commit ce1902d3964414f5abf5a07ec43c19641c8752f0 Author: Bayram Çiçek AuthorDate: Thu Aug 26 16:07:37 2021 +0300 Commit: Heiko Tietze CommitDate: Sat Oct 9 08:22:17 2021 +0200 Rename strings and change criss-cross border icon regarding 3a9167e1b8a236da2862f4377e2040a8c189c99c 'tdf#143919: Calc: add diagonal borders in Toolbar>Borders' - criss-cross border icon replaced with a new one - rename -> 'diagonal left' to 'diagonal down' - rename -> 'diagonal right' to 'diagonal up' - code refactoring: large if-else blocks refactored as methods and called from proper cases - clang-format - "Set" word dropped from include/svx/strings.hrc Change-Id: I1284e69b9481e1a512f7cab29913bf23b6a493c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121117 Tested-by: Jenkins Reviewed-by: Heiko Tietze diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc index 1b30c31fa1a0..0091b44b 100644 --- a/include/svx/strings.hrc +++ b/include/svx/strings.hrc @@ -1774,26 +1774,26 @@ // strings related to borders -#define RID_SVXSTR_TABLE_PRESET_NONE NC_("RID_SVXSTR_TABLE_PRESET_NONE", "Set No Borders") -#define RID_SVXSTR_TABLE_PRESET_ONLYOUTER NC_("RID_SVXSTR_TABLE_PRESET_ONLYOUTER", "Set Outer Border Only") -#define RID_SVXSTR_TABLE_PRESET_OUTERHORI NC_("RID_SVXSTR_TABLE_PRESET_OUTERHORI", "Set Outer Border and Horizontal Lines") -#define RID_SVXSTR_TABLE_PRESET_OUTERALL NC_("RID_SVXSTR_TABLE_PRESET_OUTERALL", "Set Outer Border and All Inner Lines") -#define RID_SVXSTR_TABLE_PRESET_OUTERVERI NC_("RID_SVXSTR_TABLE_PRESET_OUTERVERI", "Set Outer Border and Vertical Lines") -#define RID_SVXSTR_TABLE_PRESET_OUTERINNER NC_("RID_SVXSTR_TABLE_PRESET_OUTERINNER", "Set Outer Border Without Changing Inner Lines") -#define RID_SVXSTR_PARA_PRESET_DIAGONAL NC_("RID_SVXSTR_PARA_PRESET_DIAGONAL", "Set Diagonal Lines Only") -#define RID_SVXSTR_PARA_PRESET_DIAGONALLEFT NC_("RID_SVXSTR_PARA_PRESET_DIAGONALLEFT", "Set Diagonal Left Border") -#define RID_SVXSTR_PARA_PRESET_DIAGONALRIGHT NC_("RID_SVXSTR_PARA_PRESET_DIAGONALRIGHT", "Set Diagonal Right Border") -#define RID_SVXSTR_PARA_PRESET_CRISSCROSS NC_("RID_SVXSTR_PARA_PRESET_CRISSCROSS", "Set Criss-Cross Border") -#define RID_SVXSTR_PARA_PRESET_ALL NC_("RID_SVXSTR_PARA_PRESET_ALL", "Set All Four Borders") -#define RID_SVXSTR_PARA_PRESET_LEFTRIGHT NC_("RID_SVXSTR_PARA_PRESET_LEFTRIGHT", "Set Left and Right Borders Only") -#define RID_SVXSTR_PARA_PRESET_TOPBOTTOM NC_("RID_SVXSTR_PARA_PRESET_TOPBOTTOM", "Set Top and Bottom Borders Only") -#define RID_SVXSTR_PARA_PRESET_TOPBOTTOMHORI NC_("RID_SVXSTR_PARA_PRESET_TOPBOTTOMHORI", "Set Top and Bottom Borders, and All Horizontal Lines") -#define RID_SVXSTR_PARA_PRESET_ONLYLEFT NC_("RID_SVXSTR_PARA_PRESET_ONLYLEFT", "Set Left Border Only") -#define RID_SVXSTR_PARA_PRESET_ONLYRIGHT NC_("RID_SVXSTR_PARA_PRESET_ONLYRIGHT", "Set Right Border Only") -#define RID_SVXSTR_PARA_PRESET_ONLYTOP NC_("RID_SVXSTR_PARA_PRESET_ONLYTOP", "Set Top Border Only") -#define RID_SVXSTR_PARA_PRESET_ONLYTBOTTOM NC_("RID_SVXSTR_PARA_PRESET_ONLYTBOTTOM", "Set Bottom Border Only") -#define RID_SVXSTR_HOR_PRESET_ONLYHOR NC_("RID_SVXSTR_HOR_PRESET_ONLYHOR", "Set Top and Bottom Borders, and All Inner Lines") -#define RID_SVXSTR_VER_PRESET_ONLYVER NC_("RID_SVXSTR_VER_PRESET_ONLYVER", "Set Left and Right Borders, and All Inner Lines") +#define RID_SVXSTR_TABLE_PRESET_NONE NC_("RID_SVXSTR_TABLE_PRESET_NONE", "No Borders") +#define RID_SVXSTR_TABLE_PRESET_ONLYOUTER NC_("RID_SVXSTR_TABLE_PRESET_ONLYOUTER", "Outer Border Only") +#define RID_SVXSTR_TABLE_PRESET_OUTERHORI NC_("RID_SVXSTR_TABLE_PRESET_OUTERHORI", "Outer Border and Horizontal Lines") +#define RID_SVXSTR_TABLE_PRESET_OUTERALL NC_("RID_SVXSTR_TABLE_PRESET_OUTERALL", "Outer Border and All Inner Lines") +#define RID_SVXSTR_TABLE_PRESET_OUTERVERI NC_("RID_SVXSTR_TABLE_PRESET_OUTERVERI", "Outer Border and Vertical Lines") +#define RID_SVXSTR_TABLE_PRESET_OUTERINNER NC_("RID_SVXSTR_TABLE_PRESET_OUTERINNER", "Outer Border Without Changing Inner Lines") +#define RID_SVXSTR_PARA_PRESET_DIAGONAL NC_("RID_SVXSTR_PARA_PRESET_DIAGONAL", "Diagonal Lines Only") +#define RID_SVXSTR_PARA_PRESET_DIAGONALDOWN NC_("RID_SVXSTR_PARA_PRESET_DIAGONALDOWN", "Diagonal Down Border") +#define RID_SVXSTR_PARA_PRESET_DIAGONALUP NC_("RID_SVXSTR_PARA_PRESET_DIAGONALUP",
[Libreoffice-commits] core.git: include/svx sc/qa svx/inc svx/source svx/uiconfig
include/svx/strings.hrc|3 sc/qa/unit/ucalc.cxx | 74 svx/inc/bitmaps.hlst |3 svx/source/tbxctrls/tbcontrl.cxx | 199 + svx/uiconfig/ui/floatingframeborder.ui | 22 +-- 5 files changed, 244 insertions(+), 57 deletions(-) New commits: commit 3a9167e1b8a236da2862f4377e2040a8c189c99c Author: Bayram Çiçek AuthorDate: Wed Jul 14 21:25:05 2021 +0300 Commit: Muhammet Kara CommitDate: Mon Aug 23 13:20:26 2021 +0200 tdf#143919: Calc: add diagonal borders in Toolbar>Borders In "Table toolbar > Borders" tab; - Borders UI column size increased to 5 - diagonal left border icon added to 5th place - diagonal right border icon added to 10th place - criss-cross border icon added to 15th place - added diagonal left and diagonal right borders feature - implemented removing diagonal borders when set "no border" - added criss-cross line feature - added a unit test for diagonal borders Change-Id: I2dd7ab797b1a191eb650cc6340ee57d39e45a1ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118951 Tested-by: Jenkins Reviewed-by: Heiko Tietze Reviewed-by: Muhammet Kara diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc index e18af6a34981..d9b640774755 100644 --- a/include/svx/strings.hrc +++ b/include/svx/strings.hrc @@ -1782,6 +1782,9 @@ #define RID_SVXSTR_TABLE_PRESET_OUTERVERI NC_("RID_SVXSTR_TABLE_PRESET_OUTERVERI", "Set Outer Border and Vertical Lines") #define RID_SVXSTR_TABLE_PRESET_OUTERINNER NC_("RID_SVXSTR_TABLE_PRESET_OUTERINNER", "Set Outer Border Without Changing Inner Lines") #define RID_SVXSTR_PARA_PRESET_DIAGONAL NC_("RID_SVXSTR_PARA_PRESET_DIAGONAL", "Set Diagonal Lines Only") +#define RID_SVXSTR_PARA_PRESET_DIAGONALLEFT NC_("RID_SVXSTR_PARA_PRESET_DIAGONALLEFT", "Set Diagonal Left Border") +#define RID_SVXSTR_PARA_PRESET_DIAGONALRIGHT NC_("RID_SVXSTR_PARA_PRESET_DIAGONALRIGHT", "Set Diagonal Right Border") +#define RID_SVXSTR_PARA_PRESET_CRISSCROSS NC_("RID_SVXSTR_PARA_PRESET_CRISSCROSS", "Set Criss-Cross Border") #define RID_SVXSTR_PARA_PRESET_ALL NC_("RID_SVXSTR_PARA_PRESET_ALL", "Set All Four Borders") #define RID_SVXSTR_PARA_PRESET_LEFTRIGHT NC_("RID_SVXSTR_PARA_PRESET_LEFTRIGHT", "Set Left and Right Borders Only") #define RID_SVXSTR_PARA_PRESET_TOPBOTTOM NC_("RID_SVXSTR_PARA_PRESET_TOPBOTTOM", "Set Top and Bottom Borders Only") diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index f8ddc85a01a4..48ad56946d93 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -76,6 +76,7 @@ #include #include #include +#include #include #include @@ -179,6 +180,7 @@ public: void testSearchCells(); void testFormulaPosition(); void testFormulaWizardSubformula(); +void testDiagonalBorders(); /** * Make sure the sheet streams are invalidated properly. @@ -301,6 +303,7 @@ public: CPPUNIT_TEST(testSearchCells); CPPUNIT_TEST(testFormulaPosition); CPPUNIT_TEST(testFormulaWizardSubformula); +CPPUNIT_TEST(testDiagonalBorders); CPPUNIT_TEST(testJumpToPrecedentsDependents); CPPUNIT_TEST(testSetBackgroundColor); CPPUNIT_TEST(testRenameTable); @@ -5923,6 +5926,77 @@ void Test::testFormulaWizardSubformula() m_pDoc->DeleteTab(0); } +void Test::testDiagonalBorders() +{ +m_pDoc->InsertTab(0, "Diagonal"); + +ScAddress aPos; +const editeng::SvxBorderLine* pLine; +const ScPatternAttr* pPat; + +// diagonal left border +::editeng::SvxBorderLine dLeftBorderLine( nullptr, 1 ); +SvxLineItem dLeftLineItem( ATTR_BORDER_TLBR ); +dLeftLineItem.SetLine(); + +// set diagonal left border to cell(A1) +m_pDoc->ApplyAttr(0, 0, 0, dLeftLineItem); + +aPos = { 0, 0, 0 }; +pPat = m_pDoc->GetPattern(aPos); +CPPUNIT_ASSERT(pPat); + +pLine = pPat->GetItem(ATTR_BORDER_TLBR).GetLine(); +CPPUNIT_ASSERT_MESSAGE("Diagonal left border was expected, but not found!", pLine); + +// diagonal right border +::editeng::SvxBorderLine dRightBorderLine( nullptr, 1 ); +SvxLineItem dRightLineItem( ATTR_BORDER_BLTR ); +dRightLineItem.SetLine(); + +// set diagonal right border to cell(A2) +m_pDoc->ApplyAttr(0, 1, 0, dRightLineItem); + +aPos = { 0, 1, 0 }; +pPat = m_pDoc->GetPattern(aPos); +CPPUNIT_ASSERT(pPat); + +pLine = pPat->GetItem(ATTR_BORDER_BLTR).GetLine(); +CPPUNIT_ASSERT_MESSAGE("Diagonal right border was expected, but not found!", pLine); + +// diagonal left and right border in the same cell (A5) +m_pDoc->ApplyAttr(0, 4, 0, dLeftLineItem); +m_pDoc->ApplyAttr(0, 4, 0, dRightLineItem); + +// test if both borders are applied successfully in the same cell (A5) +aPos = { 0, 4, 0 }; +pPat =
[Libreoffice-commits] core.git: editeng/source sw/inc sw/source
editeng/source/editeng/editview.cxx |7 ++- sw/inc/AnnotationWin.hxx |1 + sw/source/uibase/docvw/AnnotationWin2.cxx| 17 - sw/source/uibase/docvw/SidebarTxtControl.cxx |2 ++ 4 files changed, 21 insertions(+), 6 deletions(-) New commits: commit 4bb59cd1f45133994d3d13642367470f528094f4 Author: Bayram Çiçek AuthorDate: Thu Jul 8 12:56:23 2021 +0300 Commit: Muhammet Kara CommitDate: Fri Aug 20 11:13:21 2021 +0200 tdf#91519: prevent jump to top of the comment view In Writer, there are 3 issues about comment section: - comment section scrolls to top of its view when clicking inside a comment view. - clicking inside a comment view, scrolls the view to old cursor location automatically (if old cursor out of the visible area) - comment section scrolls automatically to the old *selected* text (if it's out of visible area) when clicking inside the Writer canvas view this commit is intended to solve these issues Change-Id: If7d62373f5215adea85512b66b78736e04e02c3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118638 Tested-by: Jenkins Reviewed-by: Muhammet Kara diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 512a3bf54915..1d4ebfae186c 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -282,7 +282,12 @@ void EditView::SetSelection( const ESelection& rESel ) pImpEditView->SetEditSelection( aNewSelection ); pImpEditView->DrawSelectionXOR(); bool bGotoCursor = pImpEditView->DoAutoScroll(); -ShowCursor( bGotoCursor ); + +// comments section in Writer: +// don't scroll to the selection if it is +// out of visible area of comment canvas. +if (HasSelection()) +ShowCursor( bGotoCursor ); } ESelection EditView::GetSelection() const diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx index 53ae31f83b10..24c3c5792976 100644 --- a/sw/inc/AnnotationWin.hxx +++ b/sw/inc/AnnotationWin.hxx @@ -122,6 +122,7 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin final : public InterimItemWindow voidDoResize(); voidResizeIfNecessary(tools::Long aOldHeight, tools::Long aNewHeight); voidSetScrollbar(); +voidLockView(bool bLock); voidSetVirtualPosSize( const Point& aPoint, const Size& aSize); Point VirtualPos(){ return mPosSize.TopLeft(); } diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx index 12988e4d3343..19f663f9895c 100644 --- a/sw/source/uibase/docvw/AnnotationWin2.cxx +++ b/sw/source/uibase/docvw/AnnotationWin2.cxx @@ -994,7 +994,10 @@ void SwAnnotationWin::ActivatePostIt() CheckMetaText(); SetViewState(ViewState::EDIT); -GetOutlinerView()->ShowCursor(); + +// prevent autoscroll to the old cursor location +// when cursor out of visible area +GetOutlinerView()->ShowCursor(false); mpOutlinerView->GetEditView().SetInsertMode(mrView.GetWrtShellPtr()->IsInsMode()); @@ -1168,10 +1171,10 @@ bool SwAnnotationWin::SetActiveSidebarWin() { if (mrMgr.GetActiveSidebarWin() == this) return false; -const bool bLockView = mrView.GetWrtShell().IsViewLocked(); mrView.GetWrtShell().LockView( true ); mrMgr.SetActiveSidebarWin(this); -mrView.GetWrtShell().LockView( bLockView ); +mrView.GetWrtShell().LockView( true ); + return true; } @@ -1179,10 +1182,14 @@ void SwAnnotationWin::UnsetActiveSidebarWin() { if (mrMgr.GetActiveSidebarWin() != this) return; -const bool bLockView = mrView.GetWrtShell().IsViewLocked(); mrView.GetWrtShell().LockView( true ); mrMgr.SetActiveSidebarWin(nullptr); -mrView.GetWrtShell().LockView( bLockView ); +mrView.GetWrtShell().LockView( false ); +} + +void SwAnnotationWin::LockView(bool bLock) +{ +mrView.GetWrtShell().LockView( bLock ); } IMPL_LINK(SwAnnotationWin, ScrollHdl, weld::ScrolledWindow&, rScrolledWindow, void) diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx index b9dde38dc1a7..ba544b7c88dd 100644 --- a/sw/source/uibase/docvw/SidebarTxtControl.cxx +++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx @@ -147,6 +147,8 @@ void SidebarTextControl::LoseFocus() { Invalidate(); } +// set false for autoscroll to typing location +mrSidebarWin.LockView(false); } OUString SidebarTextControl::RequestHelp(tools::Rectangle& rHelpRect)
[Libreoffice-commits] core.git: sw/source
sw/source/core/graphic/ndgrf.cxx | 29 + 1 file changed, 25 insertions(+), 4 deletions(-) New commits: commit 59aed1d334de21270628c784920c61f2b8eb1da0 Author: Bayram Çiçek AuthorDate: Mon Jun 7 07:24:05 2021 +0300 Commit: Muhammet Kara CommitDate: Tue Jun 8 22:09:19 2021 +0200 tdf#104995: Fix opposite cropping issue on flipped images in Writer In Writer, cropping an flipped image crops the opposite side of the image instead of the selected side. Fix: update crop values after the flipping(mirroring). Change-Id: I55cfed086bbf63b0c516e1cb6b2624c02b04a6da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116770 Tested-by: Jenkins Reviewed-by: Muhammet Kara diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index 83e8a33a3527..680f142ef1d6 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -775,10 +775,31 @@ GraphicAttr& SwGrfNode::GetGraphicAttr( GraphicAttr& rGA, rGA.SetMirrorFlags( nMirror ); const SwCropGrf& rCrop = rSet.GetCropGrf(); -rGA.SetCrop( convertTwipToMm100( rCrop.GetLeft() ), - convertTwipToMm100( rCrop.GetTop() ), - convertTwipToMm100( rCrop.GetRight() ), - convertTwipToMm100( rCrop.GetBottom() )); + +tools::Long nCropLeft = rCrop.GetLeft(); +tools::Long nCropTop = rCrop.GetTop(); +tools::Long nCropRight = rCrop.GetRight(); +tools::Long nCropBottom = rCrop.GetBottom(); + +// take mirroring of crop values into consideration +// while cropping a flipped image. otherwise, +// cropping will crop the opposite side of the image. +if (rGA.GetMirrorFlags() & BmpMirrorFlags::Vertical) +{ +nCropTop = rCrop.GetBottom(); +nCropBottom = rCrop.GetTop(); +} + +if (rGA.GetMirrorFlags() & BmpMirrorFlags::Horizontal) +{ +nCropLeft = rCrop.GetRight(); +nCropRight = rCrop.GetLeft(); +} + +rGA.SetCrop( convertTwipToMm100( nCropLeft ), + convertTwipToMm100( nCropTop ), + convertTwipToMm100( nCropRight ), + convertTwipToMm100( nCropBottom )); const SwRotationGrf& rRotation = rSet.GetRotationGrf(); rGA.SetRotation( rRotation.GetValue() ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: cui/source
cui/source/tabpages/tpbitmap.cxx |2 ++ cui/source/tabpages/tpcolor.cxx |6 -- cui/source/tabpages/tpgradnt.cxx |2 ++ cui/source/tabpages/tphatch.cxx |2 ++ cui/source/tabpages/tppattern.cxx |2 ++ 5 files changed, 12 insertions(+), 2 deletions(-) New commits: commit fae6f9fc498e1ac258844ee2712888710d530d0f Author: Bayram Çiçek AuthorDate: Sat May 29 21:18:48 2021 +0300 Commit: Muhammet Kara CommitDate: Tue Jun 8 20:49:52 2021 +0200 tdf#109388: Mouseover effect added to palettes in the Area tab In 'Format > Page Style... > Area' Tab, Mouseover effect added to the palettes on Color, Gradient, Bitmap, Pattern and Hatch sections. Change-Id: Idf036adc01b6b2ef6d62d2dd670ed6fb432bfbf9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116395 Tested-by: Jenkins Reviewed-by: Muhammet Kara diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 39e1a18dda4d..bbc763a953c8 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -127,6 +127,8 @@ SvxBitmapTabPage::SvxBitmapTabPage(weld::Container* pPage, weld::DialogControlle SetFieldUnit( *m_xBitmapWidth, meFieldUnit, true ); SetFieldUnit( *m_xBitmapHeight, meFieldUnit, true ); +m_xBitmapLB->SetStyle(WB_FLATVALUESET | WB_NO_DIRECTSELECT | WB_TABSTOP); + SfxViewShell* pViewShell = SfxViewShell::Current(); if( pViewShell ) mpView = pViewShell->GetDrawView(); diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx index 619fc4ad76dc..7be82dca2676 100644 --- a/cui/source/tabpages/tpcolor.cxx +++ b/cui/source/tabpages/tpcolor.cxx @@ -133,10 +133,12 @@ SvxColorTabPage::SvxColorTabPage(weld::Container* pPage, weld::DialogController* m_xCMYKpreset->set_sensitive(false); // ValueSet -m_xValSetColorList->SetStyle(m_xValSetColorList->GetStyle() | WB_ITEMBORDER); +m_xValSetColorList->SetStyle(m_xValSetColorList->GetStyle() | +WB_FLATVALUESET | WB_ITEMBORDER | WB_NO_DIRECTSELECT | WB_TABSTOP); m_xValSetColorList->Show(); -m_xValSetRecentList->SetStyle(m_xValSetRecentList->GetStyle() | WB_ITEMBORDER); +m_xValSetRecentList->SetStyle(m_xValSetRecentList->GetStyle() | +WB_FLATVALUESET | WB_ITEMBORDER | WB_NO_DIRECTSELECT | WB_TABSTOP); m_xValSetRecentList->Show(); maPaletteManager.ReloadRecentColorSet(*m_xValSetRecentList); diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index 56814081b20b..00b01bd0ce33 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -110,6 +110,8 @@ SvxGradientTabPage::SvxGradientTabPage(weld::Container* pPage, weld::DialogContr m_xMtrColorTo->connect_value_changed( aLink ); m_xLbColorTo->SetSelectHdl( aLink3 ); +m_xGradientLB->SetStyle(WB_FLATVALUESET | WB_NO_DIRECTSELECT | WB_TABSTOP); + // #i76307# always paint the preview in LTR, because this is what the document does m_aCtlPreview.EnableRTL(false); } diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx index bcf2588675b5..2b9bb9401482 100644 --- a/cui/source/tabpages/tphatch.cxx +++ b/cui/source/tabpages/tphatch.cxx @@ -112,6 +112,8 @@ SvxHatchTabPage::SvxHatchTabPage(weld::Container* pPage, weld::DialogController* m_xBtnAdd->connect_clicked( LINK( this, SvxHatchTabPage, ClickAddHdl_Impl ) ); m_xBtnModify->connect_clicked( LINK( this, SvxHatchTabPage, ClickModifyHdl_Impl ) ); +m_xHatchLB->SetStyle(WB_FLATVALUESET | WB_NO_DIRECTSELECT | WB_TABSTOP); + m_aCtlPreview.SetDrawMode(Application::GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR); } diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx index 598ffb5304be..5fe830715b7f 100644 --- a/cui/source/tabpages/tppattern.cxx +++ b/cui/source/tabpages/tppattern.cxx @@ -110,6 +110,8 @@ SvxPatternTabPage::SvxPatternTabPage(weld::Container* pPage, weld::DialogControl m_xPatternLB->SetDeleteHdl( LINK( this, SvxPatternTabPage, ClickDeleteHdl_Impl ) ); m_xLbColor->SetSelectHdl( LINK( this, SvxPatternTabPage, ChangeColorHdl_Impl ) ); m_xLbBackgroundColor->SetSelectHdl( LINK( this, SvxPatternTabPage, ChangeColorHdl_Impl ) ); + +m_xPatternLB->SetStyle(WB_FLATVALUESET | WB_NO_DIRECTSELECT | WB_TABSTOP); } SvxPatternTabPage::~SvxPatternTabPage() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: framework/source
framework/source/uielement/recentfilesmenucontroller.cxx | 18 ++- 1 file changed, 17 insertions(+), 1 deletion(-) New commits: commit 6fcabbd6199869753fd6a266f23901962a77f556 Author: Bayram Çiçek AuthorDate: Wed Mar 3 21:57:11 2021 +0300 Commit: Adolfo Jayme Barrientos CommitDate: Tue Apr 6 15:52:58 2021 +0200 tdf#129153: Show MIME type icon in main menu File>Recent documents list - MIME type icons added for all items of the recent documents list. - It respects the user choice about "show icons in menus" configuration. (e.g. under gtk3) Change-Id: Icd94880fcda06ab2e2d9615a03be5d3373799314 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111934 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx index a5792d29b224..ee22dd306a5e 100644 --- a/framework/source/uielement/recentfilesmenucontroller.cxx +++ b/framework/source/uielement/recentfilesmenucontroller.cxx @@ -28,6 +28,9 @@ #include #include #include +#include +#include +#include using namespace css; using namespace com::sun::star::uno; @@ -131,6 +134,7 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > int nPickListMenuItems = std::min( aHistoryList.getLength(), MAX_MENU_ITEMS ); m_aRecentFilesItems.clear(); + if (( nPickListMenuItems > 0 ) && !m_bDisabled ) { for ( int i = 0; i < nPickListMenuItems; i++ ) @@ -181,6 +185,9 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > INetURLObject aURL( m_aRecentFilesItems[i] ); OUString aTipHelpText( aURL.getFSysPath( FSysStyle::Detect ) ); +StyleSettings aIconSettings; +bool aIsIconsAllowed = aIconSettings.GetUseImagesInMenus(); + if ( aURL.GetProtocol() == INetProtocol::File ) { // Do handle file URL differently: don't show the protocol, just the file name @@ -195,6 +202,12 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > aMenuShortCut.append( aMenuTitle ); pVCLPopupMenu->InsertItem( sal_uInt16( i+1 ), aMenuShortCut.makeStringAndClear() ); + +if ( aIsIconsAllowed ) { +Image aThumbnail = SvFileInformationManager::GetImage(aURL); +pVCLPopupMenu->SetItemImage(sal_uInt16 ( i+1 ), aThumbnail); +} + pVCLPopupMenu->SetTipHelpText( sal_uInt16( i+1 ), aTipHelpText ); pVCLPopupMenu->SetItemCommand( sal_uInt16( i+1 ), aURLString ); } @@ -225,7 +238,10 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > } else { -// No recent documents => insert "no document" string +// Add InsertSeparator(), otherwise it will display +// the first item icon of recent files instead of displaying no icon. +pVCLPopupMenu->InsertSeparator(); +// No recent documents => insert "no documents" string pVCLPopupMenu->InsertItem( 1, FwkResId(STR_NODOCUMENT) ); // Do not disable it, otherwise the Toolbar controller and MenuButton // will display SV_RESID_STRING_NOSELECTIONPOSSIBLE instead of STR_NODOCUMENT ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: desktop/source
desktop/source/deployment/manager/dp_extensionmanager.cxx | 59 +++--- 1 file changed, 33 insertions(+), 26 deletions(-) New commits: commit 7d3addde836bbd8d990a363562310b237213527a Author: Bayram Çiçek AuthorDate: Sun Mar 14 14:39:14 2021 +0300 Commit: Mike Kaganski CommitDate: Fri Mar 19 14:37:42 2021 +0100 tdf#122406: only restart when user accepted the license agreement In Tools > Extension Manager, LO requires restart after declining the license agreement on the *first* try. Don't need to restart LO because no change made. - Current location of fireModified() function doesn't respect this decision. - fireModified() has moved to proper location. Change-Id: I24cb7bcf93d1fff3172b6b4110f17aef00ef97a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112468 Tested-by: Mike Kaganski Reviewed-by: Mike Kaganski diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx index 63882cefdfd3..68a6fe08579d 100644 --- a/desktop/source/deployment/manager/dp_extensionmanager.cxx +++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx @@ -722,6 +722,39 @@ Reference ExtensionManager::addExtension( sNewExtensionIdentifier, sNewExtensionFileName, bUserDisabled2, false, xAbortChannel, Reference()); + +// if reached this section, +// this means that either the licensedialog.ui didn't popup, +// or user accepted the license agreement. otherwise +// no need to call fireModified() because user declined +// the license agreement therefore no change made. +try +{ +fireModified(); + +}catch ( const css::deployment::DeploymentException& ) { +throw; +} catch ( const ucb::CommandFailedException & ) { +throw; +} catch ( const ucb::CommandAbortedException & ) { +throw; +} catch (const lang::IllegalArgumentException &) { +throw; +} catch (const uno::RuntimeException &) { +throw; +} catch (const uno::Exception &) { +uno::Any excOccurred = ::cppu::getCaughtException(); +css::deployment::DeploymentException exc( +"Extension Manager: Exception on fireModified() " +"in the scope of 'if (failedPrereq == 0)'", +static_cast(this), excOccurred); +throw exc; +} catch (...) { +throw uno::RuntimeException( +"Extension Manager: RuntimeException on fireModified() " +"in the scope of 'if (failedPrereq == 0)'", +static_cast(this)); +} } else { @@ -780,32 +813,6 @@ Reference ExtensionManager::addExtension( } } // leaving the guarded section (getMutex()) -try -{ -fireModified(); - -}catch ( const css::deployment::DeploymentException& ) { -throw; -} catch ( const ucb::CommandFailedException & ) { -throw; -} catch ( const ucb::CommandAbortedException & ) { -throw; -} catch (const lang::IllegalArgumentException &) { -throw; -} catch (const uno::RuntimeException &) { -throw; -} catch (const uno::Exception &) { -uno::Any excOccurred = ::cppu::getCaughtException(); -css::deployment::DeploymentException exc( -"Extension Manager: exception in doChecksForAddExtension", -static_cast(this), excOccurred); -throw exc; -} catch (...) { -throw uno::RuntimeException( -"Extension Manager: unexpected exception in doChecksForAddExtension", -static_cast(this)); -} - return xNewExtension; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: idl/source reportdesign/source sc/source sd/source sw/source vcl/source
idl/source/objects/module.cxx |2 +- idl/source/objects/object.cxx |2 +- idl/source/objects/slot.cxx |2 +- reportdesign/source/ui/report/dlgedfunc.cxx |4 ++-- sc/source/core/tool/chartpos.cxx|7 +++ sc/source/filter/excel/xiname.cxx |2 +- sd/source/core/drawdoc_animations.cxx |2 +- sw/source/filter/xml/xmltbli.cxx|4 ++-- vcl/source/window/toolbox2.cxx |4 ++-- 9 files changed, 14 insertions(+), 15 deletions(-) New commits: commit a88effc4f53da8ae476f6a9f24b96e5948b17bee Author: Bayram Çiçek AuthorDate: Sun Feb 14 19:11:12 2021 + Commit: Michael Stahl CommitDate: Thu Mar 11 11:37:49 2021 +0100 tdf#114441: Convert use of sal_uLong to better integer types Change-Id: Ibb432c3db6d99343514c412c4c1b968808b733c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110886 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx index 17c483a3243e..e97dd29d651c 100644 --- a/idl/source/objects/module.cxx +++ b/idl/source/objects/module.cxx @@ -26,7 +26,7 @@ SvMetaModule::SvMetaModule() {} void SvMetaModule::WriteSfx(SvIdlDataBase& rBase, SvStream& rOutStm) { -for (sal_uLong n = 0; n < aClassList.size(); n++) +for (size_t n = 0; n < aClassList.size(); n++) { SvMetaClass* pClass = aClassList[n]; pClass->WriteSfx(rBase, rOutStm); diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx index a424bb748044..1c8299b132d4 100644 --- a/idl/source/objects/object.cxx +++ b/idl/source/objects/object.cxx @@ -106,7 +106,7 @@ bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm, SAL_WARN( "idl", "new slot : " << rAttr.GetSlotId().getString() ); } -for( sal_uLong n = 0; n < aAttrList.size(); n++ ) +for( size_t n = 0; n < aAttrList.size(); n++ ) { SvMetaAttribute * pS = aAttrList[n]; if( pS->GetName() == rAttr.GetName() ) diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx index 30b6b1fe0eca..fcdbbb8e95d0 100644 --- a/idl/source/objects/slot.cxx +++ b/idl/source/objects/slot.cxx @@ -579,7 +579,7 @@ sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rO const SvRefMemberList& rList = pType->GetAttrList(); -for( sal_uLong n = 0; n < rList.size(); n++ ) +for( size_t n = 0; n < rList.size(); n++ ) { SvMetaAttribute * pPar = rList[n]; SvMetaType * pPType = pPar->GetType(); diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx index 4e653cb87930..d2be2d012406 100644 --- a/reportdesign/source/ui/report/dlgedfunc.cxx +++ b/reportdesign/source/ui/report/dlgedfunc.cxx @@ -411,8 +411,8 @@ void DlgEdFunc::deactivateOle(bool _bSelect) { OLEObjCache& rObjCache = GetSdrGlobalData().GetOLEObjCache(); OReportController& rController = m_pParent->getSectionWindow()->getViewsWindow()->getView()->getReportView()->getController(); -const sal_uLong nCount = rObjCache.size(); -for(sal_uLong i = 0 ; i< nCount;++i) +const size_t nCount = rObjCache.size(); +for(size_t i = 0 ; i < nCount;++i) { SdrOle2Obj* pObj = rObjCache[i]; if ( m_pParent->getPage() == pObj->getSdrPageFromSdrObject() ) diff --git a/sc/source/core/tool/chartpos.cxx b/sc/source/core/tool/chartpos.cxx index 48e734ec2454..aee7df6583b6 100644 --- a/sc/source/core/tool/chartpos.cxx +++ b/sc/source/core/tool/chartpos.cxx @@ -422,11 +422,10 @@ void ScChartPositioner::CreatePositionMap() if ( bNoGlue ) { // fill gaps with Dummies, first column is master RowMap& rFirstCol = aColMap.begin()->second; -sal_uLong nCount = rFirstCol.size(); -RowMap::const_iterator it1 = rFirstCol.begin(); -for ( sal_uLong n = 0; n < nCount; n++, ++it1 ) + +for ( auto& it1 : rFirstCol ) { -sal_uLong nKey = it1->first; +sal_uLong nKey = it1.first; for (ColumnMap::iterator it2 = ++aColMap.begin(); it2 != aColMap.end(); ++it2 ) it2->second.emplace( nKey, nullptr ); // no data } diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx index 11d1d753963a..d498dfba492c 100644 --- a/sc/source/filter/excel/xiname.cxx +++ b/sc/source/filter/excel/xiname.cxx @@ -282,7 +282,7 @@ XclImpNameManager::XclImpNameManager( const XclImpRoot& rRoot ) : void XclImpNameManager::ReadName( XclImpStream& rStrm ) { -sal_uLong nCount = maNameList.size(); +size_t nCount = maNameList.size(); if( nCount < 0x ) maNameList.push_back( std::make_unique( rStrm, static_cast< sal_uInt16 >( nCount + 1 ) ) ); } diff --git
[Libreoffice-commits] core.git: sax/source
sax/source/tools/converter.cxx | 139 - 1 file changed, 14 insertions(+), 125 deletions(-) New commits: commit bc817c2fb26ebbfcc7b6868fbcabb13772ddb90e Author: Bayram Çiçek AuthorDate: Wed Feb 17 02:33:23 2021 +0300 Commit: Michael Stahl CommitDate: Wed Feb 17 12:33:05 2021 +0100 tdf#39593: reduce copy/paste in Converter::convertDuration Change-Id: I520e10ef96c677be9f80bba510fe9c89295d416c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111008 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx index 18731b45ac77..f4f6dccb8ddc 100644 --- a/sax/source/tools/converter.cxx +++ b/sax/source/tools/converter.cxx @@ -921,13 +921,10 @@ static std::string_view trim(std::string_view in) { return std::string_view(&*left, std::distance(left, right) + 1); } -/** convert ISO "duration" string to double; negative durations allowed */ -bool Converter::convertDuration(double& rfTime, -std::u16string_view rString) +/** helper function of Converter::convertDuration */ +template +static bool convertDurationHelper(double& rfTime, V pStr) { -std::u16string_view aTrimmed = trim(rString); -const sal_Unicode* pStr = aTrimmed.data(); - // negative time duration? bool bIsNegativeDuration = false; if ( '-' == (*pStr) ) @@ -1049,6 +1046,16 @@ bool Converter::convertDuration(double& rfTime, return bSuccess; } +/** convert ISO "duration" string to double; negative durations allowed */ +bool Converter::convertDuration(double& rfTime, +std::u16string_view rString) +{ +std::u16string_view aTrimmed = trim(rString); +const sal_Unicode* pStr = aTrimmed.data(); + +return convertDurationHelper(rfTime, pStr); +} + /** convert ISO "duration" string to double; negative durations allowed */ bool Converter::convertDuration(double& rfTime, std::string_view rString) @@ -1056,125 +1063,7 @@ bool Converter::convertDuration(double& rfTime, std::string_view aTrimmed = trim(rString); const char* pStr = aTrimmed.data(); -// negative time duration? -bool bIsNegativeDuration = false; -if ( '-' == (*pStr) ) -{ -bIsNegativeDuration = true; -pStr++; -} - -if ( *pStr != 'P' && *pStr != 'p' )// duration must start with "P" -return false; -pStr++; - -OUStringBuffer sDoubleStr; -bool bSuccess = true; -bool bDone = false; -bool bTimePart = false; -bool bIsFraction = false; -sal_Int32 nDays = 0; -sal_Int32 nHours = 0; -sal_Int32 nMins = 0; -sal_Int32 nSecs = 0; -sal_Int32 nTemp = 0; - -while ( bSuccess && !bDone ) -{ -sal_Unicode c = *(pStr++); -if ( !c ) // end -bDone = true; -else if ( '0' <= c && '9' >= c ) -{ -if ( nTemp >= SAL_MAX_INT32 / 10 ) -bSuccess = false; -else -{ -if ( !bIsFraction ) -{ -nTemp *= 10; -nTemp += (c - u'0'); -} -else -{ -sDoubleStr.append(c); -} -} -} -else if ( bTimePart ) -{ -if ( c == 'H' || c == 'h' ) -{ -nHours = nTemp; -nTemp = 0; -} -else if ( c == 'M' || c == 'm') -{ -nMins = nTemp; -nTemp = 0; -} -else if ( (c == ',') || (c == '.') ) -{ -nSecs = nTemp; -nTemp = 0; -bIsFraction = true; -sDoubleStr = "0."; -} -else if ( c == 'S' || c == 's' ) -{ -if ( !bIsFraction ) -{ -nSecs = nTemp; -nTemp = 0; -sDoubleStr = "0.0"; -} -} -else -bSuccess = false; // invalid character -} -else -{ -if ( c == 'T' || c == 't' )// "T" starts time part -bTimePart = true; -else if ( c == 'D' || c == 'd') -{ -nDays = nTemp; -nTemp = 0; -} -else if ( c == 'Y' || c == 'y' || c == 'M' || c == 'm' ) -{ -//! how many days is a year or month? - -OSL_FAIL( "years or months in duration: not implemented"); -bSuccess = false; -} -else -bSuccess = false; // invalid character -} -} - -if ( bSuccess ) -{ -if ( nDays ) -nHours
[Libreoffice-commits] core.git: vcl/source
vcl/source/window/builder.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit c7d0f4452cd4eba2d180eb5bb9f8b0add048e5de Author: Bayram Çiçek AuthorDate: Fri Jan 29 07:46:57 2021 + Commit: Michael Stahl CommitDate: Mon Feb 1 12:44:22 2021 +0100 tdf#75280: Convert inappropriate use of sal_uIntPtr to better integer types Change-Id: I02cb5241f3769e6cb99029dfbf83d53cdf49806e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110123 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index a90efa8f9ce2..61bf3f487869 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -4208,7 +4208,7 @@ void VclBuilder::mungeModel(ComboBox , const ListStore , sal_uInt { if (m_bLegacy) { -sal_IntPtr nValue = rRow[1].toInt32(); +sal_Int32 nValue = rRow[1].toInt32(); rTarget.SetEntryData(nEntry, reinterpret_cast(nValue)); } else @@ -4235,7 +4235,7 @@ void VclBuilder::mungeModel(ListBox , const ListStore , sal_uInt1 { if (m_bLegacy) { -sal_IntPtr nValue = rRow[1].toInt32(); +sal_Int32 nValue = rRow[1].toInt32(); rTarget.SetEntryData(nEntry, reinterpret_cast(nValue)); } else @@ -4262,7 +4262,7 @@ void VclBuilder::mungeModel(SvTabListBox& rTarget, const ListStore , sal_ { if (m_bLegacy) { -sal_IntPtr nValue = rRow[1].toInt32(); +sal_Int32 nValue = rRow[1].toInt32(); pEntry->SetUserData(reinterpret_cast(nValue)); } else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: embeddedobj/source package/source sfx2/source svl/source xmloff/source
embeddedobj/source/msole/olepersist.cxx |2 +- package/source/xstor/owriteablestream.cxx |2 +- sfx2/source/doc/doctemplateslocal.cxx |2 +- svl/source/fsstor/fsfactory.cxx |2 +- xmloff/source/meta/xmlversion.cxx |2 +- 5 files changed, 5 insertions(+), 5 deletions(-) New commits: commit 32676270d194b68d7dd811511feb0903876b5c06 Author: Bayram Çiçek AuthorDate: Sun Jan 10 21:47:43 2021 + Commit: Michael Stahl CommitDate: Tue Jan 12 19:24:51 2021 +0100 tdf#42982: Improve UNO API error reporting Change-Id: I78c6fed4e94f1ebfc772db4dec9955da7230bc3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109071 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx index 2d5dfbf59a4d..04d5b6433c07 100644 --- a/embeddedobj/source/msole/olepersist.cxx +++ b/embeddedobj/source/msole/olepersist.cxx @@ -102,7 +102,7 @@ OUString GetNewTempFileURL_Impl( const uno::Reference< uno::XComponentContext >& } if ( aResult.isEmpty() ) -throw uno::RuntimeException(); // TODO: can not create tempfile +throw uno::RuntimeException("Cannot create tempfile."); return aResult; } diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx index 9655240c4602..77a34c533653 100644 --- a/package/source/xstor/owriteablestream.cxx +++ b/package/source/xstor/owriteablestream.cxx @@ -237,7 +237,7 @@ OUString GetNewTempFileURL( const uno::Reference< uno::XComponentContext >& rCon } if ( aTempURL.isEmpty() ) -throw uno::RuntimeException(); // TODO: can not create tempfile +throw uno::RuntimeException("Cannot create tempfile."); return aTempURL; } diff --git a/sfx2/source/doc/doctemplateslocal.cxx b/sfx2/source/doc/doctemplateslocal.cxx index d7c24934f89a..e72b74eb8efe 100644 --- a/sfx2/source/doc/doctemplateslocal.cxx +++ b/sfx2/source/doc/doctemplateslocal.cxx @@ -122,7 +122,7 @@ DocTemplLocaleHelper::~DocTemplLocaleHelper() std::vector< beans::StringPair > const & DocTemplLocaleHelper::GetParsingResult() const { if ( !m_aElementsSeq.empty() ) -throw uno::RuntimeException(); // the parsing has still not finished! +throw uno::RuntimeException("The parsing has still not finished!"); return m_aResultSeq; } diff --git a/svl/source/fsstor/fsfactory.cxx b/svl/source/fsstor/fsfactory.cxx index 91fe8d35f983..455e1b6ce590 100644 --- a/svl/source/fsstor/fsfactory.cxx +++ b/svl/source/fsstor/fsfactory.cxx @@ -40,7 +40,7 @@ uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::createInstance() OUString aTempURL = ::utl::TempFile( nullptr, true ).GetURL(); if ( aTempURL.isEmpty() ) -throw uno::RuntimeException(); // TODO: can not create tempfile +throw uno::RuntimeException("Cannot create tempfile."); ::ucbhelper::Content aResultContent( aTempURL, uno::Reference< ucb::XCommandEnvironment >(), diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx index 7776ea876427..1276e0e6fcdf 100644 --- a/xmloff/source/meta/xmlversion.cxx +++ b/xmloff/source/meta/xmlversion.cxx @@ -325,7 +325,7 @@ void SAL_CALL XMLVersionListPersistence::store( const uno::Reference< embed::XSt Reference< io::XOutputStream > xOut = xVerStream->getOutputStream(); if ( !xOut.is() ) -throw uno::RuntimeException(); // the stream was successfully opened for writing already +throw uno::RuntimeException("The stream was successfully opened for writing already!"); xWriter->setOutputStream(xOut); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: forms/source sdext/source sd/source sw/source
forms/source/xforms/model.cxx |2 +- forms/source/xforms/xforms_services.cxx |2 +- sd/source/ui/presenter/SlideRenderer.cxx|2 +- sdext/source/pdfimport/filterdet.cxx|2 +- sdext/source/pdfimport/pdfiadaptor.cxx |4 ++-- sw/source/uibase/sidebar/SwPanelFactory.cxx |2 +- 6 files changed, 7 insertions(+), 7 deletions(-) New commits: commit ea14c98aaba550ecde4c4736d1a3abdc0fd451ef Author: Bayram Çiçek AuthorDate: Fri Dec 25 17:00:30 2020 + Commit: Julien Nabet CommitDate: Sat Dec 26 17:15:18 2020 +0100 tdf#88205: Adapt uses of css::uno::Sequence to use initializer_list ctor Change-Id: Id4034a57580f37fd71f841deec9edfe9b7c26a67 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108286 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx index 5075222e1459..6eed4d7d06ed 100644 --- a/forms/source/xforms/model.cxx +++ b/forms/source/xforms/model.cxx @@ -610,7 +610,7 @@ sal_Bool Model::supportsService(OUString const & ServiceName) css::uno::Sequence Model::getSupportedServiceNames() { -return css::uno::Sequence{"com.sun.star.xforms.Model"}; +return {"com.sun.star.xforms.Model"}; } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/forms/source/xforms/xforms_services.cxx b/forms/source/xforms/xforms_services.cxx index 383afbaeb802..23a1ee400ffb 100644 --- a/forms/source/xforms/xforms_services.cxx +++ b/forms/source/xforms/xforms_services.cxx @@ -43,7 +43,7 @@ class Implementation: css::uno::Sequence SAL_CALL getSupportedServiceNames() override { -return css::uno::Sequence{"com.sun.star.xforms.XForms"}; +return {"com.sun.star.xforms.XForms"}; } }; diff --git a/sd/source/ui/presenter/SlideRenderer.cxx b/sd/source/ui/presenter/SlideRenderer.cxx index f8281e6319bb..3db4c7355ca5 100644 --- a/sd/source/ui/presenter/SlideRenderer.cxx +++ b/sd/source/ui/presenter/SlideRenderer.cxx @@ -70,7 +70,7 @@ sal_Bool SlideRenderer::supportsService(OUString const & ServiceName) css::uno::Sequence SlideRenderer::getSupportedServiceNames() { -return css::uno::Sequence{"com.sun.star.drawing.SlideRenderer"}; +return {"com.sun.star.drawing.SlideRenderer"}; } //- XSlideRenderer diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx index 88f617ecea89..7e6e72f4d707 100644 --- a/sdext/source/pdfimport/filterdet.cxx +++ b/sdext/source/pdfimport/filterdet.cxx @@ -396,7 +396,7 @@ sal_Bool PDFDetector::supportsService(OUString const & ServiceName) css::uno::Sequence PDFDetector::getSupportedServiceNames() { -return css::uno::Sequence{"com.sun.star.document.ImportFilter"}; +return {"com.sun.star.document.ImportFilter"}; } bool checkDocChecksum( const OUString& rInPDFFileURL, diff --git a/sdext/source/pdfimport/pdfiadaptor.cxx b/sdext/source/pdfimport/pdfiadaptor.cxx index 45f35320fe30..a8b045ca0ccc 100644 --- a/sdext/source/pdfimport/pdfiadaptor.cxx +++ b/sdext/source/pdfimport/pdfiadaptor.cxx @@ -201,7 +201,7 @@ sal_Bool PDFIHybridAdaptor::supportsService(OUString const & ServiceName) css::uno::Sequence PDFIHybridAdaptor::getSupportedServiceNames() { -return css::uno::Sequence{"com.sun.star.document.ImportFilter"}; +return {"com.sun.star.document.ImportFilter"}; } PDFIRawAdaptor::PDFIRawAdaptor( OUString const & implementationName, const uno::Reference< uno::XComponentContext >& xContext ) : @@ -323,7 +323,7 @@ sal_Bool PDFIRawAdaptor::supportsService(OUString const & ServiceName) css::uno::Sequence PDFIRawAdaptor::getSupportedServiceNames() { -return css::uno::Sequence{"com.sun.star.document.ImportFilter"}; +return {"com.sun.star.document.ImportFilter"}; } diff --git a/sw/source/uibase/sidebar/SwPanelFactory.cxx b/sw/source/uibase/sidebar/SwPanelFactory.cxx index db9e6f29458a..fcf297dc3100 100644 --- a/sw/source/uibase/sidebar/SwPanelFactory.cxx +++ b/sw/source/uibase/sidebar/SwPanelFactory.cxx @@ -74,7 +74,7 @@ public: { return cppu::supportsService(this, ServiceName); } css::uno::Sequence SAL_CALL getSupportedServiceNames() override -{ return css::uno::Sequence{"com.sun.star.ui.UIElementFactory"}; } +{ return {"com.sun.star.ui.UIElementFactory"}; } }; SwPanelFactory::SwPanelFactory() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sw/source toolkit/source
sw/source/ui/misc/titlepage.cxx |2 +- toolkit/source/awt/asynccallback.cxx |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 691f1cc959dab0418b28e7898825a6cae71b493e Author: Bayram Çiçek AuthorDate: Thu Dec 24 13:11:04 2020 + Commit: Julien Nabet CommitDate: Fri Dec 25 11:50:53 2020 +0100 tdf#88205: Adapt uses of css::uno::Sequence to use initializer_list ctor Change-Id: Ib9384b5106ef389b027787432c32e387a5f9ad81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108268 Reviewed-by: Julien Nabet Tested-by: Jenkins diff --git a/toolkit/source/awt/asynccallback.cxx b/toolkit/source/awt/asynccallback.cxx index d017b3e259bb..751647447092 100644 --- a/toolkit/source/awt/asynccallback.cxx +++ b/toolkit/source/awt/asynccallback.cxx @@ -76,7 +76,7 @@ sal_Bool SAL_CALL AsyncCallback::supportsService(OUString const & serviceName) css::uno::Sequence< OUString > SAL_CALL AsyncCallback::getSupportedServiceNames() { -return css::uno::Sequence< OUString >{ "com.sun.star.awt.AsyncCallback" }; +return { "com.sun.star.awt.AsyncCallback" }; } // css::awt::XRequestCallback: commit b905937211154b0e923312641f09629e68ed7901 Author: Julien Nabet AuthorDate: Fri Dec 25 10:46:51 2020 +0100 Commit: Julien Nabet CommitDate: Fri Dec 25 11:50:43 2020 +0100 tdf#139218: Title Page: fix "Reset page number", put default at 1 Change-Id: Ic3758d8eeeb1818e3be3ca5d815fa601a34e8dd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108279 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx index 26fa4bdeb564..06767dbe3844 100644 --- a/sw/source/ui/misc/titlepage.cxx +++ b/sw/source/ui/misc/titlepage.cxx @@ -205,10 +205,10 @@ SwTitlePageDlg::SwTitlePageDlg(weld::Window *pParent) m_xDocumentStartRB->connect_toggled(aStartPageHdl); m_xPageStartRB->connect_toggled(aStartPageHdl); +m_xRestartNumberingNF->set_value(nResetPage); if (bMaybeResetNumbering && nResetPage > 0) { m_xRestartNumberingCB->set_active(true); -m_xRestartNumberingNF->set_value(nResetPage); } m_xRestartNumberingNF->set_sensitive(m_xRestartNumberingCB->get_active()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/core/inc/unobookmark.hxx |5 + 1 file changed, 1 insertion(+), 4 deletions(-) New commits: commit 6a905223b6caefeace9c5037974462e0b94546f4 Author: Bayram Çiçek AuthorDate: Mon Nov 23 19:17:44 2020 + Commit: Julien Nabet CommitDate: Thu Dec 24 09:27:40 2020 +0100 tdf#124176: Use pragma once instead of include guards Change-Id: I49acd246a9675a0749e056178dec43d0d73c488e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106450 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/sw/source/core/inc/unobookmark.hxx b/sw/source/core/inc/unobookmark.hxx index 8ebbc373008f..05de670cff09 100644 --- a/sw/source/core/inc/unobookmark.hxx +++ b/sw/source/core/inc/unobookmark.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_SW_SOURCE_CORE_INC_UNOBOOKMARK_HXX -#define INCLUDED_SW_SOURCE_CORE_INC_UNOBOOKMARK_HXX +#pragma once #include #include @@ -241,6 +240,4 @@ public: }; -#endif // INCLUDED_SW_SOURCE_CORE_INC_UNOBOOKMARK_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/source
sw/source/core/inc/SwUndoTOXChange.hxx |5 + sw/source/core/inc/SwXMLBlockExport.hxx |5 + sw/source/core/inc/SwXMLBlockImport.hxx |5 + sw/source/core/inc/SwXMLTextBlocks.hxx |5 + sw/source/core/inc/SwXTextDefaults.hxx |5 ++--- 5 files changed, 6 insertions(+), 19 deletions(-) New commits: commit 42b0ea1993b7ea223c126f011c78ec4cdfce95ff Author: Bayram Çiçek AuthorDate: Tue Nov 24 10:50:05 2020 + Commit: Julien Nabet CommitDate: Tue Nov 24 18:21:46 2020 +0100 tdf#124176: Use pragma once instead of include guards Change-Id: I8df8d454ff1b65a5df2f1920b4d01f0925cbce33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106489 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/sw/source/core/inc/SwUndoTOXChange.hxx b/sw/source/core/inc/SwUndoTOXChange.hxx index cc47fd684d7b..b3acd453fc75 100644 --- a/sw/source/core/inc/SwUndoTOXChange.hxx +++ b/sw/source/core/inc/SwUndoTOXChange.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_SW_SOURCE_CORE_INC_SWUNDOTOXCHANGE_HXX -#define INCLUDED_SW_SOURCE_CORE_INC_SWUNDOTOXCHANGE_HXX +#pragma once #include #include @@ -43,6 +42,4 @@ public: virtual void RepeatImpl(::sw::RepeatContext&) override; }; -#endif // INCLUDED_SW_SOURCE_CORE_INC_SWUNDOTOXCHANGE_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/inc/SwXMLBlockExport.hxx b/sw/source/core/inc/SwXMLBlockExport.hxx index d858cfecfcc1..e34b2b3cbbbc 100644 --- a/sw/source/core/inc/SwXMLBlockExport.hxx +++ b/sw/source/core/inc/SwXMLBlockExport.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_SW_SOURCE_CORE_INC_SWXMLBLOCKEXPORT_HXX -#define INCLUDED_SW_SOURCE_CORE_INC_SWXMLBLOCKEXPORT_HXX +#pragma once #include @@ -61,6 +60,4 @@ public: void ExportContent_() override {} }; -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/inc/SwXMLBlockImport.hxx b/sw/source/core/inc/SwXMLBlockImport.hxx index 07a4dc69695c..baa88d4fcefd 100644 --- a/sw/source/core/inc/SwXMLBlockImport.hxx +++ b/sw/source/core/inc/SwXMLBlockImport.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_SW_SOURCE_CORE_INC_SWXMLBLOCKIMPORT_HXX -#define INCLUDED_SW_SOURCE_CORE_INC_SWXMLBLOCKIMPORT_HXX +#pragma once #include #include @@ -125,6 +124,4 @@ public: virtual sal_Int32 getTokenDirect( const char *pTag, sal_Int32 nLength ) const override; }; -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/inc/SwXMLTextBlocks.hxx b/sw/source/core/inc/SwXMLTextBlocks.hxx index 3d1feb1ec01c..8d30fb588d0d 100644 --- a/sw/source/core/inc/SwXMLTextBlocks.hxx +++ b/sw/source/core/inc/SwXMLTextBlocks.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_SW_SOURCE_CORE_INC_SWXMLTEXTBLOCKS_HXX -#define INCLUDED_SW_SOURCE_CORE_INC_SWXMLTEXTBLOCKS_HXX +#pragma once #include #include "swblocks.hxx" @@ -91,6 +90,4 @@ public: void MakeBlockText( const OUString& rText ); }; -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/inc/SwXTextDefaults.hxx b/sw/source/core/inc/SwXTextDefaults.hxx index f989600c54e6..b97698efdfd7 100644 --- a/sw/source/core/inc/SwXTextDefaults.hxx +++ b/sw/source/core/inc/SwXTextDefaults.hxx @@ -16,8 +16,8 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_SW_SOURCE_CORE_INC_SWXTEXTDEFAULTS_HXX -#define INCLUDED_SW_SOURCE_CORE_INC_SWXTEXTDEFAULTS_HXX + +#pragma once #include #include @@ -61,6 +61,5 @@ public: virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override; }; -#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits