[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - chart2/source

2023-11-21 Thread offtkp (via logerrit)
 chart2/source/model/main/PageBackground.cxx |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit e8c50822c459504659bf6eb846364ec981e22e14
Author: offtkp 
AuthorDate: Mon Nov 20 22:58:20 2023 +0200
Commit: Andras Timar 
CommitDate: Tue Nov 21 13:50:50 2023 +0100

chart2: Match chart background color with DOCCOLOR in Calc

Change-Id: I6ea55389f195155a96c4c8dcc94a902b2a862178
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159744
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/chart2/source/model/main/PageBackground.cxx 
b/chart2/source/model/main/PageBackground.cxx
index 561b297aba78..776e751b2934 100644
--- a/chart2/source/model/main/PageBackground.cxx
+++ b/chart2/source/model/main/PageBackground.cxx
@@ -23,6 +23,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 #include 
@@ -54,7 +56,13 @@ private:
 ::chart::FillProperties::AddDefaultsToMap( rOutMap );
 
 // override other defaults
-::chart::PropertyHelper::setPropertyValue< sal_Int32 >( rOutMap, 
::chart::FillProperties::PROP_FILL_COLOR, 0xff );
+Color aDocColor = COL_WHITE;
+if (SfxViewShell::Current()) {
+aDocColor = 
SfxViewShell::Current()->GetColorConfigColor(svtools::DOCCOLOR);
+} else {
+SAL_WARN("chart2", "SfxViewShell::Current() returned nullptr");
+}
+::chart::PropertyHelper::setPropertyValue( rOutMap, 
::chart::FillProperties::PROP_FILL_COLOR, aDocColor );
 ::chart::PropertyHelper::setPropertyValue( rOutMap, 
::chart::LinePropertiesHelper::PROP_LINE_STYLE, drawing::LineStyle_NONE );
 }
 };


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - chart2/source chart2/uiconfig

2023-09-01 Thread Szymon Kłos (via logerrit)
 chart2/source/controller/dialogs/dlg_ChartType.cxx |2 +-
 chart2/uiconfig/ui/charttypedialog.ui  |   14 +-
 2 files changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 2d9e0a7ffa29a0882b92c55e90189e509124e2de
Author: Szymon Kłos 
AuthorDate: Tue Aug 29 15:59:26 2023 +0200
Commit: Szymon Kłos 
CommitDate: Fri Sep 1 10:35:03 2023 +0200

jsdialog: fix layout of chart type dialog

directly set content area container to avoid
buttons on top of the dialog in lok case

Change-Id: I8353102f679a8f19c3041c7b4ec0b1200ed7d515
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156254
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Pranam Lashkari 

diff --git a/chart2/source/controller/dialogs/dlg_ChartType.cxx 
b/chart2/source/controller/dialogs/dlg_ChartType.cxx
index 4fb7de7ead72..e6e88dae42b8 100644
--- a/chart2/source/controller/dialogs/dlg_ChartType.cxx
+++ b/chart2/source/controller/dialogs/dlg_ChartType.cxx
@@ -31,7 +31,7 @@ ChartTypeDialog::ChartTypeDialog(weld::Window* pParent,
  rtl::Reference<::chart::ChartModel> 
xChartModel)
 : GenericDialogController(pParent, "modules/schart/ui/charttypedialog.ui", 
"ChartTypeDialog")
 , m_xChartModel(std::move(xChartModel))
-, m_xContentArea(m_xDialog->weld_content_area())
+, m_xContentArea(m_xBuilder->weld_container("content"))
 {
 m_xChartTypeTabPage = std::make_unique(
 m_xContentArea.get(), this, m_xChartModel, false /*don't show title 
description*/);
diff --git a/chart2/uiconfig/ui/charttypedialog.ui 
b/chart2/uiconfig/ui/charttypedialog.ui
index 5f7c1cb13f71..627a619d0b57 100644
--- a/chart2/uiconfig/ui/charttypedialog.ui
+++ b/chart2/uiconfig/ui/charttypedialog.ui
@@ -76,7 +76,19 @@
   
 
 
-  
+  
+True
+False
+vertical
+
+  
+
+  
+  
+True
+True
+1
+  
 
   
 


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - chart2/source cui/source include/svx reportdesign/source svx/source

2023-06-01 Thread Tomaž Vajngerl (via logerrit)
 chart2/source/controller/sidebar/ChartColorWrapper.cxx |2 
 chart2/source/controller/sidebar/ChartColorWrapper.hxx |2 
 cui/source/inc/cuitabarea.hxx  |4 -
 cui/source/tabpages/chardlg.cxx|2 
 cui/source/tabpages/tpcolor.cxx|   22 +-
 include/svx/Palette.hxx|   23 +--
 include/svx/PaletteManager.hxx |2 
 include/svx/colorbox.hxx   |   10 ++--
 include/svx/tbcontrl.hxx   |2 
 reportdesign/source/ui/dlg/Condition.cxx   |4 -
 reportdesign/source/ui/dlg/Condition.hxx   |2 
 svx/source/tbxctrls/Palette.cxx|   13 --
 svx/source/tbxctrls/PaletteManager.cxx |4 -
 svx/source/tbxctrls/tbcontrl.cxx   |   35 -
 14 files changed, 49 insertions(+), 78 deletions(-)

New commits:
commit e538b0b10dea838ca7cf6329e67dc715bc6cf5ba
Author: Tomaž Vajngerl 
AuthorDate: Mon May 22 14:35:19 2023 +0900
Commit: Tomaž Vajngerl 
CommitDate: Thu Jun 1 17:58:34 2023 +0200

svx: combine svx::NamedThemedColor into NamedColor

Change-Id: I9a9656ddce9c12564411cfcb3e8e8714ae74a418
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152236
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 9a4b768b0a22bd3ae627c7355bbd223b9cf65015)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152265
Tested-by: Jenkins CollaboraOffice 

diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx 
b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
index fc2f8b79839b..bbaf95c56e7d 100644
--- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx
+++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
@@ -87,7 +87,7 @@ ChartColorWrapper::ChartColorWrapper(
 {
 }
 
-void ChartColorWrapper::operator()([[maybe_unused]] const OUString& , const 
svx::NamedThemedColor& rColor)
+void ChartColorWrapper::operator()([[maybe_unused]] const OUString& , const 
NamedColor& rColor)
 {
 css::uno::Reference xPropSet = 
getPropSet(mxModel);
 
diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.hxx 
b/chart2/source/controller/sidebar/ChartColorWrapper.hxx
index c4d30a8a314c..6894726768d0 100644
--- a/chart2/source/controller/sidebar/ChartColorWrapper.hxx
+++ b/chart2/source/controller/sidebar/ChartColorWrapper.hxx
@@ -28,7 +28,7 @@ public:
 SvxColorToolBoxControl* pControl,
 OUString  rPropertyName);
 
-void operator()(const OUString& rCommand, const svx::NamedThemedColor& 
rColor);
+void operator()(const OUString& rCommand, const NamedColor& rColor);
 // ColorSelectFunction signature
 
 void updateModel(const rtl::Reference<::chart::ChartModel>& xModel);
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index b05ce7af425f..bc2d968f2443 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -658,7 +658,7 @@ private:
 ColorModel  eCM;
 
 Color   aPreviousColor;
-svx::NamedThemedColor aCurrentColor;
+NamedColor aCurrentColor;
 
 PaletteManager maPaletteManager;
 SvxXRectPreview m_aCtlPreviewOld;
@@ -714,7 +714,7 @@ private:
 DECL_LINK(SelectPaletteLBHdl, weld::ComboBox&, void);
 DECL_LINK( SelectValSetHdl_Impl, ValueSet*, void );
 DECL_LINK( SelectColorModeHdl_Impl, weld::Toggleable&, void );
-void ChangeColor(const svx::NamedThemedColor , bool 
bUpdatePreset = true);
+void ChangeColor(const NamedColor , bool bUpdatePreset = true);
 void SetColorModel(ColorModel eModel);
 void ChangeColorModel();
 void UpdateColorValues( bool bUpdatePreset = true );
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 438a9ac37cbf..46dd3ded5e6f 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -1572,7 +1572,7 @@ bool SvxCharEffectsPage::FillItemSetColor_Impl( 
SfxItemSet& rSet )
 sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_COLOR );
 const SfxItemSet& rOldSet = GetItemSet();
 
-svx::NamedThemedColor aSelectedColor;
+NamedColor aSelectedColor;
 bool bChanged = m_bNewFontColor;
 
 if (bChanged)
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 50019764830f..fd458ee9b08f 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -210,9 +210,9 @@ void SvxColorTabPage::ActivatePage( const SfxItemSet& )
 ChangeColorModel();
 
 const Color aColor = pFillColorItem->GetColorValue();
-svx::NamedThemedColor aThemedColor;
-aThemedColor.m_aColor = aColor;
-ChangeColor( aThemedColor );
+NamedColor aNamedColor;
+aNamedColor.m_aColor = aColor;
+ChangeColor(aNamedColor);
 sal_Int32 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - chart2/source vcl/jsdialog

2023-04-03 Thread Szymon Kłos (via logerrit)
 chart2/source/controller/dialogs/ChartResourceGroups.cxx |   90 +--
 chart2/source/inc/ChartResourceGroups.hxx|8 -
 vcl/jsdialog/enabled.cxx |2 
 3 files changed, 62 insertions(+), 38 deletions(-)

