[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - chart2/source

2022-06-14 Thread Aron Budea (via logerrit)
 chart2/source/controller/dialogs/dlg_DataEditor.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2c37dc951b08f92406d1fc74052e20eb7cba98f9
Author: Aron Budea 
AuthorDate: Tue Jun 14 05:18:02 2022 +0200
Commit: Xisco Fauli 
CommitDate: Tue Jun 14 21:45:45 2022 +0200

tdf#149536 Move Up/Down in Data Table switched enabled statuses

Regression from aa7e7747f4296b3b92379c3c7703b80ad8af6a8b.

Change-Id: Id2b66b2e87fdb13a55b32a4989cae2c7796fd003
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135801
Tested-by: Jenkins
Reviewed-by: Aron Budea 
(cherry picked from commit b33d89d8e97ba4bfb17743632dee471727d11ac5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135848
Reviewed-by: Xisco Fauli 

diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.cxx 
b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
index 3cb9598cb2e9..c2b74e8336f3 100644
--- a/chart2/source/controller/dialogs/dlg_DataEditor.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataEditor.cxx
@@ -113,8 +113,8 @@ IMPL_LINK_NOARG(DataEditor, BrowserCursorMovedHdl, 
DataBrowser*, void)
 
 m_xTbxData->set_item_sensitive("MoveLeftColumn", bIsDataValid && 
m_xBrwData->MayMoveLeftColumns() );
 m_xTbxData->set_item_sensitive("MoveRightColumn", bIsDataValid && 
m_xBrwData->MayMoveRightColumns() );
-m_xTbxData->set_item_sensitive("MoveUpRow", bIsDataValid && 
m_xBrwData->MayMoveDownRows() );
-m_xTbxData->set_item_sensitive("MoveDownRow", bIsDataValid && 
m_xBrwData->MayMoveUpRows() );
+m_xTbxData->set_item_sensitive("MoveDownRow", bIsDataValid && 
m_xBrwData->MayMoveDownRows() );
+m_xTbxData->set_item_sensitive("MoveUpRow", bIsDataValid && 
m_xBrwData->MayMoveUpRows() );
 }
 
 // disable all modifying controls


[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - chart2/source include/sfx2 sc/source sfx2/source

2022-04-14 Thread Caolán McNamara (via logerrit)
 chart2/source/controller/dialogs/tp_Scale.cxx |7 +++
 include/sfx2/dialoghelper.hxx |5 +++--
 sc/source/ui/miscdlgs/sharedocdlg.cxx |6 +++---
 sfx2/source/dialog/dialoghelper.cxx   |8 
 sfx2/source/dialog/versdlg.cxx|8 
 5 files changed, 21 insertions(+), 13 deletions(-)

New commits:
commit 5d9ba65897d2ba2998e43e97b25dbb9a560a16a1
Author: Caolán McNamara 
AuthorDate: Wed Apr 13 16:49:27 2022 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Apr 14 11:12:44 2022 +0200

Resolves: tdf#141625 give enough space to see full date+time

Change-Id: I31193783231f27494ed1507faa143697e8facc30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132987
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx 
b/chart2/source/controller/dialogs/tp_Scale.cxx
index 6c7effde6707..3bb247a7075b 100644
--- a/chart2/source/controller/dialogs/tp_Scale.cxx
+++ b/chart2/source/controller/dialogs/tp_Scale.cxx
@@ -26,6 +26,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -558,6 +559,12 @@ void ScaleTabPage::SetNumFormat()
 nFmt = pNumFormatter->GetStandardFormat( 
SvNumFormatType::TIME, pFormat->GetLanguage() );
 else
 nFmt = pNumFormatter->GetStandardFormat( SvNumFormatType::TIME 
);
+
+// tdf#141625 give enough space to see full date+time
+int 
nWidestTime(m_xFmtFldMin->get_pixel_size(getWidestDateTime(Application::GetSettings().GetLocaleDataWrapper(),
 true)).Width());
+int nWidthChars = std::ceil(nWidestTime / 
m_xFmtFldMin->get_approximate_digit_width()) + 1;
+m_xFmtFldMin->set_width_chars(nWidthChars);
+m_xFmtFldMax->set_width_chars(nWidthChars);
 }
 
 if( m_nAxisType == chart2::AxisType::DATE && ( eType != 
SvNumFormatType::DATE && eType != SvNumFormatType::DATETIME) )
diff --git a/include/sfx2/dialoghelper.hxx b/include/sfx2/dialoghelper.hxx
index e76304ac6808..a853d5d9de5c 100644
--- a/include/sfx2/dialoghelper.hxx
+++ b/include/sfx2/dialoghelper.hxx
@@ -31,9 +31,10 @@ Size SFX2_DLLPUBLIC getPreviewStripSize(const OutputDevice& 
rReference);
 
 Size SFX2_DLLPUBLIC getPreviewOptionsSize(const OutputDevice& rReference);
 
-OUString SFX2_DLLPUBLIC getWidestTime(const LocaleDataWrapper& rWrapper);
+OUString SFX2_DLLPUBLIC getWidestDateTime(const LocaleDataWrapper& rWrapper, 
bool bWithSec);
 
-OUString SFX2_DLLPUBLIC formatTime(const DateTime& rDateTime, const 
LocaleDataWrapper& rWrapper);
+OUString SFX2_DLLPUBLIC formatDateTime(const DateTime& rDateTime, const 
LocaleDataWrapper& rWrapper,
+   bool bWithSec);
 
 #endif
 
diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx 
b/sc/source/ui/miscdlgs/sharedocdlg.cxx
index ec019fb70655..294a69e93c2b 100644
--- a/sc/source/ui/miscdlgs/sharedocdlg.cxx
+++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx
@@ -39,7 +39,7 @@ using namespace ::com::sun::star;
 
 IMPL_LINK(ScShareDocumentDlg, SizeAllocated, const Size&, rSize, void)
 {
-OUString sWidestAccessString = getWidestTime(ScGlobal::getLocaleData());
+OUString sWidestAccessString = 
getWidestDateTime(ScGlobal::getLocaleData(), false);
 const int nAccessWidth = 
m_xLbUsers->get_pixel_size(sWidestAccessString).Width() * 2;
 std::vector aWidths
 {
@@ -151,7 +151,7 @@ void ScShareDocumentDlg::UpdateView()
 tools::Time aTime( nHours, nMinutes );
 DateTime aDateTime( aDate, aTime );
 
-OUString aString = formatTime(aDateTime, 
ScGlobal::getLocaleData());
+OUString aString = formatDateTime(aDateTime, 
ScGlobal::getLocaleData(), false);
 
 m_xLbUsers->append_text(aUser);
 m_xLbUsers->set_text(m_xLbUsers->n_children() - 1, 
aString, 1);
@@ -201,7 +201,7 @@ void ScShareDocumentDlg::UpdateView()
 util::DateTime uDT(xDocProps->getModificationDate());
 DateTime aDateTime(uDT);
 
-OUString aString = formatTime(aDateTime, ScGlobal::getLocaleData()) + 
" " +
+OUString aString = formatDateTime(aDateTime, 
ScGlobal::getLocaleData(), false) + " " +
 ScGlobal::getLocaleData().getTime( aDateTime, false );
 
 m_xLbUsers->append_text(aUser);
diff --git a/sfx2/source/dialog/dialoghelper.cxx 
b/sfx2/source/dialog/dialoghelper.cxx
index 93e697b29517..9585c8baac80 100644
--- a/sfx2/source/dialog/dialoghelper.cxx
+++ b/sfx2/source/dialog/dialoghelper.cxx
@@ -32,17 +32,17 @@ Size getPreviewOptionsSize(const OutputDevice& rReference)
 return rReference.LogicToPixel(Size(70, 27), MapMode(MapUnit::MapAppFont));
 }
 
-OUString getWidestTime(const LocaleDataWrapper& rWrapper)
+OUString getWidestDateTime(const LocaleDataWrapper& rWrapper, bool bWithSec)
 {
 Date aDate(22, 12, 2000);
 

[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - chart2/source

2022-03-07 Thread Caolán McNamara (via logerrit)
 chart2/source/controller/dialogs/res_LegendPosition.cxx |7 ++-
 chart2/source/controller/inc/res_LegendPosition.hxx |1 +
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 161c27e9884bc1b3aa92f0fd50fe17a9e11c8dc6
Author: Caolán McNamara 
AuthorDate: Mon Feb 21 11:54:04 2022 +
Commit: Xisco Fauli 
CommitDate: Mon Mar 7 15:12:03 2022 +0100

cid#1500515 Dereference after null check

Change-Id: I6483c3a036c5c56c8c6515b5b8f08720c8bd1a6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130257
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx 
b/chart2/source/controller/dialogs/res_LegendPosition.cxx
index 5ad9fe1ac63d..97318f59aeb3 100644
--- a/chart2/source/controller/dialogs/res_LegendPosition.cxx
+++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx
@@ -85,7 +85,7 @@ void LegendPositionResources::writeToResources( const 
uno::Reference< frame::XMo
 xProp->getPropertyValue( "Show" ) >>= bShowLegend;
 if (m_xCbxShow)
 m_xCbxShow->set_active( bShowLegend );
-PositionEnableHdl(*m_xCbxShow);
+PositionEnable();
 
 //position
 chart2::LegendPosition ePos;
@@ -159,6 +159,11 @@ void LegendPositionResources::writeToModel( const 
css::uno::Reference< frame::XM
 }
 
 IMPL_LINK_NOARG(LegendPositionResources, PositionEnableHdl, weld::Toggleable&, 
void)
+{
+PositionEnable();
+}
+
+void LegendPositionResources::PositionEnable()
 {
 bool bEnable = !m_xCbxShow || m_xCbxShow->get_active();
 
diff --git a/chart2/source/controller/inc/res_LegendPosition.hxx 
b/chart2/source/controller/inc/res_LegendPosition.hxx
index 87b96ab558fc..d1de5010e20a 100644
--- a/chart2/source/controller/inc/res_LegendPosition.hxx
+++ b/chart2/source/controller/inc/res_LegendPosition.hxx
@@ -55,6 +55,7 @@ public:
 
 private:
 void impl_setRadioButtonToggleHdl();
+void PositionEnable();
 
 private:
 css::uno::Reference< css::uno::XComponentContext>m_xCC;


[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - chart2/source

2022-02-28 Thread Ouyang Leyan (via logerrit)
 chart2/source/tools/DataSeriesHelper.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 73e443d32d5c275da953c29f4c493ff565426e8d
Author: Ouyang Leyan 
AuthorDate: Sun Jan 16 12:25:58 2022 +0100
Commit: Xisco Fauli 
CommitDate: Mon Feb 28 12:16:28 2022 +0100

tdf#146463 Apply data series filter to the chart legend

Consider a data series as hidden if there is no unfiltered value, do not
consider data labels. It solves a regression introduced when working on
tdf#134059.

Change-Id: I6072bf469137d70e0aa353ffbeb0d0a1216ffa5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128476
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit 7c5cfe54357e4e8d08b4696e80741097d3335dcb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130645
Reviewed-by: Xisco Fauli 

diff --git a/chart2/source/tools/DataSeriesHelper.cxx 
b/chart2/source/tools/DataSeriesHelper.cxx
index af3c16190633..92229b7de44c 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -671,8 +671,6 @@ bool hasUnhiddenData( const uno::Reference< 
chart2::XDataSeries >& xSeries )
 continue;
 if( lcl_SequenceHasUnhiddenData( aDataSequences[nN]->getValues() ) )
 return true;
-if( lcl_SequenceHasUnhiddenData( aDataSequences[nN]->getLabel() ) )
-return true;
 }
 return false;
 }


[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - chart2/source

2022-02-28 Thread Caolán McNamara (via logerrit)
 chart2/source/view/charttypes/Splines.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 43d3fd49b87172fddf5c6a04c1d11ebbdd8d3bf1
Author: Caolán McNamara 
AuthorDate: Fri Feb 25 21:47:05 2022 +
Commit: Michael Stahl 
CommitDate: Mon Feb 28 11:39:40 2022 +0100

cid#1500452 Using a moved object

and

cid#1500429 Using a moved object

Change-Id: Iecd989345cc043149ff1a2e24da4f6070c014c6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130550
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/chart2/source/view/charttypes/Splines.cxx 
b/chart2/source/view/charttypes/Splines.cxx
index 89203d3da182..36a580a6ce48 100644
--- a/chart2/source/view/charttypes/Splines.cxx
+++ b/chart2/source/view/charttypes/Splines.cxx
@@ -120,7 +120,7 @@ lcl_SplineCalculation::lcl_SplineCalculation(
   m_fYp1( fY1FirstDerivation ),
   m_fYpN( fYnFirstDerivation ),
   m_nKLow( 0 ),
-  m_nKHigh( rSortedPoints.size() - 1 ),
+  m_nKHigh( m_aPoints.size() - 1 ),
   m_fLastInterpolatedValue(std::numeric_limits::infinity())
 {
 Calculate();
@@ -132,7 +132,7 @@ lcl_SplineCalculation::lcl_SplineCalculation(
   m_fYp1( 0.0 ),  /*dummy*/
   m_fYpN( 0.0 ),  /*dummy*/
   m_nKLow( 0 ),
-  m_nKHigh( rSortedPoints.size() - 1 ),
+  m_nKHigh( m_aPoints.size() - 1 ),
   m_fLastInterpolatedValue(std::numeric_limits::infinity())
 {
 CalculatePeriodic();


[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - chart2/source

2022-02-23 Thread Caolán McNamara (via logerrit)
 chart2/source/controller/main/ChartWindow.cxx |   11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit 579d7f37018ff2271aafde73bd5d3bd547436cb7
Author: Caolán McNamara 
AuthorDate: Wed Feb 23 15:47:22 2022 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Feb 23 20:48:42 2022 +0100

Resolves: tdf#147292 the area of the tooltip is wrong

gen happens to make use of the current mouse point so it gets shown
anyway which gtk uses the designated area which isn't in the expected
units or screen relative positions

Change-Id: I11fdb09ad4ce2965d2f2e27fb1427c9d93de7a99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130385
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/chart2/source/controller/main/ChartWindow.cxx 
b/chart2/source/controller/main/ChartWindow.cxx
index 9f1ff9342c98..f90bd046ac65 100644
--- a/chart2/source/controller/main/ChartWindow.cxx
+++ b/chart2/source/controller/main/ChartWindow.cxx
@@ -204,7 +204,6 @@ void ChartWindow::RequestHelp( const HelpEvent& rHEvt )
 if( ( rHEvt.GetMode() & HelpEventMode::QUICK ) &&
 m_pWindowController )
 {
-// Point aLogicHitPos = PixelToLogic( rHEvt.GetMousePosPixel()); // 
old chart: GetPointerPosPixel()
 Point aLogicHitPos = PixelToLogic( GetPointerPosPixel());
 OUString aQuickHelpText;
 awt::Rectangle aHelpRect;
@@ -213,12 +212,14 @@ void ChartWindow::RequestHelp( const HelpEvent& rHEvt )
 
 if( bHelpHandled )
 {
+tools::Rectangle 
aPixelRect(LogicToPixel(lcl_AWTRectToVCLRect(aHelpRect)));
+tools::Rectangle 
aScreenRect(OutputToScreenPixel(aPixelRect.TopLeft()),
+ 
OutputToScreenPixel(aPixelRect.BottomRight()));
+
 if( bIsBalloonHelp )
-Help::ShowBalloon(
-this, rHEvt.GetMousePosPixel(), lcl_AWTRectToVCLRect( 
aHelpRect ), aQuickHelpText );
+Help::ShowBalloon(this, rHEvt.GetMousePosPixel(), aScreenRect, 
aQuickHelpText);
 else
-Help::ShowQuickHelp(
-this, lcl_AWTRectToVCLRect( aHelpRect ), aQuickHelpText );
+Help::ShowQuickHelp(this, aScreenRect, aQuickHelpText);
 }
 }
 


[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - chart2/source

2022-01-21 Thread Rafael Lima (via logerrit)
 chart2/source/controller/dialogs/dlg_CreationWizard.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 48b4720b309acb23a8580d6eb36a00899509af38
Author: Rafael Lima 
AuthorDate: Mon Jan 3 23:37:26 2022 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sat Jan 22 04:46:36 2022 +0100

tdf#135935 Ensure help page is opened in chart creation Wizard dialog

Prior to this patch, if the user opens the Chart Wizard dialog (Insert > 
Chart) and clicks the Help button without clicking anywhere in the dialog, the 
help ID was not being applied. This problem happens on kf5 and gen, but not on 
gtk3.

With this patch, the expected behavior is achieved in gtk3, gen and kf5.

Change-Id: Ief7852fce00de45f65c21ea0ddc8e4d6477612d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127783
Tested-by: Jenkins
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
(cherry picked from commit 67e88d173fb56a2628a5464d56276134bf6f65a2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128680
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx 
b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
index e35dfb8a166e..d64df82a 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
@@ -72,7 +72,8 @@ CreationWizard::CreationWizard(weld::Window* pParent, const 
uno::Referenceset_help_id(HID_SCH_WIZARD_ROADMAP);
 
 if (!m_pDialogModel->getModel().isDataFromSpreadsheet())
 {