New commits:
commit 437b45e14343488b143cbd341f386077d6ae69ff
Author: Szymon Kłos 
AuthorDate: Fri Mar 24 10:52:13 2023 +0100
Commit: Szymon Kłos 
CommitDate: Mon Apr 3 08:12:13 2023 +0200

jsdialog: enable and make async chart line prop dialog

Change-Id: I21817b21fe6d2ce0a6f6bd784c0e24fe35b17fec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149502
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/chart2/source/controller/dialogs/ChartResourceGroups.cxx 
b/chart2/source/controller/dialogs/ChartResourceGroups.cxx
index 19534aa1e0b0..3cf5996ed300 100644
--- a/chart2/source/controller/dialogs/ChartResourceGroups.cxx
+++ b/chart2/source/controller/dialogs/ChartResourceGroups.cxx
@@ -205,22 +205,22 @@ SplineResourceGroup::SplineResourceGroup(weld::Builder* 
pBuilder, weld::Window*
 m_xLB_LineType->connect_changed(LINK(this, SplineResourceGroup, 
LineTypeChangeHdl));
 }
 
-SplinePropertiesDialog& SplineResourceGroup::getSplinePropertiesDialog()
+std::shared_ptr 
SplineResourceGroup::getSplinePropertiesDialog()
 {
 if (!m_xSplinePropertiesDialog)
 {
 m_xSplinePropertiesDialog.reset(new SplinePropertiesDialog(m_pParent));
 }
-return *m_xSplinePropertiesDialog;
+return m_xSplinePropertiesDialog;
 }
 
-SteppedPropertiesDialog& SplineResourceGroup::getSteppedPropertiesDialog()
+std::shared_ptr 
SplineResourceGroup::getSteppedPropertiesDialog()
 {
 if (!m_xSteppedPropertiesDialog)
 {
 m_xSteppedPropertiesDialog.reset(new 
SteppedPropertiesDialog(m_pParent));
 }
-return *m_xSteppedPropertiesDialog;
+return m_xSteppedPropertiesDialog;
 }
 
 void SplineResourceGroup::showControls(bool bShow)
@@ -245,7 +245,7 @@ void SplineResourceGroup::fillControls(const 
ChartTypeParameter& rParameter)
 m_xPB_DetailsDialog->connect_clicked(
 LINK(this, SplineResourceGroup, SplineDetailsDialogHdl));
 
m_xPB_DetailsDialog->set_tooltip_text(SchResId(STR_DLG_SMOOTH_LINE_PROPERTIES));
-getSplinePropertiesDialog().fillControls(rParameter);
+getSplinePropertiesDialog()->fillControls(rParameter);
 break;
 case CurveStyle_STEP_START:
 case CurveStyle_STEP_END:
@@ -256,7 +256,7 @@ void SplineResourceGroup::fillControls(const 
ChartTypeParameter& rParameter)
 m_xPB_DetailsDialog->connect_clicked(
 LINK(this, SplineResourceGroup, SteppedDetailsDialogHdl));
 
m_xPB_DetailsDialog->set_tooltip_text(SchResId(STR_DLG_STEPPED_LINE_PROPERTIES));
-getSteppedPropertiesDialog().fillControls(rParameter);
+getSteppedPropertiesDialog()->fillControls(rParameter);
 break;
 default:
 m_xLB_LineType->set_active(-1);
@@ -268,10 +268,10 @@ void 
SplineResourceGroup::fillParameter(ChartTypeParameter& rParameter)
 switch (m_xLB_LineType->get_active())
 {
 case POS_LINETYPE_SMOOTH:
-getSplinePropertiesDialog().fillParameter(rParameter, true);
+getSplinePropertiesDialog()->fillParameter(rParameter, true);
 break;
 case POS_LINETYPE_STEPPED:
-getSteppedPropertiesDialog().fillParameter(rParameter, true);
+getSteppedPropertiesDialog()->fillParameter(rParameter, true);
 break;
 default: // includes POS_LINETYPE_STRAIGHT
 rParameter.eCurveStyle = CurveStyle_LINES;
@@ -288,43 +288,65 @@ IMPL_LINK_NOARG(SplineResourceGroup, LineTypeChangeHdl, 
weld::ComboBox&, void)
 IMPL_LINK_NOARG(SplineResourceGroup, SplineDetailsDialogHdl, weld::Button&, 
void)
 {
 ChartTypeParameter aOldParameter;
-getSplinePropertiesDialog().fillParameter(aOldParameter,
-  m_xLB_LineType->get_active() == 
POS_LINETYPE_SMOOTH);
+std::shared_ptr xDlg = getSplinePropertiesDialog();
+xDlg->fillParameter(aOldParameter, m_xLB_LineType->get_active() == 
POS_LINETYPE_SMOOTH);
 
 const sal_Int32 iOldLineTypePos = m_xLB_LineType->get_active();
 m_xLB_LineType->set_active(POS_LINETYPE_SMOOTH);
-if (getSplinePropertiesDialog().run() == RET_OK)
-{
-if (m_pChangeListener)
-m_pChangeListener->stateChanged();
-}
-else
-{
-//restore old state:
-m_xLB_LineType->set_active(iOldLineTypePos);
-getSplinePropertiesDialog().fillControls(aOldParameter);
-}
+weld::GenericDialogController::runAsync(xDlg, [this, xDlg, aOldParameter,
+   iOldLineTypePos](sal_Int32 
nResult) {
+m_xSplinePropertiesDialog = nullptr;
+auto xNewDlg = 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - chart2/source sc/source vcl/jsdialog

2023-03-07 Thread Szymon Kłos (via logerrit)
 chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx |   12 +++-
 sc/source/ui/drawfunc/fuins2.cxx|5 -
 vcl/jsdialog/enabled.cxx|7 +++
 3 files changed, 22 insertions(+), 2 deletions(-)

New commits:
commit f74cf38f9da1f01c26717fe75708466e08c79b26
Author: Szymon Kłos 
AuthorDate: Thu Mar 2 16:11:14 2023 +0100
Commit: Szymon Kłos 
CommitDate: Tue Mar 7 09:17:06 2023 +

jsdialog: enable chart wizard

Change-Id: I7d6f4b4e6022507a57224ad40785f5f4f4537ea8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148133
Tested-by: Szymon Kłos 
Reviewed-by: Szymon Kłos 

diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx 
b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
index 288f097c6038..3a1fa1386f7a 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -32,6 +33,7 @@
 #include 
 #include 
 
+
 namespace chart
 {
 using namespace ::com::sun::star;
@@ -167,10 +169,18 @@ void CreationWizardUnoDlg::createDialogOnDemand()
 m_xParentWindow = xFrame->getContainerWindow();
 }
 }
+
+weld::Window* pParent(Application::GetFrameWeld(m_xParentWindow));
+if (!pParent)
+{
+if (weld::TransportAsXWindow* pTunnel = 
dynamic_cast(m_xParentWindow.get()))
+pParent = dynamic_cast(pTunnel->getWidget());
+}
+
 uno::Reference< XComponent > xKeepAlive( this );
 if( m_xChartModel.is() )
 {
-m_xDialog = 
std::make_shared(Application::GetFrameWeld(m_xParentWindow), 
m_xChartModel, m_xCC);
+m_xDialog = std::make_shared(pParent, m_xChartModel, 
m_xCC);
 }
 }
 
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index ba7c2cba3573..f35b77e82fce 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -42,6 +42,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -631,9 +632,11 @@ FuInsertChart::FuInsertChart(ScTabViewShell& rViewSh, 
vcl::Window* pWin, ScDrawV
 uno::Reference< lang::XInitialization > xInit( xDialog, 
uno::UNO_QUERY );
 if( xChartModel.is() && xInit.is() )
 {
+css::uno::Reference< css::awt::XWindow > xParent
+= new weld::TransportAsXWindow(pWin->GetFrameWeld());
 uno::Sequence 
aSeq(comphelper::InitAnyPropertySequence(
 {
-{"ParentWindow", uno::Any(uno::Reference< awt::XWindow 
>())},
+{"ParentWindow", uno::Any(xParent)},
 {"ChartModel", uno::Any(xChartModel)}
 }));
 xInit->initialize( aSeq );
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 42a22b70efa0..70674c5523b1 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -82,6 +82,11 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"modules/scalc/ui/ttestdialog.ui"
 || rUIFile == u"modules/scalc/ui/ungroupdialog.ui"
 || rUIFile == u"modules/scalc/ui/ztestdialog.ui"
+// schart
+|| rUIFile == u"modules/schart/ui/tp_ChartType.ui"
+|| rUIFile == u"modules/schart/ui/tp_RangeChooser.ui"
+|| rUIFile == u"modules/schart/ui/tp_DataSource.ui"
+|| rUIFile == u"modules/schart/ui/wizelementspage.ui"
 // swriter
 || rUIFile == u"modules/swriter/ui/captionoptions.ui"
 || rUIFile == u"modules/swriter/ui/characterproperties.ui"
@@ -110,6 +115,8 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"svx/ui/fontworkgallerydialog.ui"
 // uui
 || rUIFile == u"uui/ui/macrowarnmedium.ui"
+// vcl
+|| rUIFile == u"vcl/ui/wizard.ui"
 // xmlsec
 || rUIFile == u"filter/ui/pdfgeneralpage.ui"
 || rUIFile == u"filter/ui/pdflinkspage.ui"