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

2020-10-28 Thread Szymon Kłos (via logerrit)
 chart2/source/controller/main/ChartController.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 2be854e8441b870a2e9bed2d583d4f7aeb73d5d9
Author: Szymon Kłos 
AuthorDate: Tue Oct 6 16:59:52 2020 +0200
Commit: Andras Timar 
CommitDate: Wed Oct 28 13:36:23 2020 +0100

Fire selection change event before sidebar is unregistered

Prevent us from crash in online using mobile phone
when leaving chart edit mode with chart type modified.

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

diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index 3d88f3aadd1a..fb1ed3efabc1 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -754,6 +754,9 @@ void SAL_CALL ChartController::dispose()
 {
 m_bDisposed = true;
 
+mpSelectionChangeHandler->selectionChanged(css::lang::EventObject());
+mpSelectionChangeHandler->Disconnect();
+
 if (getModel().is())
 {
 uno::Reference xSidebar = 
getSidebarFromModel(getModel());
@@ -762,8 +765,6 @@ void SAL_CALL ChartController::dispose()
 
sfx2::sidebar::SidebarController::unregisterSidebarForFrame(pSidebar, this);
 }
 }
-mpSelectionChangeHandler->selectionChanged(css::lang::EventObject());
-mpSelectionChangeHandler->Disconnect();
 
 try
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - chart2/source desktop/source

2020-10-16 Thread Jan Holesovsky (via logerrit)
 chart2/source/controller/sidebar/ChartElementsPanel.cxx |   20 +---
 desktop/source/lib/init.cxx |   12 +++--
 2 files changed, 21 insertions(+), 11 deletions(-)

New commits:
commit ebd3d84ad58b31d325dbe17c35759d12ed7a4242
Author: Jan Holesovsky 
AuthorDate: Fri Oct 16 14:34:43 2020 +0200
Commit: Andras Timar 
CommitDate: Fri Oct 16 16:26:55 2020 +0200

lok: Make the chart (sub)title work even from the mobile-wizard.

Change-Id: Ic6346a403639e283ade47429f581f91e7a468f63
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104436
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx 
b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
index 4026b22d9898..ce3827aa20e2 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
@@ -434,19 +434,23 @@ void ChartElementsPanel::updateData()
 
 bool hasTitle = isTitleVisisble(mxModel, TitleHelper::MAIN_TITLE);
 mpCBTitle->Check(hasTitle);
-if (!mpEditTitle->HasFocus())
-{
-
mpEditTitle->SetText(TitleHelper::getCompleteString(TitleHelper::getTitle(TitleHelper::MAIN_TITLE,
 mxModel)));
+
+OUString title = mpEditTitle->GetText();
+OUString newTitle = 
TitleHelper::getCompleteString(TitleHelper::getTitle(TitleHelper::MAIN_TITLE, 
mxModel));
+if (title != newTitle)
+mpEditTitle->SetText(newTitle);
+if (mpEditTitle->IsEnabled() != hasTitle)
 mpEditTitle->Enable(hasTitle);
-}
 
 bool hasSubtitle = isTitleVisisble(mxModel, TitleHelper::SUB_TITLE);
 mpCBSubtitle->Check(hasSubtitle);
-if (!mpEditSubtitle->HasFocus())
-{
-
mpEditSubtitle->SetText(TitleHelper::getCompleteString(TitleHelper::getTitle(TitleHelper::SUB_TITLE,
 mxModel)));
+
+OUString subtitle = mpEditSubtitle->GetText();
+OUString newSubtitle = 
TitleHelper::getCompleteString(TitleHelper::getTitle(TitleHelper::SUB_TITLE, 
mxModel));
+if (subtitle != newSubtitle)
+mpEditSubtitle->SetText(newSubtitle);
+if (mpEditSubtitle->IsEnabled() != hasSubtitle)
 mpEditSubtitle->Enable(hasSubtitle);
-}
 
 mpCBXAxisTitle->Check(isTitleVisisble(mxModel, TitleHelper::X_AXIS_TITLE));
 mpCBYAxisTitle->Check(isTitleVisisble(mxModel, TitleHelper::Y_AXIS_TITLE));
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index c8971182893f..89cf49dbf6f7 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3641,6 +3641,7 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* 
/*pThis*/, unsigned nWin
 {
 static const OUString sClickAction("CLICK");
 static const OUString sSelectAction("SELECT");
+static const OUString sSetAction("SET");
 static const OUString sClearAction("CLEAR");
 static const OUString sTypeAction("TYPE");
 static const OUString sUpAction("UP");
@@ -3656,12 +3657,11 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* 
/*pThis*/, unsigned nWin
 
 bIsWeldedDialog = pWidget != nullptr;
 bool bContinueWithLOKWindow = false;
+OUString sControlType = aMap["type"];
 OUString sAction = aMap["cmd"];
 
 if (bIsWeldedDialog)
 {
-OUString sControlType = aMap["type"];
-
 if (sControlType == "tabcontrol")
 {
 auto pNotebook = dynamic_cast(pWidget);
@@ -3765,9 +3765,15 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* 
/*pThis*/, unsigned nWin
 {
 aMap["TEXT"] = aMap["data"];
 
-pUIWindow->execute(sClearAction, aMap);
+pUIWindow->execute(sClearAction, aMap); // FIXME - 
change the "CLEAR"&"TYPE" to "SET" and test thoroughly; the "TYPE" really types 
a character by character
 pUIWindow->execute(sTypeAction, aMap);
 }
+else if (sControlType == "edit" && sAction == "change") // 
FIXME - shouldn't "edit" issue "set" instead of "change"?
+{
+aMap["TEXT"] = aMap["data"];
+
+pUIWindow->execute(sSetAction, aMap);
+}
 else if (sAction == "value")
 {
 aMap["VALUE"] = aMap["data"];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-10-16 Thread Jan Holesovsky (via logerrit)
 chart2/source/controller/sidebar/ChartElementsPanel.cxx |   39 
 chart2/source/controller/sidebar/ChartElementsPanel.hxx |3 
 chart2/uiconfig/ui/sidebarelements.ui   |   49 +---
 3 files changed, 82 insertions(+), 9 deletions(-)

New commits:
commit b9e03055d053d5cb8dbdc466ee7c67744a6433b8
Author: Jan Holesovsky 
AuthorDate: Wed Oct 14 16:18:17 2020 +0200
Commit: Andras Timar 
CommitDate: Fri Oct 16 16:21:38 2020 +0200

chart2: Add the possibility to edit title & subtitle from the sidebar.

Change-Id: I4be15acbc2127ebb6eca8864a0209ba57b488100
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104313
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx 
b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
index 28bc8c1a5469..4026b22d9898 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
@@ -284,7 +284,9 @@ ChartElementsPanel::ChartElementsPanel(
 mbModelValid(true)
 {
 get(mpCBTitle,  "checkbutton_title");
+get(mpEditTitle, "edit_title");
 get(mpCBSubtitle,  "checkbutton_subtitle");
+get(mpEditSubtitle, "edit_subtitle");
 get(mpCBXAxis,  "checkbutton_x_axis");
 get(mpCBXAxisTitle,  "checkbutton_x_axis_title");
 get(mpCBYAxis,  "checkbutton_y_axis");
@@ -326,7 +328,9 @@ void ChartElementsPanel::dispose()
 css::uno::Reference xBroadcaster(mxModel, 
css::uno::UNO_QUERY_THROW);
 xBroadcaster->removeModifyListener(mxListener);
 mpCBTitle.clear();
+mpEditTitle.clear();
 mpCBSubtitle.clear();
+mpEditSubtitle.clear();
 mpCBXAxis.clear();
 mpCBXAxisTitle.clear();
 mpCBYAxis.clear();
@@ -381,6 +385,10 @@ void ChartElementsPanel::Initialize()
 mpCBGridHorizontalMinor->SetClickHdl(aLink);
 
 mpLBLegendPosition->SetSelectHdl(LINK(this, ChartElementsPanel, 
LegendPosHdl));
+
+Link aEditLink = LINK(this, ChartElementsPanel, EditHdl);
+mpEditTitle->SetModifyHdl(aEditLink);
+mpEditSubtitle->SetModifyHdl(aEditLink);
 }
 
 namespace {
@@ -423,8 +431,23 @@ void ChartElementsPanel::updateData()
 
 mpCBLegend->Check(isLegendVisible(mxModel));
 mpBoxLegend->Enable( isLegendVisible(mxModel) );
-mpCBTitle->Check(isTitleVisisble(mxModel, TitleHelper::MAIN_TITLE));
-mpCBSubtitle->Check(isTitleVisisble(mxModel, TitleHelper::SUB_TITLE));
+
+bool hasTitle = isTitleVisisble(mxModel, TitleHelper::MAIN_TITLE);
+mpCBTitle->Check(hasTitle);
+if (!mpEditTitle->HasFocus())
+{
+
mpEditTitle->SetText(TitleHelper::getCompleteString(TitleHelper::getTitle(TitleHelper::MAIN_TITLE,
 mxModel)));
+mpEditTitle->Enable(hasTitle);
+}
+
+bool hasSubtitle = isTitleVisisble(mxModel, TitleHelper::SUB_TITLE);
+mpCBSubtitle->Check(hasSubtitle);
+if (!mpEditSubtitle->HasFocus())
+{
+
mpEditSubtitle->SetText(TitleHelper::getCompleteString(TitleHelper::getTitle(TitleHelper::SUB_TITLE,
 mxModel)));
+mpEditSubtitle->Enable(hasSubtitle);
+}
+
 mpCBXAxisTitle->Check(isTitleVisisble(mxModel, TitleHelper::X_AXIS_TITLE));
 mpCBYAxisTitle->Check(isTitleVisisble(mxModel, TitleHelper::Y_AXIS_TITLE));
 mpCBZAxisTitle->Check(isTitleVisisble(mxModel, TitleHelper::Z_AXIS_TITLE));
@@ -584,6 +607,18 @@ IMPL_LINK(ChartElementsPanel, CheckBoxHdl, Button*, 
pButton, void)
 setGridVisible(mxModel, GridType::HOR_MINOR, bChecked);
 }
 
+IMPL_LINK(ChartElementsPanel, EditHdl, Edit&, rEdit, void)
+{
+// title or subtitle?
+TitleHelper::eTitleType aTitleType = TitleHelper::MAIN_TITLE;
+if ( == mpEditSubtitle.get())
+aTitleType = TitleHelper::SUB_TITLE;
+
+// set it
+OUString aText(rEdit.GetText());
+TitleHelper::setCompleteString(aText, TitleHelper::getTitle(aTitleType, 
mxModel), comphelper::getProcessComponentContext());
+}
+
 IMPL_LINK_NOARG(ChartElementsPanel, LegendPosHdl, ListBox&, void)
 {
 sal_Int32 nPos = mpLBLegendPosition->GetSelectedEntryPos();
diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.hxx 
b/chart2/source/controller/sidebar/ChartElementsPanel.hxx
index eca293645cc4..500ad77fccec 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.hxx
@@ -71,7 +71,9 @@ public:
 private:
 //ui controls
 VclPtr mpCBTitle;
+VclPtr mpEditTitle;
 VclPtr mpCBSubtitle;
+VclPtr mpEditSubtitle;
 VclPtr mpCBXAxis;
 VclPtr mpCBXAxisTitle;
 VclPtr mpCBYAxis;
@@ -110,6 +112,7 @@ private:
 void setTitleVisible(TitleHelper::eTitleType eTitle, bool bVisible);
 
 DECL_LINK(CheckBoxHdl, Button*, void);
+DECL_LINK(EditHdl, Edit&, void);
 DECL_LINK(LegendPosHdl, ListBox&, void);
 };
 
diff --git a/chart2/uiconfig/ui/sidebarelements.ui 
b/chart2/uiconfig/ui/sidebarelements.ui
index 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - chart2/source include/svx svx/source

2020-10-05 Thread Szymon Kłos (via logerrit)
 chart2/source/controller/inc/ChartController.hxx|1 
 chart2/source/controller/main/ChartController.cxx   |4 +
 chart2/source/controller/main/ChartController_Tools.cxx |   38 
 include/svx/xgrad.hxx   |2 
 svx/source/xoutdev/xattr.cxx|   18 +++
 5 files changed, 63 insertions(+)

New commits:
commit 80ba3eda8cd3c8ebbf2e49b215e2f2eb6d4b1837
Author: Szymon Kłos 
AuthorDate: Tue Sep 29 15:11:41 2020 +0200
Commit: Andras Timar 
CommitDate: Mon Oct 5 21:55:29 2020 +0200

lok: Add posibility to change chart fill gradient

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

diff --git a/chart2/source/controller/inc/ChartController.hxx 
b/chart2/source/controller/inc/ChartController.hxx
index 270f5743e0c7..50568da2e998 100644
--- a/chart2/source/controller/inc/ChartController.hxx
+++ b/chart2/source/controller/inc/ChartController.hxx
@@ -502,6 +502,7 @@ private:
 void executeDispatch_LOKSetTextSelection(int nType, int nX, int nY);
 void executeDispatch_LOKPieSegmentDragging(int nOffset);
 void executeDispatch_FillColor(sal_uInt32 nColor);
+void executeDispatch_FillGradient(OUString sJSONGradient);
 
 void sendPopupRequest(OUString const & rCID, tools::Rectangle aRectangle);
 
diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index 5ee520362c0b..3d88f3aadd1a 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -1122,6 +1122,10 @@ void SAL_CALL ChartController::dispatch(
 this->executeDispatch_FillColor(nColor);
 }
 }
+else if(aCommand.startsWith("FillGradient"))
+{
+this->executeDispatch_FillGradient(aCommand.copy(aCommand.indexOf('=') 
+ 1));
+}
 else if(aCommand == "Paste")
 this->executeDispatch_Paste();
 else if(aCommand == "Copy" )
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx 
b/chart2/source/controller/main/ChartController_Tools.cxx
index ff1c83ae7e7f..94bafa620bce 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -73,6 +73,9 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 #include 
 #include 
@@ -957,6 +960,41 @@ void ChartController::executeDispatch_FillColor(sal_uInt32 
nColor)
 }
 }
 
+void ChartController::executeDispatch_FillGradient(OUString sJSONGradient)
+{
+XGradient aXGradient = XGradient::fromJSON(sJSONGradient);
+css::awt::Gradient aGradient = aXGradient.toGradientUNO();
+
+try
+{
+OUString aCID( m_aSelection.getSelectedCID() );
+const uno::Reference< frame::XModel >& xChartModel = getModel();
+
+if( xChartModel.is() )
+{
+Reference< beans::XPropertySet > xPropSet(
+ObjectIdentifier::getObjectPropertySet( aCID, xChartModel ) );
+
+if( xPropSet.is() )
+{
+OUString aPrefferedName = 
OUString::number(static_cast(aXGradient.GetStartColor()))
++ 
OUString::number(static_cast(aXGradient.GetEndColor()))
++ 
OUString::number(static_cast(aXGradient.GetAngle()));
+
+OUString aNewName = 
PropertyHelper::addGradientUniqueNameToTable(css::uno::Any(aGradient),
+
css::uno::Reference(xChartModel, 
css::uno::UNO_QUERY_THROW),
+aPrefferedName);
+
+xPropSet->setPropertyValue("FillGradientName", 
css::uno::Any(aNewName));
+}
+}
+}
+catch( const uno::Exception & ex )
+{
+SAL_WARN( "chart2", "Exception caught. " << ex );
+}
+}
+
 void ChartController::executeDispatch_LOKSetTextSelection(int nType, int nX, 
int nY)
 {
 if (m_pDrawViewWrapper)
diff --git a/include/svx/xgrad.hxx b/include/svx/xgrad.hxx
index a5f60f831896..9c19fa785435 100644
--- a/include/svx/xgrad.hxx
+++ b/include/svx/xgrad.hxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class Gradient;
 
@@ -77,6 +78,7 @@ public:
 
 boost::property_tree::ptree dumpAsJSON() const;
 static XGradient fromJSON(const OUString& rJSON);
+css::awt::Gradient toGradientUNO();
 };
 
 #endif
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 3651205de848..797867949b22 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -2050,6 +2050,24 @@ XGradient XGradient::fromJSON(const OUString& rJSON)
 return lcl_buildGradientFromStringMap(aMap);
 }
 
+css::awt::Gradient XGradient::toGradientUNO()
+{
+css::awt::Gradient aGradient;
+
+aGradient.Style = 

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

2020-10-05 Thread Szymon Kłos (via logerrit)
 chart2/source/controller/sidebar/ChartAreaPanel.cxx |   15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

New commits:
commit aab50bda474910198a048a0714206775300efb40
Author: Szymon Kłos 
AuthorDate: Wed Sep 23 15:28:26 2020 +0200
Commit: Andras Timar 
CommitDate: Mon Oct 5 21:53:08 2020 +0200

Use default diagram page selection for charts

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

diff --git a/chart2/source/controller/sidebar/ChartAreaPanel.cxx 
b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
index 959ba2657675..61680fb70716 100644
--- a/chart2/source/controller/sidebar/ChartAreaPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
@@ -46,7 +46,20 @@ OUString getCID(const 
css::uno::Reference& xModel)
 
 css::uno::Any aAny = xSelectionSupplier->getSelection();
 if (!aAny.hasValue())
-return OUString();
+{
+// if no selection, default to diagram wall so sidebar can show some 
editable properties
+ChartController* pController = 
dynamic_cast(xController.get());
+if (pController)
+{
+pController->select( css::uno::Any( 
ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, OUString() ) ) );
+xSelectionSupplier = 
css::uno::Reference(xController, 
css::uno::UNO_QUERY);
+if (xSelectionSupplier.is())
+aAny = xSelectionSupplier->getSelection();
+}
+
+if (!aAny.hasValue())
+return OUString();
+}
 
 OUString aCID;
 aAny >>= aCID;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-23 Thread Katarina Behrens (via logerrit)
 chart2/source/controller/sidebar/ChartAreaPanel.cxx |   52 ++--
 1 file changed, 26 insertions(+), 26 deletions(-)

New commits:
commit ce520a95c246769ab41a83f8a0fc5e48c5352466
Author: Katarina Behrens 
AuthorDate: Tue Jul 16 09:48:12 2019 +0200
Commit: Aron Budea 
CommitDate: Wed Sep 23 13:00:35 2020 +0200

tdf#94300: custom gradients apply also from chart sidebar

Change-Id: Id6ba90b404ad97cdfc4091bcb4028677f1600fa2
Reviewed-on: https://gerrit.libreoffice.org/75693
Tested-by: Jenkins
Reviewed-by: Katarina Behrens 
(cherry picked from commit 0e15fb798a0d1fc8cc221ae2334411fac144f173)
Reviewed-on: https://gerrit.libreoffice.org/77035
Reviewed-by: Thorsten Behrens 
(cherry picked from commit dda72e5088a20360ebf18900e608994311fa0f5c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103233
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Aron Budea 

diff --git a/chart2/source/controller/sidebar/ChartAreaPanel.cxx 
b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
index 023d14127922..959ba2657675 100644
--- a/chart2/source/controller/sidebar/ChartAreaPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
@@ -101,30 +101,26 @@ DrawModelWrapper* getDrawModelWrapper(const 
css::uno::ReferenceGetDrawModelWrapper();
 }
 
-XGradient getXGradientForName(const css::uno::Reference& 
xModel,
+XFillGradientItem getXGradientForName(const 
css::uno::Reference& xModel,
 const OUString& rName)
 {
-try
-{
-ViewElementListProvider aProvider = getViewElementListProvider(xModel);
-XGradientListRef aRef = aProvider.GetGradientList();
-size_t n = aRef->Count();
-for (size_t i = 0; i < n; ++i)
-{
-const XGradientEntry* pGradient = aRef->GetGradient(i);
-if (!pGradient)
-continue;
+css::uno::Reference xFact(xModel, 
css::uno::UNO_QUERY);
+css::uno::Reference xNameAccess(
+xFact->createInstance("com.sun.star.drawing.GradientTable"), 
css::uno::UNO_QUERY);
+if (!xNameAccess.is())
+return XFillGradientItem();
 
-if (pGradient->GetName() == rName)
-return pGradient->GetGradient();
-}
-}
-catch (...)
-{
-// ignore exception
-}
+if (!xNameAccess->hasByName(rName))
+return XFillGradientItem();
+
+css::uno::Any aAny = xNameAccess->getByName(rName);
+
+XFillGradientItem aItem;
+aItem.SetName(rName);
+aItem.PutValue(aAny, MID_FILLGRADIENT);
+
+return aItem;
 
-return XGradient();
 }
 
 XFillFloatTransparenceItem getXTransparencyGradientForName(const 
css::uno::Reference& xModel,
@@ -370,7 +366,12 @@ void ChartAreaPanel::setFillStyleAndGradient(const 
XFillStyleItem* pStyleItem,
 
 if (pStyleItem)
 xPropSet->setPropertyValue("FillStyle", 
css::uno::Any(pStyleItem->GetValue()));
-xPropSet->setPropertyValue("FillGradientName", 
css::uno::Any(rGradientItem.GetValue()));
+
+const OUString& aName = rGradientItem.GetName();
+css::uno::Any aGradientVal;
+rGradientItem.QueryValue(aGradientVal, MID_FILLGRADIENT);
+OUString aNewName = 
PropertyHelper::addGradientUniqueNameToTable(aGradientVal, 
css::uno::Reference(mxModel, 
css::uno::UNO_QUERY_THROW), aName);
+xPropSet->setPropertyValue("FillGradientName", css::uno::Any(aNewName));
 }
 
 void ChartAreaPanel::setFillStyleAndHatch(const XFillStyleItem* pStyleItem,
@@ -436,11 +437,10 @@ void ChartAreaPanel::updateData()
 
 if (xInfo->hasPropertyByName("FillGradientName"))
 {
-   OUString aGradientName;
-   xPropSet->getPropertyValue("FillGradientName") >>= aGradientName;
-   XGradient aGradient = getXGradientForName(mxModel, aGradientName);
-   XFillGradientItem aGradientItem(aGradientName, aGradient);
-   updateFillGradient(false, true, );
+OUString aGradientName;
+xPropSet->getPropertyValue("FillGradientName") >>= aGradientName;
+XFillGradientItem aGradientItem = getXGradientForName(mxModel, 
aGradientName);
+updateFillGradient(false, true, );
 }
 
 if (xInfo->hasPropertyByName("FillHatchName"))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-21 Thread Szymon Kłos (via logerrit)
 chart2/source/controller/inc/ChartController.hxx|1 
 chart2/source/controller/main/ChartController.cxx   |9 +++
 chart2/source/controller/main/ChartController_Tools.cxx |   20 
 3 files changed, 30 insertions(+)

New commits:
commit 5b7d841f062de8872457369da4d4e8e35be9bf60
Author: Szymon Kłos 
AuthorDate: Thu Sep 17 13:27:53 2020 +0200
Commit: Andras Timar 
CommitDate: Mon Sep 21 16:31:58 2020 +0200

lok: Add posibility to change chart fill color

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

diff --git a/chart2/source/controller/inc/ChartController.hxx 
b/chart2/source/controller/inc/ChartController.hxx
index 22469e396480..270f5743e0c7 100644
--- a/chart2/source/controller/inc/ChartController.hxx
+++ b/chart2/source/controller/inc/ChartController.hxx
@@ -501,6 +501,7 @@ private:
 
 void executeDispatch_LOKSetTextSelection(int nType, int nX, int nY);
 void executeDispatch_LOKPieSegmentDragging(int nOffset);
+void executeDispatch_FillColor(sal_uInt32 nColor);
 
 void sendPopupRequest(OUString const & rCID, tools::Rectangle aRectangle);
 
diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index 27cb93cabdd7..5ee520362c0b 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -1113,6 +1113,15 @@ void SAL_CALL ChartController::dispatch(
 this->executeDispatch_PositionAndSize();
 }
 }
+else if(aCommand == "FillColor")
+{
+if (rArgs.getLength() > 0)
+{
+sal_uInt32 nColor = -1;
+rArgs[0].Value >>= nColor;
+this->executeDispatch_FillColor(nColor);
+}
+}
 else if(aCommand == "Paste")
 this->executeDispatch_Paste();
 else if(aCommand == "Copy" )
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx 
b/chart2/source/controller/main/ChartController_Tools.cxx
index b1d26f3425ab..ff1c83ae7e7f 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -937,6 +937,26 @@ void ChartController::executeDispatch_ToggleGridVertical()
 }
 }
 
+void ChartController::executeDispatch_FillColor(sal_uInt32 nColor)
+{
+try
+{
+OUString aCID( m_aSelection.getSelectedCID() );
+const uno::Reference< frame::XModel >& xChartModel = getModel();
+if( xChartModel.is() )
+{
+Reference< beans::XPropertySet > xPointProperties(
+ObjectIdentifier::getObjectPropertySet( aCID, xChartModel ) );
+if( xPointProperties.is() )
+xPointProperties->setPropertyValue( "FillColor", uno::Any( 
nColor ) );
+}
+}
+catch( const uno::Exception & ex )
+{
+SAL_WARN( "chart2", "Exception caught. " << ex );
+}
+}
+
 void ChartController::executeDispatch_LOKSetTextSelection(int nType, int nX, 
int nY)
 {
 if (m_pDrawViewWrapper)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-09-02 Thread Pranam Lashkari (via logerrit)
 chart2/source/controller/sidebar/ChartLinePanel.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit f6c4bfb4a7403c5283f33f5c04f62bb4ef32bf80
Author: Pranam Lashkari 
AuthorDate: Tue Sep 1 19:14:37 2020 +0530
Commit: Muhammet Kara 
CommitDate: Wed Sep 2 10:17:52 2020 +0200

On double click on chart select the chart backgroud

Change-Id: I03fa26a6d88f1436bac00fef7867451378efa04a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101864
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Muhammet Kara 

diff --git a/chart2/source/controller/sidebar/ChartLinePanel.cxx 
b/chart2/source/controller/sidebar/ChartLinePanel.cxx
index 8f923bc04103..daf6045b244f 100644
--- a/chart2/source/controller/sidebar/ChartLinePanel.cxx
+++ b/chart2/source/controller/sidebar/ChartLinePanel.cxx
@@ -46,7 +46,10 @@ OUString getCID(const 
css::uno::Reference& xModel)
 
 css::uno::Any aAny = xSelectionSupplier->getSelection();
 if (!aAny.hasValue())
-return OUString();
+{
+xSelectionSupplier->select(css::uno::makeAny(OUString("CID/Page=")));
+aAny = xSelectionSupplier->getSelection();
+}
 
 OUString aCID;
 aAny >>= aCID;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-06-05 Thread Jan Holesovsky (via logerrit)
 chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit fced46a2838d800a1eaa9328a7aa18b868bd6013
Author: Jan Holesovsky 
AuthorDate: Thu May 30 10:20:15 2019 +0200
Commit: Michael Meeks 
CommitDate: Fri Jun 5 21:28:43 2020 +0200

chart lok: Assign a parent to the chart wizard if it has none.

Without this, the dialog was not routed, so only the chart has been
inserted, but wizard cancelled.

The pParent started to be nullptr after the recent "lok: Don't activate
chart on insert."

Change-Id: Ia04854599aa1387360048412f073e4eb903fb40e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95613
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx 
b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
index ba08b5b7ed55..65bf64ea7b64 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace chart
 {
@@ -168,12 +169,18 @@ void CreationWizardUnoDlg::createDialogOnDemand()
 m_xParentWindow = xFrame->getContainerWindow();
 }
 }
+
 if( m_xParentWindow.is() )
 {
 VCLXWindow* pImplementation = 
VCLXWindow::GetImplementation(m_xParentWindow);
 if (pImplementation)
 pParent = pImplementation->GetWindow().get();
 }
+else if (comphelper::LibreOfficeKit::isActive())
+{
+pParent = ::Current()->GetWindow();
+}
+
 uno::Reference< XComponent > xComp( this );
 if( m_xChartModel.is() )
 m_pDialog = VclPtr::Create( pParent, 
m_xChartModel, m_xCC );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - chart2/source comphelper/source desktop/source editeng/source include/comphelper include/sfx2 sc/source sd/source sfx2/source svx/sou

2020-04-29 Thread Marco Cecchetti (via logerrit)
 chart2/source/controller/main/ChartController_Window.cxx |3 -
 comphelper/source/misc/lok.cxx   |   36 ---
 desktop/source/lib/init.cxx  |   18 ++-
 editeng/source/editeng/editview.cxx  |5 +-
 include/comphelper/lok.hxx   |6 --
 include/sfx2/lokhelper.hxx   |4 +
 include/sfx2/viewsh.hxx  |   16 ++
 sc/source/ui/app/inputhdl.cxx|6 +-
 sc/source/ui/app/inputwin.cxx|3 -
 sc/source/ui/condformat/condformatdlg.cxx|2 
 sc/source/ui/condformat/condformatdlgentry.cxx   |2 
 sc/source/ui/drawfunc/fudraw.cxx |2 
 sc/source/ui/drawfunc/fuins2.cxx |2 
 sc/source/ui/sidebar/AlignmentPropertyPanel.cxx  |3 -
 sc/source/ui/view/gridwin.cxx|7 +-
 sc/source/ui/view/viewfun5.cxx   |3 -
 sd/source/core/sdpage.cxx|4 +
 sd/source/ui/func/futext.cxx |3 -
 sfx2/source/control/unoctitm.cxx |3 -
 sfx2/source/sidebar/Deck.cxx |3 -
 sfx2/source/sidebar/SidebarController.cxx|3 -
 sfx2/source/sidebar/SidebarDockingWindow.cxx |2 
 sfx2/source/view/lokhelper.cxx   |   18 +++
 sfx2/source/view/viewsh.cxx  |4 +
 svx/source/sidebar/text/TextPropertyPanel.cxx|3 -
 25 files changed, 83 insertions(+), 78 deletions(-)

New commits:
commit 73bcf660f419a01b0a5377264e88796d91220c2f
Author: Marco Cecchetti 
AuthorDate: Mon Apr 20 21:26:26 2020 +0200
Commit: Andras Timar 
CommitDate: Wed Apr 29 09:53:54 2020 +0200

lok: set device form factor of the client on view creation

This patch allows the lok core to know about the device form facor of
the client requesting the creation of new view, immediately instead of
a later time.
When a new view is needed a "DeviceFormFactor" parameter is forwarded
to lo_documentLoadWithOptions and doc_createViewWithOptions from the
client.
This parameter can have one of the following values: 'desktop',
'tablet','mobile' and it is used to set a global variable accessible
by SfxLokHelper::setDeviceFormFactor and
SfxLokHelper::getDeviceFormFactor.
This global variable is retrived in the SfxViewShell constructor for
setting SfxViewShell::maLOKDeviceFormFactor attribute.
In SfxViewShell we have the following 3 methods:
- bool isLOKDesktop()
- bool isLOKTablet()
- bool isLOKMobilePhone()
which replace the following boolean functions:
- comphelper::LibreOfficeKit::isTablet
- comphelper::LibreOfficeKitisMobilePhone

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

diff --git a/chart2/source/controller/main/ChartController_Window.cxx 
b/chart2/source/controller/main/ChartController_Window.cxx
index df059206c4ba..859644a221ec 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -931,7 +931,8 @@ void ChartController::execute_MouseButtonUp( const 
MouseEvent& rMEvt )
 
 void ChartController::execute_DoubleClick( const Point* pMousePixel )
 {
-bool isMobilePhone = 
comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView());
+const SfxViewShell* pViewShell = SfxViewShell::Current();
+bool isMobilePhone = pViewShell ? pViewShell->isLOKMobilePhone() : false;
 if (isMobilePhone)
 return;
 
diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index ed2b3dac3f03..3527597f6961 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -87,12 +87,6 @@ static LanguageAndLocale g_aLanguageAndLocale;
 /// Scaling of the cairo or CoreGraphics canvas painting for hi-dpi
 static double g_fDPIScale(1.0);
 
-/// Which views are on mobile phones?
-static std::map g_vIsViewMobilePhone;
-
-/// Which views are on tablets?
-static std::map g_vIsViewTablet;
-
 void setActive(bool bActive)
 {
 g_bActive = bActive;
@@ -103,36 +97,6 @@ bool isActive()
 return g_bActive;
 }
 
-void setMobilePhone(int nViewId)
-{
-assert(!isMobilePhone(nViewId));
-assert(!isTablet(nViewId));
-g_vIsViewMobilePhone[nViewId] = true;
-}
-
-bool isMobilePhone(int nViewId)
-{
-if (g_vIsViewMobilePhone.find(nViewId) != g_vIsViewMobilePhone.end())
-return g_vIsViewMobilePhone[nViewId];
-else
-return false;
-}
-
-void setTablet(int nViewId)
-{
-assert(!isMobilePhone(nViewId));
-

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - chart2/source include/sfx2 include/svx sc/source sd/source sfx2/source svx/source sw/source

2020-03-31 Thread Henry Castro (via logerrit)
 chart2/source/controller/sidebar/ChartAxisPanel.hxx |4 ++
 chart2/source/controller/sidebar/ChartErrorBarPanel.hxx |4 ++
 chart2/source/controller/sidebar/ChartSeriesPanel.hxx   |4 ++
 include/sfx2/bindings.hxx   |2 +
 include/sfx2/ctrlitem.hxx   |2 +
 include/sfx2/sidebar/ControllerItem.hxx |4 ++
 include/svx/sidebar/AreaPropertyPanelBase.hxx   |4 ++
 sc/source/ui/sidebar/AlignmentPropertyPanel.hxx |4 ++
 sc/source/ui/sidebar/CellAppearancePropertyPanel.hxx|4 ++
 sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx  |4 ++
 sd/source/ui/sidebar/SlideBackground.hxx|5 ++
 sfx2/source/control/bindings.cxx|   27 
 sfx2/source/control/ctrlitem.cxx|7 
 sfx2/source/control/statcach.cxx|   13 +++
 sfx2/source/inc/statcach.hxx|1 
 sfx2/source/sidebar/ControllerItem.cxx  |7 
 svx/source/sidebar/graphic/GraphicPropertyPanel.hxx |4 ++
 svx/source/sidebar/line/LinePropertyPanel.hxx   |4 ++
 svx/source/sidebar/media/MediaPlaybackPanel.hxx |5 ++
 svx/source/sidebar/paragraph/ParaPropertyPanel.hxx  |4 ++
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx |3 +
 svx/source/sidebar/possize/PosSizePropertyPanel.hxx |4 ++
 svx/source/sidebar/shadow/ShadowPropertyPanel.hxx   |4 ++
 sw/source/uibase/sidebar/PageFooterPanel.hxx|4 ++
 sw/source/uibase/sidebar/PageFormatPanel.hxx|4 ++
 sw/source/uibase/sidebar/PageHeaderPanel.hxx|4 ++
 sw/source/uibase/sidebar/PageStylesPanel.hxx|4 ++
 sw/source/uibase/sidebar/StylePresetsPanel.hxx  |4 ++
 sw/source/uibase/sidebar/TableEditPanel.hxx |5 ++
 sw/source/uibase/sidebar/ThemePanel.hxx |4 ++
 sw/source/uibase/sidebar/WrapPropertyPanel.hxx  |4 ++
 31 files changed, 156 insertions(+), 1 deletion(-)

New commits:
commit a5207e5b3230a57666cf27f4f4e54c5e5dd81605
Author: Henry Castro 
AuthorDate: Fri Mar 27 19:24:14 2020 -0400
Commit: Henry Castro 
CommitDate: Tue Mar 31 15:26:42 2020 +0200

lok: introduce QueryControlState function

The sidebar usually executes UNO commands to the core framework,
however the controls already have formatted the text that is useful
in Online client side. For example the units conversion.

The QueryControlState method will retrieve the current formatted text
of the sidebar control to be used in Client Side.

Change-Id: I0b3e3a1462d4391ac911352f35808a5e5d9f9ffb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91237
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Henry Castro 

diff --git a/chart2/source/controller/sidebar/ChartAxisPanel.hxx 
b/chart2/source/controller/sidebar/ChartAxisPanel.hxx
index 2b651d8d95f6..96caf589a5a5 100644
--- a/chart2/source/controller/sidebar/ChartAxisPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartAxisPanel.hxx
@@ -57,6 +57,10 @@ public:
 const SfxPoolItem* pState,
 const bool bIsEnabled) override;
 
+virtual void GetControlState(
+const sal_uInt16 /*nSId*/,
+boost::property_tree::ptree& /*rState*/) override {};
+
 // constructor/destructor
 ChartAxisPanel(
 vcl::Window* pParent,
diff --git a/chart2/source/controller/sidebar/ChartErrorBarPanel.hxx 
b/chart2/source/controller/sidebar/ChartErrorBarPanel.hxx
index f4dec42c5521..ce1e2b3d8e5c 100644
--- a/chart2/source/controller/sidebar/ChartErrorBarPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartErrorBarPanel.hxx
@@ -54,6 +54,10 @@ public:
 const SfxPoolItem* pState,
 const bool bIsEnabled) override;
 
+virtual void GetControlState(
+const sal_uInt16 /*nSId*/,
+boost::property_tree::ptree& /*rState*/) override {};
+
 // constructor/destructor
 ChartErrorBarPanel(
 vcl::Window* pParent,
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx 
b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
index ba5d55a6b210..6afbf5740539 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
@@ -64,6 +64,10 @@ public:
 const SfxPoolItem* pState,
 const bool bIsEnabled) override;
 
+virtual void GetControlState(
+const sal_uInt16 /*nSId*/,
+boost::property_tree::ptree& /*rState*/) override {};
+
 // constructor/destructor
 ChartSeriesPanel(
 vcl::Window* pParent,
diff --git a/include/sfx2/bindings.hxx b/include/sfx2/bindings.hxx
index 5d1e7b5e4089..a320862d5f03 100644
--- a/include/sfx2/bindings.hxx
+++ b/include/sfx2/bindings.hxx
@@ -140,6 +140,8 @@ public:
  */
 SfxItemState 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - chart2/source sc/source

2020-03-24 Thread Dennis Francis (via logerrit)
 chart2/source/controller/main/ControllerCommandDispatch.cxx |   10 ++
 sc/source/ui/view/tabvwshb.cxx  |2 ++
 2 files changed, 12 insertions(+)

New commits:
commit 3e4fd7330b382a42e3dd2e1b8fd0b1f78a34b28d
Author: Dennis Francis 
AuthorDate: Tue Mar 24 18:26:16 2020 +0530
Commit: Andras Timar 
CommitDate: Wed Mar 25 00:04:43 2020 +0100

lokit: Mark document as modified on chart insert/edit...

immediately at least in the case when LOKit is active.
This is to allow prompt emission of .uno:ModifiedStatus=true statechange
message from lokit to the client. Without this, in online the chart
insert/modify related changes may not get saved on client exit.

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

diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx 
b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index 0dac15954de8..a1857e7c08e5 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -35,6 +35,9 @@
 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 #include 
 #include 
@@ -812,6 +815,13 @@ void SAL_CALL ControllerCommandDispatch::modified( const 
lang::EventObject& aEve
 if( bUpdateCommandAvailability )
 updateCommandAvailability();
 
+if (comphelper::LibreOfficeKit::isActive())
+{
+if (SfxViewShell* pViewShell = SfxViewShell::Current())
+if (SfxObjectShell* pObjSh = pViewShell->GetObjectShell())
+pObjSh->SetModified();
+}
+
 CommandDispatch::modified( aEvent );
 }
 
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index 7ac16fa1a0dc..2f2eb1bda630 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -337,6 +337,8 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
 
 case SID_INSERT_DIAGRAM:
 pFuInsertChart.reset(new FuInsertChart(*this, pWin, pView, 
pDrModel, rReq));
+if (comphelper::LibreOfficeKit::isActive())
+pDocSh->SetModified();
 break;
 
 case SID_INSERT_OBJECT:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-03-18 Thread Muhammet Kara (via logerrit)
 chart2/source/controller/sidebar/ChartElementsPanel.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0ced5dfbef64feaf24309eecd58e3ab9d8df860b
Author: Muhammet Kara 
AuthorDate: Wed Mar 18 13:56:43 2020 +0300
Commit: Andras Timar 
CommitDate: Wed Mar 18 13:52:27 2020 +0100

Sidebar: Fix title & subtitle checkboxes on the ChartDeck

They now work as they did before the regression. An uncheck action
removes the title/subtitle, and a check action just makes the existing
title/subtitle visible or creates a new one if it doesn't exist

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

diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx 
b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
index 2f9d7ebaec27..28bc8c1a5469 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
@@ -599,7 +599,7 @@ void 
ChartElementsPanel::setTitleVisible(TitleHelper::eTitleType eTitle, bool bV
 }
 else
 {
-TitleHelper::hideTitle(eTitle, mxModel);
+TitleHelper::removeTitle(eTitle, mxModel);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - chart2/source comphelper/source desktop/source include/comphelper sc/source sd/source sfx2/source svx/source

2020-03-16 Thread Tor Lillqvist (via logerrit)
 chart2/source/controller/main/ChartController_Window.cxx |4 -
 comphelper/source/misc/lok.cxx   |   31 ++-
 desktop/source/lib/init.cxx  |   20 +++--
 include/comphelper/lok.hxx   |   14 --
 sc/source/ui/app/inputhdl.cxx|2 
 sc/source/ui/app/inputwin.cxx|2 
 sc/source/ui/condformat/condformatdlg.cxx|2 
 sc/source/ui/condformat/condformatdlgentry.cxx   |2 
 sc/source/ui/drawfunc/fuins2.cxx |2 
 sc/source/ui/sidebar/AlignmentPropertyPanel.cxx  |2 
 sc/source/ui/view/gridwin.cxx|5 +-
 sc/source/ui/view/viewfun5.cxx   |2 
 sd/source/core/sdpage.cxx|   20 -
 sd/source/ui/func/futext.cxx |2 
 sfx2/source/sidebar/Deck.cxx |2 
 sfx2/source/sidebar/SidebarController.cxx|4 -
 sfx2/source/sidebar/SidebarDockingWindow.cxx |6 +-
 svx/source/sidebar/text/TextPropertyPanel.cxx|   10 ++--
 18 files changed, 81 insertions(+), 51 deletions(-)

New commits:
commit fc5400b167f1f6a9a788acfd5894622f440ee5f5
Author: Tor Lillqvist 
AuthorDate: Mon Mar 16 13:50:00 2020 +0200
Commit: Tor Lillqvist 
CommitDate: Mon Mar 16 15:14:01 2020 +0100

Rename isMobile to isMobilePhone and introduce a separate isTablet

The intended semantics of isMobile() has been to say whether the
device is a mobile phone ot not. Not whether it is a mobile device in
general. So make that explicit.

Adjust call sites as necessary. Also, in a couple of places where it
is likely that what is relevant is whether it is a mobile device in
general, not just whether it is a mobile phone, check both isMobile()
and isTablet().

For stable interoperability with current Online, keep accepting also
the .uno:LOKSetMobile "command" (and .uno:LOKUnSetMobile, except that
Online never sends that), but Online will be changed to use
.uno:LOKSetMobilePhone.

Also drop the default value for the bool parameter to
setMobilePhone(). Default bool parameters can be quite confusing, and
it was especially silly in this case as there is one (1) call site.

Change-Id: I2a71c37323ee151cbc671bd8e714e1dee10f8b1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90560
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 

diff --git a/chart2/source/controller/main/ChartController_Window.cxx 
b/chart2/source/controller/main/ChartController_Window.cxx
index 8cd01a2e1e09..df059206c4ba 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -931,8 +931,8 @@ void ChartController::execute_MouseButtonUp( const 
MouseEvent& rMEvt )
 
 void ChartController::execute_DoubleClick( const Point* pMousePixel )
 {
-bool isMobile = 
comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView());
-if (isMobile)
+bool isMobilePhone = 
comphelper::LibreOfficeKit::isMobilePhone(SfxLokHelper::getView());
+if (isMobilePhone)
 return;
 
 bool bEditText = false;
diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index 7bfd776369e3..1f78c29f8b97 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -87,8 +87,11 @@ static LanguageAndLocale g_aLanguageAndLocale;
 /// Scaling of the cairo or CoreGraphics canvas painting for hi-dpi
 static double g_fDPIScale(1.0);
 
-/// List of  pairs
-static std::map g_vIsViewMobile;
+/// Which views are on mobile phones?
+static std::map g_vIsViewMobilePhone;
+
+/// Which views are on tablets?
+static std::map g_vIsViewTablet;
 
 void setActive(bool bActive)
 {
@@ -100,18 +103,28 @@ bool isActive()
 return g_bActive;
 }
 
-void setMobile(int nViewId, bool bMobile)
+void setMobilePhone(int nViewId, bool bIsMobilePhone)
+{
+g_vIsViewMobilePhone[nViewId] = bIsMobilePhone;
+}
+
+bool isMobilePhone(int nViewId)
 {
-if (g_vIsViewMobile.find(nViewId) != g_vIsViewMobile.end())
-g_vIsViewMobile[nViewId] = bMobile;
+if (g_vIsViewMobilePhone.find(nViewId) != g_vIsViewMobilePhone.end())
+return g_vIsViewMobilePhone[nViewId];
 else
-g_vIsViewMobile.insert(std::make_pair(nViewId, bMobile));
+return false;
+}
+
+void setTablet(int nViewId, bool bIsTablet)
+{
+g_vIsViewTablet[nViewId] = bIsTablet;
 }
 
-bool isMobile(int nViewId)
+bool isTablet(int nViewId)
 {
-if (g_vIsViewMobile.find(nViewId) != g_vIsViewMobile.end())
-return g_vIsViewMobile[nViewId];
+if (g_vIsViewTablet.find(nViewId) != g_vIsViewTablet.end())
+return g_vIsViewTablet[nViewId];
 else
 return false;
 }
diff --git 

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

2020-02-24 Thread Dennis Francis (via logerrit)
 chart2/source/controller/main/ChartController_Window.cxx |   11 ---
 1 file changed, 11 deletions(-)

New commits:
commit eea0bc558fc1ac8d5c1537df2cf95f73720f3620
Author: Dennis Francis 
AuthorDate: Fri Feb 21 17:02:32 2020 +0530
Commit: Andras Timar 
CommitDate: Mon Feb 24 14:13:29 2020 +0100

Remove unused lokit-only selection properties in..

CID string for charts. This is messing up the parsing of
CID string in ObjectIdentifier::getObjectType() and elsewhere
where parsing CID is attempted, which inturn causes at least
the sidebar's chart line properties listboxes not getting
updated.

The selection properties insertion in chart CID was introduced in commit

3d705b98ca7f40a44f632f5565407274322ffde3

but these are not even used in online as of present.

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

diff --git a/chart2/source/controller/main/ChartController_Window.cxx 
b/chart2/source/controller/main/ChartController_Window.cxx
index e3d65bd670d7..8cd01a2e1e09 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -1691,17 +1691,6 @@ uno::Any SAL_CALL ChartController::getSelection()
 OUString aCID( m_aSelection.getSelectedCID() );
 if ( !aCID.isEmpty() )
 {
-if ( comphelper::LibreOfficeKit::isActive() )
-{
-sal_Int32 nPos = aCID.lastIndexOf('/');
-OUString sFirst = aCID.copy(0, nPos);
-OUString sSecond = aCID.copy(nPos);
-aCID = sFirst;
-aCID += "/Draggable=" + 
OUString::number(static_cast(isSelectedObjectDraggable()));
-aCID += ":Resizable=" + 
OUString::number(static_cast(isSelectedObjectResizable()));
-aCID += ":Rotatable=" + 
OUString::number(static_cast(isSelectedObjectRotatable()));
-aCID += sSecond;
-}
 aReturn <<= aCID;
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-02-24 Thread Dennis Francis (via logerrit)
 chart2/source/controller/sidebar/ChartColorWrapper.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 9a80969f3115fc33778005861442f91127344dc0
Author: Dennis Francis 
AuthorDate: Sun Feb 23 22:38:15 2020 +0530
Commit: Andras Timar 
CommitDate: Mon Feb 24 14:12:41 2020 +0100

chart2: Fix the color uno command in ChartColorWrapper

The uno command for color depends on the property name. For LineColor
it should be .uno:XLineColor and the only other case is FillColor for
which it should be .uno:FillColor. Without this fix, on selecting
the chart for editing the first time, the sidebar line-color control
is disabled as a side-effect.

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

diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx 
b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
index 49a3cf5b9eba..b47d6fd6c2aa 100644
--- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx
+++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
@@ -94,12 +94,15 @@ void ChartColorWrapper::updateModel(const 
css::uno::Reference xPropSet = 
getPropSet(mxModel);
 if (!xPropSet.is())
 return;
 
 css::util::URL aUrl;
-aUrl.Complete = ".uno:FillColor";
+aUrl.Complete = (maPropertyName == aLineColor) ? aCommands[0] : 
aCommands[1];
 
 css::frame::FeatureStateEvent aEvent;
 aEvent.FeatureURL = aUrl;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - chart2/source offapi/com oox/source

2020-01-06 Thread Tamas Bunth (via logerrit)
 chart2/source/view/charttypes/VSeriesPlotter.cxx |5 +
 offapi/com/sun/star/chart2/DataPointCustomLabelFieldType.idl |5 +++--
 oox/source/drawingml/chart/seriesconverter.cxx   |2 ++
 3 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit e360137531d2686815a95596bba121db1e6738ff
Author: Tamas Bunth 
AuthorDate: Wed Jan 1 15:31:40 2020 +0100
Commit: Andras Timar 
CommitDate: Mon Jan 6 14:47:56 2020 +0100

tdf#125444 Percentage as custom chart label

Support importing ooxml charts with a field of type "PERCENTAGE" as
custom label.

Change-Id: Ie8931f77e3b6199d98635422d11d776e675f6e5c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86067
Tested-by: Jenkins
Reviewed-by: Tamás Bunth 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86118
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx 
b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 7a45aa8b2d13..923555fad41f 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -543,6 +543,11 @@ uno::Reference< drawing::XShape > 
VSeriesPlotter::createDataLabel( const uno::Re
 aTextList[i] = DataSeriesHelper::getDataSeriesLabel( 
xSeries, aRole );
 break;
 }
+case DataPointCustomLabelFieldType_PERCENTAGE:
+{
+aTextList[i] = getLabelTextForValue( rDataSeries, 
nPointIndex, fValue, true );
+break;
+}
 case DataPointCustomLabelFieldType_CELLREF:
 {
 // TODO: for now doesn't show placeholder
diff --git a/offapi/com/sun/star/chart2/DataPointCustomLabelFieldType.idl 
b/offapi/com/sun/star/chart2/DataPointCustomLabelFieldType.idl
index 0b7f925342a6..05c26a738684 100644
--- a/offapi/com/sun/star/chart2/DataPointCustomLabelFieldType.idl
+++ b/offapi/com/sun/star/chart2/DataPointCustomLabelFieldType.idl
@@ -23,11 +23,12 @@ enum DataPointCustomLabelFieldType
 SERIESNAME,
 CATEGORYNAME,
 CELLREF,
-NEWLINE
+NEWLINE,
+PERCENTAGE
 };
 
 }; }; }; };
 
 #endif
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
\ No newline at end of file
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/oox/source/drawingml/chart/seriesconverter.cxx 
b/oox/source/drawingml/chart/seriesconverter.cxx
index 01e1d72562c5..8397b190fb8a 100644
--- a/oox/source/drawingml/chart/seriesconverter.cxx
+++ b/oox/source/drawingml/chart/seriesconverter.cxx
@@ -245,6 +245,8 @@ DataPointCustomLabelFieldType 
lcl_ConvertFieldNameToFieldEnum( const OUString& r
 return 
DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CATEGORYNAME;
 else if (rField == "CELLREF")
 return 
DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CELLREF;
+else if (rField == "PERCENTAGE")
+return 
DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_PERCENTAGE;
 else
 return 
DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-12-13 Thread Muhammet Kara (via logerrit)
 chart2/source/controller/sidebar/ChartColorWrapper.cxx |   13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 4134b2cfb80d0b04204863789e72303f60712ba1
Author: Muhammet Kara 
AuthorDate: Fri Dec 13 16:02:17 2019 +0300
Commit: Muhammet Kara 
CommitDate: Fri Dec 13 15:19:28 2019 +0100

tdf#129056: No need for catastrophe

We can continue working without hurting others
in case of an invalid reference.

Putting in a warning so that it doesn't become
a black hole which silences errors.

Change-Id: I6d75edeba227a4293b0ae16217811e49ae336a6b
Reviewed-on: https://gerrit.libreoffice.org/85110
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Muhammet Kara 

diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx 
b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
index 6c9744ffee02..49a3cf5b9eba 100644
--- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx
+++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
@@ -70,8 +70,19 @@ ChartColorWrapper::ChartColorWrapper(
 
 void ChartColorWrapper::operator()(const OUString& , const NamedColor& rColor)
 {
+if (!mxModel.is())
+{
+SAL_WARN("chart2", "Invalid reference to mxModel");
+return;
+}
+
 css::uno::Reference xPropSet = 
getPropSet(mxModel);
-assert(xPropSet.is());
+
+if (!xPropSet.is())
+{
+SAL_WARN("chart2", "Invalid reference to xPropSet");
+return;
+}
 
 xPropSet->setPropertyValue(maPropertyName, 
css::uno::makeAny(rColor.first));
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-12-11 Thread Ashod Nakashian (via logerrit)
 chart2/source/controller/main/ChartWindow.cxx  |1 +
 chart2/source/controller/sidebar/ChartSidebarModifyListener.cxx|7 
++-
 chart2/source/controller/sidebar/ChartSidebarSelectionListener.cxx |7 
+++
 3 files changed, 14 insertions(+), 1 deletion(-)

New commits:
commit d4c52ebce80e6ea9dbfa0ca47b50272fab71c546
Author: Ashod Nakashian 
AuthorDate: Wed Dec 11 18:19:43 2019 -0500
Commit: Ashod Nakashian 
CommitDate: Thu Dec 12 01:12:45 2019 +0100

chart2: clear listener parents in dispose

Change-Id: Icdab125589ab0f55255f683a1ea39e036de661b1
Reviewed-on: https://gerrit.libreoffice.org/84997
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Ashod Nakashian 

diff --git a/chart2/source/controller/main/ChartWindow.cxx 
b/chart2/source/controller/main/ChartWindow.cxx
index 57f245fe8db4..41e2664d1e9d 100644
--- a/chart2/source/controller/main/ChartWindow.cxx
+++ b/chart2/source/controller/main/ChartWindow.cxx
@@ -75,6 +75,7 @@ ChartWindow::~ChartWindow()
 
 void ChartWindow::dispose()
 {
+m_pWindowController = nullptr;
 m_pViewShellWindow.clear();
 vcl::Window::dispose();
 }
diff --git a/chart2/source/controller/sidebar/ChartSidebarModifyListener.cxx 
b/chart2/source/controller/sidebar/ChartSidebarModifyListener.cxx
index b000e55c5aa6..0fa0b793b5b6 100644
--- a/chart2/source/controller/sidebar/ChartSidebarModifyListener.cxx
+++ b/chart2/source/controller/sidebar/ChartSidebarModifyListener.cxx
@@ -27,12 +27,17 @@ ChartSidebarModifyListener::~ChartSidebarModifyListener()
 
 void ChartSidebarModifyListener::modified(const css::lang::EventObject& 
/*rEvent*/)
 {
-mpParent->updateData();
+if (mpParent)
+mpParent->updateData();
 }
 
 void ChartSidebarModifyListener::disposing(const css::lang::EventObject& 
/*rEvent*/)
 {
+if (!mpParent)
+return;
+
 mpParent->modelInvalid();
+mpParent = nullptr;
 }
 
 } }
diff --git a/chart2/source/controller/sidebar/ChartSidebarSelectionListener.cxx 
b/chart2/source/controller/sidebar/ChartSidebarSelectionListener.cxx
index 19f4335e0b49..65d7bc9ce350 100644
--- a/chart2/source/controller/sidebar/ChartSidebarSelectionListener.cxx
+++ b/chart2/source/controller/sidebar/ChartSidebarSelectionListener.cxx
@@ -41,6 +41,9 @@ 
ChartSidebarSelectionListener::~ChartSidebarSelectionListener()
 
 void ChartSidebarSelectionListener::selectionChanged(const 
css::lang::EventObject& rEvent)
 {
+if (!mpParent)
+return;
+
 bool bCorrectObjectSelected = false;
 
 css::uno::Reference xController(rEvent.Source, 
css::uno::UNO_QUERY);
@@ -66,7 +69,11 @@ void ChartSidebarSelectionListener::selectionChanged(const 
css::lang::EventObjec
 
 void ChartSidebarSelectionListener::disposing(const css::lang::EventObject& 
/*rEvent*/)
 {
+if (!mpParent)
+return;
+
 mpParent->SelectionInvalid();
+mpParent = nullptr;
 }
 
 void ChartSidebarSelectionListener::setAcceptedTypes(const 
std::vector& aTypes)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2019-11-13 Thread Henry Castro (via logerrit)
 chart2/source/controller/dialogs/dlg_CreationWizard.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit c8822da749e3720ad99f21ea9bb7a0b035a4b859
Author: Henry Castro 
AuthorDate: Wed Oct 2 16:19:34 2019 -0400
Commit: Tor Lillqvist 
CommitDate: Wed Nov 13 10:56:18 2019 +0100

tdf#127798: ios: change the default page height of the chart wizard dialog

The constant CHART_WIZARD_PAGEHEIGHT value determines the wizard
dialog size, however for a custom theme for IOS those values
have to be adjusted. After reading the WizardDialog implementation,
there is no code related about chart wizard dialog auto-size.

Change-Id: I6219d777bcc51f278ee10d834e8d0fe6c12f7918
Reviewed-on: https://gerrit.libreoffice.org/80087
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/82519
Tested-by: Tor Lillqvist 

diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx 
b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
index 60fbf69c289a..1b89b2bae2a7 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
@@ -31,7 +31,11 @@
 #include "DialogModel.hxx"
 
 #define CHART_WIZARD_PAGEWIDTH  250
+#ifdef IOS
+#define CHART_WIZARD_PAGEHEIGHT 200
+#else
 #define CHART_WIZARD_PAGEHEIGHT 170
+#endif
 
 using namespace css;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-11-10 Thread Muhammet Kara (via logerrit)
 chart2/source/controller/dialogs/ChartTypeDialogController.cxx |8 
 chart2/uiconfig/ui/sidebartype.ui  |4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit acc78c5c0bcb435d7149f755dcb89af6e2f9d353
Author: Muhammet Kara 
AuthorDate: Mon Nov 11 09:18:30 2019 +0300
Commit: Muhammet Kara 
CommitDate: Mon Nov 11 08:31:48 2019 +0100

Show/hide number of lines on chart type panel properly

Change-Id: I16c05e7b90de5d5467adb2c8e257ec18a304f6b3
Reviewed-on: https://gerrit.libreoffice.org/82413
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Muhammet Kara 

diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx 
b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index b34bf3f102df..a80655abcb74 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -1319,6 +1319,8 @@ void 
CombiColumnLineChartDialogController::showExtraControls(VclBuilderContainer
 m_pMF_NumberOfLines->SetModifyHdl( LINK( this, 
CombiColumnLineChartDialogController, ChangeLineCountHdl_unwelded ) );
 }
 
+m_pFT_NumberOfLines->Enable();
+m_pMF_NumberOfLines->Enable();
 m_pFT_NumberOfLines->Show();
 m_pMF_NumberOfLines->Show();
 }
@@ -1331,9 +1333,15 @@ void 
CombiColumnLineChartDialogController::hideExtraControls() const
 m_xMF_NumberOfLines->hide();
 
 if(m_pFT_NumberOfLines)
+{
+m_pFT_NumberOfLines->Disable();
 m_pFT_NumberOfLines->Hide();
+}
 if(m_pMF_NumberOfLines)
+{
+m_pMF_NumberOfLines->Disable();
 m_pMF_NumberOfLines->Hide();
+}
 }
 
 void CombiColumnLineChartDialogController::fillExtraControls( const 
ChartTypeParameter& /*rParameter*/
diff --git a/chart2/uiconfig/ui/sidebartype.ui 
b/chart2/uiconfig/ui/sidebartype.ui
index 65568362a6db..2f619939207b 100644
--- a/chart2/uiconfig/ui/sidebartype.ui
+++ b/chart2/uiconfig/ui/sidebartype.ui
@@ -343,7 +343,7 @@
 12
 
   
-True
+False
 False
 True
 _Number of lines
@@ -359,7 +359,7 @@
 
 
   
-True
+False
 True
 True
 adjustment1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-11-09 Thread Muhammet Kara (via logerrit)
 chart2/source/view/main/ShapeFactory.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 24f8537bf8af516e5cb143126e1d3a089041d60a
Author: Muhammet Kara 
AuthorDate: Sat Nov 9 13:11:03 2019 +0300
Commit: Muhammet Kara 
CommitDate: Sat Nov 9 13:02:22 2019 +0100

Don't call setPropertyValue with empty value

Change-Id: I3dd2525e5649cf71b47c2733db4d121625b33342
Reviewed-on: https://gerrit.libreoffice.org/82347
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Muhammet Kara 

diff --git a/chart2/source/view/main/ShapeFactory.cxx 
b/chart2/source/view/main/ShapeFactory.cxx
index 28f981635529..bc358243e2b0 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -2163,11 +2163,15 @@ uno::Reference< drawing::XShape >
 //the matrix needs to be set at the end behind autogrow and such 
position influencing properties
 try
 {
-xProp->setPropertyValue( "Transformation", rATransformation );
+if (rATransformation.hasValue())
+xProp->setPropertyValue( "Transformation", rATransformation );
+else
+SAL_INFO("chart2", "No rATransformation value is given to 
ShapeFactory::createText()");
+
 }
 catch( const uno::Exception& e )
 {
-SAL_WARN("chart2", "Exception caught. " << e );
+SAL_WARN("chart2", "Exception caught. " << e.Message );
 }
 }
 return xShape;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-11-09 Thread Muhammet Kara (via logerrit)
 chart2/source/controller/main/ControllerCommandDispatch.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 896b1b0841a7b8c1ba37812db4a2b60c5b84f968
Author: Muhammet Kara 
AuthorDate: Sat Nov 9 10:33:02 2019 +0300
Commit: Muhammet Kara 
CommitDate: Sat Nov 9 09:13:57 2019 +0100

Make ControllerCommandDispatch::commandAvailable() more talkative

Change-Id: I7d89a27692c619707ccb8356241422c9578fb081
Reviewed-on: https://gerrit.libreoffice.org/82344
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Muhammet Kara 

diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx 
b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index d920a4a8c988..0dac15954de8 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -715,7 +715,7 @@ bool ControllerCommandDispatch::commandAvailable( const 
OUString & rCommand )
 std::map< OUString, bool >::const_iterator aIt( 
m_aCommandAvailability.find( rCommand ));
 if( aIt != m_aCommandAvailability.end())
 return aIt->second;
-OSL_FAIL( "commandAvailable: command not in availability map" );
+SAL_WARN("chart2", "commandAvailable: command not in availability map:" << 
rCommand);
 return false;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-11-07 Thread Muhammet Kara (via logerrit)
 chart2/source/controller/sidebar/ChartTypePanel.hxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit df6296bce5b780c44759650d4c13b447f997cb7f
Author: Muhammet Kara 
AuthorDate: Thu Nov 7 20:03:09 2019 +0300
Commit: Muhammet Kara 
CommitDate: Thu Nov 7 20:23:03 2019 +0100

ChartTypePanel: Remove unused vars

Change-Id: I6a19fa269efaf008345b48341d1c501e1c7e7d17
Reviewed-on: https://gerrit.libreoffice.org/82244
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Muhammet Kara 

diff --git a/chart2/source/controller/sidebar/ChartTypePanel.hxx 
b/chart2/source/controller/sidebar/ChartTypePanel.hxx
index e7eac8176d58..5d156c09fa6a 100644
--- a/chart2/source/controller/sidebar/ChartTypePanel.hxx
+++ b/chart2/source/controller/sidebar/ChartTypePanel.hxx
@@ -115,9 +115,6 @@ private:
 
 bool mbModelValid;
 
-OUString maTextTitle;
-OUString maTextSubTitle;
-
 void Initialize();
 
 std::unique_ptr m_pDim3DLookResourceGroup;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-11-07 Thread Muhammet Kara (via logerrit)
 chart2/source/controller/sidebar/ChartTypePanel.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 58adc10c6f78218bee36f9d9d165978baa4bff28
Author: Muhammet Kara 
AuthorDate: Thu Nov 7 19:48:05 2019 +0300
Commit: Muhammet Kara 
CommitDate: Thu Nov 7 18:33:51 2019 +0100

ChartTypePanel: Enable handler sub-type selection

Change-Id: I339b5f8b7be55c64c740f252c880e87a69e1ef4b
Reviewed-on: https://gerrit.libreoffice.org/82241
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Muhammet Kara 

diff --git a/chart2/source/controller/sidebar/ChartTypePanel.cxx 
b/chart2/source/controller/sidebar/ChartTypePanel.cxx
index 1499c5270507..87a7141b2f8d 100644
--- a/chart2/source/controller/sidebar/ChartTypePanel.cxx
+++ b/chart2/source/controller/sidebar/ChartTypePanel.cxx
@@ -692,13 +692,13 @@ IMPL_LINK_NOARG(ChartTypePanel, SelectMainTypeHdl, 
ListBox&, void) { selectMainT
 
 IMPL_LINK_NOARG(ChartTypePanel, SelectSubTypeHdl, ValueSet*, void)
 {
-/*if( m_pCurrentMainType )
+if (m_pCurrentMainType)
 {
-ChartTypeParameter aParameter( getCurrentParamter() );
-m_pCurrentMainType->adjustParameterToSubType( aParameter );
-fillAllControls( aParameter, false );
-commitToModel( aParameter );
-}*/
+ChartTypeParameter aParameter(getCurrentParamter());
+m_pCurrentMainType->adjustParameterToSubType(aParameter);
+fillAllControls(aParameter, false);
+commitToModel(aParameter);
+}
 }
 
 void ChartTypePanel::Initialize()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-11-07 Thread Muhammet Kara (via logerrit)
 chart2/source/controller/sidebar/ChartTypePanel.cxx |   71 +---
 chart2/source/controller/sidebar/ChartTypePanel.hxx |8 +-
 2 files changed, 69 insertions(+), 10 deletions(-)

New commits:
commit 4922c7a0a7269285f0e7d669a7b53350f55e9ae0
Author: Muhammet Kara 
AuthorDate: Thu Nov 7 16:02:15 2019 +0300
Commit: Muhammet Kara 
CommitDate: Thu Nov 7 15:12:24 2019 +0100

ChartTypePanel: Add handler for main chart type ListBox

Change-Id: I3488dec747cfe62478e7924df5e2574ac291e4e3
Reviewed-on: https://gerrit.libreoffice.org/82216
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Muhammet Kara 

diff --git a/chart2/source/controller/sidebar/ChartTypePanel.cxx 
b/chart2/source/controller/sidebar/ChartTypePanel.cxx
index 8edc16265baa..1499c5270507 100644
--- a/chart2/source/controller/sidebar/ChartTypePanel.cxx
+++ b/chart2/source/controller/sidebar/ChartTypePanel.cxx
@@ -602,14 +602,13 @@ ChartTypePanel::ChartTypePanel(vcl::Window* pParent,
 get(m_pMainTypeList, "cmb_chartType");
 get(m_pSubTypeList, "subtype");
 
-//Chart Type related
-m_pMainTypeList->SetSelectHdl(LINK(this, ChartTypePanel, 
SelectMainTypeHdl));
-m_pSubTypeList->SetSelectHdl(LINK(this, ChartTypePanel, SelectSubTypeHdl));
-
 Size aSize(m_pSubTypeList->LogicToPixel(Size(120, 40), 
MapMode(MapUnit::MapAppFont)));
 m_pSubTypeList->set_width_request(aSize.Width());
 m_pSubTypeList->set_height_request(aSize.Height());
 
+m_pMainTypeList->SetSelectHdl(LINK(this, ChartTypePanel, 
SelectMainTypeHdl));
+m_pSubTypeList->SetSelectHdl(LINK(this, ChartTypePanel, SelectSubTypeHdl));
+
 m_pSubTypeList->SetStyle(m_pSubTypeList->GetStyle() | WB_ITEMBORDER | 
WB_DOUBLEBORDER
  | WB_NAMEFIELD | WB_FLATVALUESET | WB_3DLOOK);
 m_pSubTypeList->SetColCount(4);
@@ -641,11 +640,14 @@ ChartTypePanel::ChartTypePanel(vcl::Window* pParent,
 m_aChartTypeDialogControllerList.push_back(
 o3tl::make_unique());
 }
+
 
m_aChartTypeDialogControllerList.push_back(o3tl::make_unique());
+
 if (bEnableComplexChartTypes)
 {
 
m_aChartTypeDialogControllerList.push_back(o3tl::make_unique());
 }
+
 m_aChartTypeDialogControllerList.push_back(
 o3tl::make_unique());
 
@@ -686,10 +688,7 @@ void ChartTypePanel::dispose()
 PanelLayout::dispose();
 }
 
-IMPL_LINK_NOARG(ChartTypePanel, SelectMainTypeHdl, ListBox&, void)
-{
-//selectMainType();
-}
+IMPL_LINK_NOARG(ChartTypePanel, SelectMainTypeHdl, ListBox&, void) { 
selectMainType(); }
 
 IMPL_LINK_NOARG(ChartTypePanel, SelectSubTypeHdl, ValueSet*, void)
 {
@@ -866,7 +865,6 @@ void 
ChartTypePanel::showAllControls(ChartTypeDialogController& rTypeController)
 bShow = rTypeController.shouldShow_SortByXValuesResourceGroup();
 m_pSortByXValuesResourceGroup->showControls(bShow);
 
-// TODO: Extend ChartTypeDialogController::showExtraControls()
 rTypeController.showExtraControls(this);
 }
 
@@ -874,6 +872,7 @@ void ChartTypePanel::fillAllControls(const 
ChartTypeParameter& rParameter,
  bool bAlsoResetSubTypeList)
 {
 m_nChangingCalls++;
+
 if (m_pCurrentMainType && bAlsoResetSubTypeList)
 {
 m_pCurrentMainType->fillSubTypeList(*m_pSubTypeList, rParameter);
@@ -942,6 +941,60 @@ void ChartTypePanel::commitToModel(const 
ChartTypeParameter& rParameter)
 m_aTimerTriggeredControllerLock.startTimer();
 m_pCurrentMainType->commitToModel(rParameter, m_xChartModel);
 }
+
+void ChartTypePanel::selectMainType()
+{
+ChartTypeParameter aParameter(getCurrentParamter());
+
+if (m_pCurrentMainType)
+{
+m_pCurrentMainType->adjustParameterToSubType(aParameter);
+m_pCurrentMainType->hideExtraControls();
+}
+
+m_pCurrentMainType = getSelectedMainType();
+if (m_pCurrentMainType)
+{
+showAllControls(*m_pCurrentMainType);
+
+m_pCurrentMainType->adjustParameterToMainType(aParameter);
+commitToModel(aParameter);
+//detect the new ThreeDLookScheme
+aParameter.eThreeDLookScheme
+= 
ThreeDHelper::detectScheme(ChartModelHelper::findDiagram(m_xChartModel));
+if (!aParameter.b3DLook && aParameter.eThreeDLookScheme != 
ThreeDLookScheme_Realistic)
+aParameter.eThreeDLookScheme = ThreeDLookScheme_Realistic;
+
+uno::Reference xDiagram
+= ChartModelHelper::findDiagram(m_xChartModel);
+try
+{
+uno::Reference xPropSet(xDiagram, 
uno::UNO_QUERY_THROW);
+xPropSet->getPropertyValue(CHART_UNONAME_SORT_BY_XVALUES) >>= 
aParameter.bSortByXValues;
+}
+catch (const uno::Exception&)
+{
+DBG_UNHANDLED_EXCEPTION("chart2");
+}
+
+fillAllControls(aParameter);
+uno::Reference 
xTemplateProps(getCurrentTemplate(), uno::UNO_QUERY);
+m_pCurrentMainType->fillExtraControls(aParameter, 

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

2019-11-07 Thread Muhammet Kara (via logerrit)
 chart2/source/controller/dialogs/ChartTypeDialogController.cxx |   64 
+-
 chart2/source/controller/dialogs/tp_ChartType.cxx  |1 
 chart2/source/controller/sidebar/ChartTypePanel.cxx|2 
 chart2/source/inc/ChartTypeDialogController.hxx|9 +
 4 files changed, 71 insertions(+), 5 deletions(-)

New commits:
commit eb38c0470195869b8c38b864cbb9692cd02f15e5
Author: Muhammet Kara 
AuthorDate: Thu Nov 7 13:51:13 2019 +0300
Commit: Muhammet Kara 
CommitDate: Thu Nov 7 13:28:54 2019 +0100

Overload showExtraControls method

and adjust CombiColumnLineChartDialogController accordingly,
to be able to use with a VCLContainer parent

Change-Id: I835a5ba0e18fe7dbfca97ee975e4d00c2ac302d4
Reviewed-on: https://gerrit.libreoffice.org/82206
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Muhammet Kara 

diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx 
b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index 04afdc14244c..b34bf3f102df 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -371,6 +372,9 @@ bool 
ChartTypeDialogController::shouldShow_SortByXValuesResourceGroup() const
 void ChartTypeDialogController::showExtraControls(weld::Builder* /*pBuilder*/)
 {
 }
+void ChartTypeDialogController::showExtraControls(VclBuilderContainer* 
/*pParent*/)
+{
+}
 void ChartTypeDialogController::hideExtraControls() const
 {
 }
@@ -1228,6 +1232,8 @@ void 
StockChartDialogController::adjustParameterToSubType( ChartTypeParameter& r
 }
 
 CombiColumnLineChartDialogController::CombiColumnLineChartDialogController()
+: m_pFT_NumberOfLines(nullptr)
+, m_pMF_NumberOfLines(nullptr)
 {
 bSupports3D = false;
 }
@@ -1294,21 +1300,51 @@ void 
CombiColumnLineChartDialogController::showExtraControls(weld::Builder* pBui
 m_xMF_NumberOfLines->show();
 }
 
+void 
CombiColumnLineChartDialogController::showExtraControls(VclBuilderContainer* 
pParent)
+{
+if (!m_pFT_NumberOfLines)
+{
+pParent->get(m_pFT_NumberOfLines, "nolinesft");
+}
+if (!m_pMF_NumberOfLines)
+{
+pParent->get(m_pMF_NumberOfLines, "nolines");
+
+m_pMF_NumberOfLines->SetSpinSize(1);
+m_pMF_NumberOfLines->SetFirst( 1 );
+m_pMF_NumberOfLines->SetLast( 100 );
+m_pMF_NumberOfLines->SetMin( 1 );
+m_pMF_NumberOfLines->SetMax( 100 );
+
+m_pMF_NumberOfLines->SetModifyHdl( LINK( this, 
CombiColumnLineChartDialogController, ChangeLineCountHdl_unwelded ) );
+}
+
+m_pFT_NumberOfLines->Show();
+m_pMF_NumberOfLines->Show();
+}
+
 void CombiColumnLineChartDialogController::hideExtraControls() const
 {
 if (m_xFT_NumberOfLines)
 m_xFT_NumberOfLines->hide();
 if (m_xMF_NumberOfLines)
 m_xMF_NumberOfLines->hide();
+
+if(m_pFT_NumberOfLines)
+m_pFT_NumberOfLines->Hide();
+if(m_pMF_NumberOfLines)
+m_pMF_NumberOfLines->Hide();
 }
 
 void CombiColumnLineChartDialogController::fillExtraControls( const 
ChartTypeParameter& /*rParameter*/
 , const uno::Reference< XChartDocument >& xChartModel
 , const uno::Reference< beans::XPropertySet >& xTemplateProps 
) const
 {
-if (!m_xMF_NumberOfLines)
+if (!m_xMF_NumberOfLines && !m_pMF_NumberOfLines)
 return;
 
+bool bIsWelded = m_xMF_NumberOfLines != nullptr;
+
 uno::Reference< frame::XModel > xModel( xChartModel, uno::UNO_QUERY );
 
 uno::Reference< XDiagram > xDiagram = ChartModelHelper::findDiagram( 
xModel );
@@ -1330,18 +1366,31 @@ void 
CombiColumnLineChartDialogController::fillExtraControls( const ChartTypePar
 }
 if( nNumLines < 0 )
 nNumLines = 0;
-m_xMF_NumberOfLines->set_value(nNumLines);
+
+if (bIsWelded)
+m_xMF_NumberOfLines->set_value(nNumLines);
+else
+m_pMF_NumberOfLines->SetValue( nNumLines );
 
 sal_Int32 nMaxLines = ChartModelHelper::getDataSeries( xModel ).size() - 1;
 if( nMaxLines < 0 )
 nMaxLines = 0;
-m_xMF_NumberOfLines->set_max(nMaxLines);
+
+if (bIsWelded)
+m_xMF_NumberOfLines->set_max(nMaxLines);
+else
+{
+m_pMF_NumberOfLines->SetLast( nMaxLines );
+m_pMF_NumberOfLines->SetMax( nMaxLines );
+}
 }
 void CombiColumnLineChartDialogController::setTemplateProperties( const 
uno::Reference< beans::XPropertySet >& xTemplateProps ) const
 {
+bool bIsWelded = m_xMF_NumberOfLines != nullptr;
 if( xTemplateProps.is() )
 {
-sal_Int32 nNumLines = m_xMF_NumberOfLines->get_value();
+sal_Int32 nNumLines =
+bIsWelded ? m_xMF_NumberOfLines->get_value() : static_cast< 
sal_Int32 

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

2019-11-07 Thread Muhammet Kara (via logerrit)
 chart2/source/controller/sidebar/ChartTypePanel.cxx |  475 +++-
 chart2/source/controller/sidebar/ChartTypePanel.hxx |8 
 2 files changed, 461 insertions(+), 22 deletions(-)

New commits:
commit 1787d5aa7e0207fdea6328b1682262265625d165
Author: Muhammet Kara 
AuthorDate: Wed Nov 6 09:42:01 2019 +0300
Commit: Muhammet Kara 
CommitDate: Thu Nov 7 09:39:05 2019 +0100

Add more resource groups to ChartTypePanel

Change-Id: I64c1d8b418f9abb537b4f23c3b31aa0e48bd3faa
Reviewed-on: https://gerrit.libreoffice.org/82119
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Muhammet Kara 

diff --git a/chart2/source/controller/sidebar/ChartTypePanel.cxx 
b/chart2/source/controller/sidebar/ChartTypePanel.cxx
index f1ed61df9ebc..006e9818a8f3 100644
--- a/chart2/source/controller/sidebar/ChartTypePanel.cxx
+++ b/chart2/source/controller/sidebar/ChartTypePanel.cxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -34,6 +35,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -138,6 +140,423 @@ IMPL_LINK_NOARG(Dim3DLookResourceGroup_unwelded, 
SelectSchemeHdl, ListBox&, void
 m_pChangeListener->stateChanged(this);
 }
 
+class StackingResourceGroup_unwelded : public ChangingResource
+{
+public:
+explicit StackingResourceGroup_unwelded(VclBuilderContainer* pWindow);
+
+void showControls(bool bShow, bool bShowDeepStacking);
+
+void fillControls(const ChartTypeParameter& rParameter);
+void fillParameter(ChartTypeParameter& rParameter);
+
+private:
+DECL_LINK(StackingChangeHdl, RadioButton&, void);
+DECL_LINK(StackingEnableHdl, CheckBox&, void);
+
+private:
+VclPtr m_pCB_Stacked;
+VclPtr m_pRB_Stack_Y;
+VclPtr m_pRB_Stack_Y_Percent;
+VclPtr m_pRB_Stack_Z;
+};
+
+StackingResourceGroup_unwelded::StackingResourceGroup_unwelded(VclBuilderContainer*
 pWindow)
+: ChangingResource()
+{
+pWindow->get(m_pCB_Stacked, "stack");
+pWindow->get(m_pRB_Stack_Y, "ontop");
+pWindow->get(m_pRB_Stack_Y_Percent, "percent");
+pWindow->get(m_pRB_Stack_Z, "deep");
+
+m_pCB_Stacked->SetToggleHdl(LINK(this, StackingResourceGroup_unwelded, 
StackingEnableHdl));
+m_pRB_Stack_Y->SetToggleHdl(LINK(this, StackingResourceGroup_unwelded, 
StackingChangeHdl));
+m_pRB_Stack_Y_Percent->SetToggleHdl(
+LINK(this, StackingResourceGroup_unwelded, StackingChangeHdl));
+m_pRB_Stack_Z->SetToggleHdl(LINK(this, StackingResourceGroup_unwelded, 
StackingChangeHdl));
+}
+
+void StackingResourceGroup_unwelded::showControls(bool bShow, bool 
bShowDeepStacking)
+{
+m_pCB_Stacked->Show(bShow);
+m_pRB_Stack_Y->Show(bShow);
+m_pRB_Stack_Y_Percent->Show(bShow);
+m_pRB_Stack_Z->Show(bShow && bShowDeepStacking);
+}
+
+void StackingResourceGroup_unwelded::fillControls(const ChartTypeParameter& 
rParameter)
+{
+m_pCB_Stacked->Check(
+rParameter.eStackMode != GlobalStackMode_NONE
+&& rParameter.eStackMode
+   != GlobalStackMode_STACK_Z); //todo remove this condition if z 
stacking radio button is really used
+switch (rParameter.eStackMode)
+{
+case GlobalStackMode_STACK_Y:
+m_pRB_Stack_Y->Check();
+break;
+case GlobalStackMode_STACK_Y_PERCENT:
+m_pRB_Stack_Y_Percent->Check();
+break;
+case GlobalStackMode_STACK_Z:
+//todo uncomment this condition if z stacking radio button is 
really used
+/*
+if( rParameter.b3DLook )
+m_pRB_Stack_Z->Check();
+else
+*/
+m_pRB_Stack_Y->Check();
+break;
+default:
+m_pRB_Stack_Y->Check();
+break;
+}
+//dis/enabling
+m_pCB_Stacked->Enable(!rParameter.bXAxisWithValues);
+m_pRB_Stack_Y->Enable(m_pCB_Stacked->IsChecked() && 
!rParameter.bXAxisWithValues);
+m_pRB_Stack_Y_Percent->Enable(m_pCB_Stacked->IsChecked() && 
!rParameter.bXAxisWithValues);
+m_pRB_Stack_Z->Enable(m_pCB_Stacked->IsChecked() && rParameter.b3DLook);
+}
+
+void StackingResourceGroup_unwelded::fillParameter(ChartTypeParameter& 
rParameter)
+{
+if (!m_pCB_Stacked->IsChecked())
+rParameter.eStackMode = GlobalStackMode_NONE;
+else if (m_pRB_Stack_Y->IsChecked())
+rParameter.eStackMode = GlobalStackMode_STACK_Y;
+else if (m_pRB_Stack_Y_Percent->IsChecked())
+rParameter.eStackMode = GlobalStackMode_STACK_Y_PERCENT;
+else if (m_pRB_Stack_Z->IsChecked())
+rParameter.eStackMode = GlobalStackMode_STACK_Z;
+}
+
+IMPL_LINK(StackingResourceGroup_unwelded, StackingChangeHdl, RadioButton&, 
rRadio, void)
+{
+//for each radio click there are coming two change events
+//first uncheck of previous button -> ignore that call
+//the second call gives the check of the new button
+if (m_pChangeListener && rRadio.IsChecked())
+

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

2019-11-06 Thread Muhammet Kara (via logerrit)
 chart2/source/controller/dialogs/ChartTypeDialogController.cxx |  387 
++
 1 file changed, 116 insertions(+), 271 deletions(-)

New commits:
commit 3c7eae575b84255ee0187974b8253b7957f20a82
Author: Muhammet Kara 
AuthorDate: Wed Nov 6 23:58:32 2019 +0300
Commit: Muhammet Kara 
CommitDate: Thu Nov 7 06:01:49 2019 +0100

Reduce code duplication in ChartTypeDialogController.cxx

by using function templates.

Change-Id: I59e18366d7481e5b33ceb6ff8b372158b513447e
Reviewed-on: https://gerrit.libreoffice.org/82179
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Muhammet Kara 

diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx 
b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index 3036dda89a30..04afdc14244c 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -433,7 +433,11 @@ const tTemplateServiceChartTypeParameterMap& 
ColumnChartDialogController::getTem
 {"com.sun.star.chart2.template.ThreeDColumnDeep" ,   
ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z)}};
 return s_aTemplateMap;
 }
-void ColumnChartDialogController::fillSubTypeList( SvtValueSet& rSubTypeList, 
const ChartTypeParameter& rParameter )
+
+namespace
+{
+template
+void ColumnChartDialogController_fillSubTypeList( AnyValueSet& rSubTypeList, 
const ChartTypeParameter& rParameter )
 {
 rSubTypeList.Clear();
 
@@ -479,52 +483,16 @@ void ColumnChartDialogController::fillSubTypeList( 
SvtValueSet& rSubTypeList, co
 rSubTypeList.SetItemText( 3, SchResId( STR_PERCENT ) );
 rSubTypeList.SetItemText( 4, SchResId( STR_DEEP ) );
 }
+} // end of anon namespace
 
-void ColumnChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, 
const ChartTypeParameter& rParameter )
+void ColumnChartDialogController::fillSubTypeList( SvtValueSet& rSubTypeList, 
const ChartTypeParameter& rParameter )
 {
-rSubTypeList.Clear();
-
-if( rParameter.b3DLook )
-{
-switch(rParameter.nGeometry3D)
-{
-case DataPointGeometry3D::CYLINDER:
-rSubTypeList.InsertItem(1, Image(StockImage::Yes, 
BMP_SAEULE_3D_1));
-rSubTypeList.InsertItem(2, Image(StockImage::Yes, 
BMP_SAEULE_3D_2));
-rSubTypeList.InsertItem(3, Image(StockImage::Yes, 
BMP_SAEULE_3D_3));
-rSubTypeList.InsertItem(4, Image(StockImage::Yes, 
BMP_SAEULE_3D_4));
-break;
-case DataPointGeometry3D::CONE:
-rSubTypeList.InsertItem(1, Image(StockImage::Yes, 
BMP_KEGEL_3D_1));
-rSubTypeList.InsertItem(2, Image(StockImage::Yes, 
BMP_KEGEL_3D_2));
-rSubTypeList.InsertItem(3, Image(StockImage::Yes, 
BMP_KEGEL_3D_3));
-rSubTypeList.InsertItem(4, Image(StockImage::Yes, 
BMP_KEGEL_3D_4));
-break;
-case DataPointGeometry3D::PYRAMID:
-rSubTypeList.InsertItem(1, Image(StockImage::Yes, 
BMP_PYRAMID_3D_1));
-rSubTypeList.InsertItem(2, Image(StockImage::Yes, 
BMP_PYRAMID_3D_2));
-rSubTypeList.InsertItem(3, Image(StockImage::Yes, 
BMP_PYRAMID_3D_3));
-rSubTypeList.InsertItem(4, Image(StockImage::Yes, 
BMP_PYRAMID_3D_4));
-break;
-default: //DataPointGeometry3D::CUBOID:
-rSubTypeList.InsertItem(1, Image(StockImage::Yes, 
BMP_COLUMNS_3D_1));
-rSubTypeList.InsertItem(2, Image(StockImage::Yes, 
BMP_COLUMNS_3D_2));
-rSubTypeList.InsertItem(3, Image(StockImage::Yes, 
BMP_COLUMNS_3D_3));
-rSubTypeList.InsertItem(4, Image(StockImage::Yes, 
BMP_COLUMNS_3D));
-break;
-}
-}
-else
-{
-rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_COLUMNS_2D_1));
-rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_COLUMNS_2D_2));
-rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_COLUMNS_2D_3));
-}
+ColumnChartDialogController_fillSubTypeList(rSubTypeList, rParameter);
+}
 
-rSubTypeList.SetItemText( 1, SchResId( STR_NORMAL ) );
-rSubTypeList.SetItemText( 2, SchResId( STR_STACKED ) );
-rSubTypeList.SetItemText( 3, SchResId( STR_PERCENT ) );
-rSubTypeList.SetItemText( 4, SchResId( STR_DEEP ) );
+void ColumnChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, 
const ChartTypeParameter& rParameter )
+{
+ColumnChartDialogController_fillSubTypeList(rSubTypeList, rParameter);
 }
 
 BarChartDialogController::BarChartDialogController()
@@ -557,7 +525,11 @@ const tTemplateServiceChartTypeParameterMap& 
BarChartDialogController::getTempla
 {"com.sun.star.chart2.template.ThreeDBarDeep" ,   
ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z)}};
 return s_aTemplateMap;
 }
-void BarChartDialogController::fillSubTypeList( SvtValueSet& rSubTypeList, 
const 

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

2019-11-06 Thread Muhammet Kara (via logerrit)
 chart2/source/controller/sidebar/ChartTypePanel.cxx |   49 
 1 file changed, 2 insertions(+), 47 deletions(-)

New commits:
commit a4fdc96db05ee1e6db338ed13c90e15297edbe7d
Author: Muhammet Kara 
AuthorDate: Wed Nov 6 20:48:07 2019 +0300
Commit: Muhammet Kara 
CommitDate: Wed Nov 6 20:26:04 2019 +0100

Use fillSubTypeList() instead of hard-coded images

To fill the chart sub-type valueset on the chart
type panel of chartdeck sidebar.

Change-Id: If0098aa5ff4b344a5bd31d7425593d0e52eb08d8
Reviewed-on: https://gerrit.libreoffice.org/82167
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Muhammet Kara 

diff --git a/chart2/source/controller/sidebar/ChartTypePanel.cxx 
b/chart2/source/controller/sidebar/ChartTypePanel.cxx
index edc7beb71425..f1ed61df9ebc 100644
--- a/chart2/source/controller/sidebar/ChartTypePanel.cxx
+++ b/chart2/source/controller/sidebar/ChartTypePanel.cxx
@@ -439,54 +439,9 @@ void ChartTypePanel::fillAllControls(const 
ChartTypeParameter& rParameter,
 m_nChangingCalls++;
 if (m_pCurrentMainType && bAlsoResetSubTypeList)
 {
-// FIXME: This is just to test. This if-block should just call 
m_pCurrentMainType->fillSubTypeList(*m_pSubTypeList, rParameter);
-// after adding a new method to ColumnChartDialogController and its 
children
-//m_pCurrentMainType->fillSubTypeList(*m_pSubTypeList, rParameter);
-//m_pCurrentMainType->fillSubTypeList(*m_pSubTypeList, rParameter);
-m_pSubTypeList->Clear();
-
-if (rParameter.b3DLook)
-{
-switch (rParameter.nGeometry3D)
-{
-case css::chart2::DataPointGeometry3D::CYLINDER:
-m_pSubTypeList->InsertItem(1, Image(StockImage::Yes, 
BMP_SAEULE_3D_1));
-m_pSubTypeList->InsertItem(2, Image(StockImage::Yes, 
BMP_SAEULE_3D_2));
-m_pSubTypeList->InsertItem(3, Image(StockImage::Yes, 
BMP_SAEULE_3D_3));
-m_pSubTypeList->InsertItem(4, Image(StockImage::Yes, 
BMP_SAEULE_3D_4));
-break;
-case css::chart2::DataPointGeometry3D::CONE:
-m_pSubTypeList->InsertItem(1, Image(StockImage::Yes, 
BMP_KEGEL_3D_1));
-m_pSubTypeList->InsertItem(2, Image(StockImage::Yes, 
BMP_KEGEL_3D_2));
-m_pSubTypeList->InsertItem(3, Image(StockImage::Yes, 
BMP_KEGEL_3D_3));
-m_pSubTypeList->InsertItem(4, Image(StockImage::Yes, 
BMP_KEGEL_3D_4));
-break;
-case css::chart2::DataPointGeometry3D::PYRAMID:
-m_pSubTypeList->InsertItem(1, Image(StockImage::Yes, 
BMP_PYRAMID_3D_1));
-m_pSubTypeList->InsertItem(2, Image(StockImage::Yes, 
BMP_PYRAMID_3D_2));
-m_pSubTypeList->InsertItem(3, Image(StockImage::Yes, 
BMP_PYRAMID_3D_3));
-m_pSubTypeList->InsertItem(4, Image(StockImage::Yes, 
BMP_PYRAMID_3D_4));
-break;
-default: //DataPointGeometry3D::CUBOID:
-m_pSubTypeList->InsertItem(1, Image(StockImage::Yes, 
BMP_COLUMNS_3D_1));
-m_pSubTypeList->InsertItem(2, Image(StockImage::Yes, 
BMP_COLUMNS_3D_2));
-m_pSubTypeList->InsertItem(3, Image(StockImage::Yes, 
BMP_COLUMNS_3D_3));
-m_pSubTypeList->InsertItem(4, Image(StockImage::Yes, 
BMP_COLUMNS_3D));
-break;
-}
-}
-else
-{
-m_pSubTypeList->InsertItem(1, Image(StockImage::Yes, 
BMP_COLUMNS_2D_1));
-m_pSubTypeList->InsertItem(2, Image(StockImage::Yes, 
BMP_COLUMNS_2D_2));
-m_pSubTypeList->InsertItem(3, Image(StockImage::Yes, 
BMP_COLUMNS_2D_3));
-}
-
-m_pSubTypeList->SetItemText(1, SchResId(STR_NORMAL));
-m_pSubTypeList->SetItemText(2, SchResId(STR_STACKED));
-m_pSubTypeList->SetItemText(3, SchResId(STR_PERCENT));
-m_pSubTypeList->SetItemText(4, SchResId(STR_DEEP));
+m_pCurrentMainType->fillSubTypeList(*m_pSubTypeList, rParameter);
 }
+
 
m_pSubTypeList->SelectItem(static_cast(rParameter.nSubTypeIndex));
 m_pDim3DLookResourceGroup->fillControls(rParameter);
 /*m_pStackingResourceGroup->fillControls( rParameter );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-11-06 Thread Muhammet Kara (via logerrit)
 chart2/source/controller/dialogs/ChartTypeDialogController.cxx |  310 
++
 chart2/source/controller/sidebar/ChartTypePanel.cxx|1 
 chart2/source/inc/ChartTypeDialogController.hxx|   12 
 3 files changed, 323 insertions(+)

New commits:
commit e3a1d65f9549c6c9e42cbebda511a9d9d6233b8a
Author: Muhammet Kara 
AuthorDate: Wed Nov 6 20:41:53 2019 +0300
Commit: Muhammet Kara 
CommitDate: Wed Nov 6 20:25:15 2019 +0100

Overload fillSubTypeList() for ValueSet param

Change-Id: Ia429db469d115e3f5190ba79ded3c191e6538fa2
Reviewed-on: https://gerrit.libreoffice.org/82166
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Muhammet Kara 

diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx 
b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index 3c34c96982f3..3036dda89a30 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -339,6 +339,10 @@ void ChartTypeDialogController::fillSubTypeList( 
SvtValueSet& rSubTypeList, cons
 {
 rSubTypeList.Clear();
 }
+void ChartTypeDialogController::fillSubTypeList( ValueSet& rSubTypeList, const 
ChartTypeParameter& /*rParameter*/ )
+{
+rSubTypeList.Clear();
+}
 bool ChartTypeDialogController::shouldShow_3DLookControl() const
 {
 return false;
@@ -476,6 +480,53 @@ void ColumnChartDialogController::fillSubTypeList( 
SvtValueSet& rSubTypeList, co
 rSubTypeList.SetItemText( 4, SchResId( STR_DEEP ) );
 }
 
+void ColumnChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, 
const ChartTypeParameter& rParameter )
+{
+rSubTypeList.Clear();
+
+if( rParameter.b3DLook )
+{
+switch(rParameter.nGeometry3D)
+{
+case DataPointGeometry3D::CYLINDER:
+rSubTypeList.InsertItem(1, Image(StockImage::Yes, 
BMP_SAEULE_3D_1));
+rSubTypeList.InsertItem(2, Image(StockImage::Yes, 
BMP_SAEULE_3D_2));
+rSubTypeList.InsertItem(3, Image(StockImage::Yes, 
BMP_SAEULE_3D_3));
+rSubTypeList.InsertItem(4, Image(StockImage::Yes, 
BMP_SAEULE_3D_4));
+break;
+case DataPointGeometry3D::CONE:
+rSubTypeList.InsertItem(1, Image(StockImage::Yes, 
BMP_KEGEL_3D_1));
+rSubTypeList.InsertItem(2, Image(StockImage::Yes, 
BMP_KEGEL_3D_2));
+rSubTypeList.InsertItem(3, Image(StockImage::Yes, 
BMP_KEGEL_3D_3));
+rSubTypeList.InsertItem(4, Image(StockImage::Yes, 
BMP_KEGEL_3D_4));
+break;
+case DataPointGeometry3D::PYRAMID:
+rSubTypeList.InsertItem(1, Image(StockImage::Yes, 
BMP_PYRAMID_3D_1));
+rSubTypeList.InsertItem(2, Image(StockImage::Yes, 
BMP_PYRAMID_3D_2));
+rSubTypeList.InsertItem(3, Image(StockImage::Yes, 
BMP_PYRAMID_3D_3));
+rSubTypeList.InsertItem(4, Image(StockImage::Yes, 
BMP_PYRAMID_3D_4));
+break;
+default: //DataPointGeometry3D::CUBOID:
+rSubTypeList.InsertItem(1, Image(StockImage::Yes, 
BMP_COLUMNS_3D_1));
+rSubTypeList.InsertItem(2, Image(StockImage::Yes, 
BMP_COLUMNS_3D_2));
+rSubTypeList.InsertItem(3, Image(StockImage::Yes, 
BMP_COLUMNS_3D_3));
+rSubTypeList.InsertItem(4, Image(StockImage::Yes, 
BMP_COLUMNS_3D));
+break;
+}
+}
+else
+{
+rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_COLUMNS_2D_1));
+rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_COLUMNS_2D_2));
+rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_COLUMNS_2D_3));
+}
+
+rSubTypeList.SetItemText( 1, SchResId( STR_NORMAL ) );
+rSubTypeList.SetItemText( 2, SchResId( STR_STACKED ) );
+rSubTypeList.SetItemText( 3, SchResId( STR_PERCENT ) );
+rSubTypeList.SetItemText( 4, SchResId( STR_DEEP ) );
+}
+
 BarChartDialogController::BarChartDialogController()
 {
 }
@@ -552,6 +603,52 @@ void BarChartDialogController::fillSubTypeList( 
SvtValueSet& rSubTypeList, const
 rSubTypeList.SetItemText( 4, SchResId( STR_DEEP ) );
 }
 
+void BarChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const 
ChartTypeParameter& rParameter )
+{
+rSubTypeList.Clear();
+
+if( rParameter.b3DLook )
+{
+switch(rParameter.nGeometry3D)
+{
+case DataPointGeometry3D::CYLINDER:
+rSubTypeList.InsertItem(1, Image(StockImage::Yes, 
BMP_ROEHRE_3D_1));
+rSubTypeList.InsertItem(2, Image(StockImage::Yes, 
BMP_ROEHRE_3D_2));
+rSubTypeList.InsertItem(3, Image(StockImage::Yes, 
BMP_ROEHRE_3D_3));
+rSubTypeList.InsertItem(4, Image(StockImage::Yes, 
BMP_ROEHRE_3D_4));
+break;
+case DataPointGeometry3D::CONE:
+rSubTypeList.InsertItem(1, Image(StockImage::Yes, 

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

2019-10-28 Thread Muhammet Kara (via logerrit)
 chart2/source/controller/dialogs/res_BarGeometry.cxx |2 
 chart2/source/controller/dialogs/tp_ChartType.cxx|  568 -
 chart2/source/inc/ChartResourceGroups.hxx|  600 +++
 chart2/source/inc/res_BarGeometry.hxx|7 
 4 files changed, 606 insertions(+), 571 deletions(-)

New commits:
commit 15487a6451ae854963d7770ef412c6ffb4c51e71
Author: Muhammet Kara 
AuthorDate: Mon Oct 28 10:02:23 2019 +0300
Commit: Muhammet Kara 
CommitDate: Mon Oct 28 19:56:21 2019 +0100

chart2: Separate ChartResourceGroups to reuse

Change-Id: I0ca2ea9cd520013250faaba0e17e713da1e6fca3
Reviewed-on: https://gerrit.libreoffice.org/81581
Reviewed-by: Muhammet Kara 
Tested-by: Muhammet Kara 

diff --git a/chart2/source/controller/dialogs/res_BarGeometry.cxx 
b/chart2/source/controller/dialogs/res_BarGeometry.cxx
index d067ae711978..c5f358d0d33b 100644
--- a/chart2/source/controller/dialogs/res_BarGeometry.cxx
+++ b/chart2/source/controller/dialogs/res_BarGeometry.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "res_BarGeometry.hxx"
+#include 
 #include 
 #include 
 #include 
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx 
b/chart2/source/controller/dialogs/tp_ChartType.cxx
index bec21d752cf1..74b3c610d5b0 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -18,11 +18,12 @@
  */
 
 #include "tp_ChartType.hxx"
+#include 
 #include 
 #include 
 #include 
 #include 
-#include "res_BarGeometry.hxx"
+#include 
 #include 
 #include 
 #include 
@@ -38,571 +39,6 @@
 
 namespace chart
 {
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::chart2;
-
-enum {
-POS_3DSCHEME_SIMPLE= 0,
-POS_3DSCHEME_REALISTIC = 1
-};
-
-class Dim3DLookResourceGroup : public ChangingResource
-{
-public:
-explicit Dim3DLookResourceGroup(weld::Builder* pBuilder);
-
-void showControls( bool bShow );
-
-void fillControls( const ChartTypeParameter& rParameter );
-void fillParameter( ChartTypeParameter& rParameter );
-
-private:
-DECL_LINK( Dim3DLookCheckHdl, weld::ToggleButton&, void );
-DECL_LINK( SelectSchemeHdl, weld::ComboBox&, void );
-
-private:
-std::unique_ptr m_xCB_3DLook;
-std::unique_ptr  m_xLB_Scheme;
-};
-
-Dim3DLookResourceGroup::Dim3DLookResourceGroup(weld::Builder* pBuilder)
-: ChangingResource()
-, m_xCB_3DLook(pBuilder->weld_check_button("3dlook"))
-, m_xLB_Scheme(pBuilder->weld_combo_box("3dscheme"))
-{
-m_xCB_3DLook->connect_toggled( LINK( this, Dim3DLookResourceGroup, 
Dim3DLookCheckHdl ) );
-m_xLB_Scheme->connect_changed( LINK( this, Dim3DLookResourceGroup, 
SelectSchemeHdl ) );
-}
-
-void Dim3DLookResourceGroup::showControls( bool bShow )
-{
-m_xCB_3DLook->show(bShow);
-m_xLB_Scheme->show(bShow);
-}
-
-void Dim3DLookResourceGroup::fillControls( const ChartTypeParameter& 
rParameter )
-{
-m_xCB_3DLook->set_active(rParameter.b3DLook);
-m_xLB_Scheme->set_sensitive(rParameter.b3DLook);
-
-if( rParameter.eThreeDLookScheme == ThreeDLookScheme_Simple )
-m_xLB_Scheme->set_active(POS_3DSCHEME_SIMPLE);
-else if( rParameter.eThreeDLookScheme == ThreeDLookScheme_Realistic )
-m_xLB_Scheme->set_active(POS_3DSCHEME_REALISTIC);
-else
-m_xLB_Scheme->set_active(-1);
-}
-
-void Dim3DLookResourceGroup::fillParameter( ChartTypeParameter& rParameter )
-{
-rParameter.b3DLook = m_xCB_3DLook->get_active();
-const int nPos = m_xLB_Scheme->get_active();
-if( nPos == POS_3DSCHEME_SIMPLE )
-rParameter.eThreeDLookScheme = ThreeDLookScheme_Simple;
-else if( nPos == POS_3DSCHEME_REALISTIC )
-rParameter.eThreeDLookScheme = ThreeDLookScheme_Realistic;
-else
-rParameter.eThreeDLookScheme = ThreeDLookScheme_Unknown;
-}
-
-IMPL_LINK_NOARG(Dim3DLookResourceGroup, Dim3DLookCheckHdl, 
weld::ToggleButton&, void)
-{
-if(m_pChangeListener)
-m_pChangeListener->stateChanged(this);
-}
-
-IMPL_LINK_NOARG(Dim3DLookResourceGroup, SelectSchemeHdl, weld::ComboBox&, void)
-{
-if(m_pChangeListener)
-m_pChangeListener->stateChanged(this);
-}
-
-class SortByXValuesResourceGroup : public ChangingResource
-{
-public:
-explicit SortByXValuesResourceGroup(weld::Builder* pBuilder);
-
-void showControls( bool bShow );
-
-void fillControls( const ChartTypeParameter& rParameter );
-void fillParameter( ChartTypeParameter& rParameter );
-
-private:
-DECL_LINK(SortByXValuesCheckHdl, weld::ToggleButton&, void);
-
-private:
-std::unique_ptr m_xCB_XValueSorting;
-};
-
-SortByXValuesResourceGroup::SortByXValuesResourceGroup(weld::Builder* pBuilder)
-: ChangingResource()
-, m_xCB_XValueSorting(pBuilder->weld_check_button("sort"))
-{
-m_xCB_XValueSorting->connect_toggled(LINK(this, 
SortByXValuesResourceGroup, SortByXValuesCheckHdl));
-}
-
-void 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - chart2/source solenv/clang-format

2019-10-17 Thread Muhammet Kara (via logerrit)
 chart2/source/controller/dialogs/ChangingResource.cxx  |2 +-
 chart2/source/controller/dialogs/ChartTypeDialogController.cxx |2 +-
 chart2/source/controller/dialogs/dlg_CreationWizard.cxx|2 +-
 chart2/source/controller/dialogs/dlg_DataSource.cxx|2 +-
 chart2/source/controller/dialogs/tp_ChartType.hxx  |4 ++--
 chart2/source/controller/dialogs/tp_DataSource.cxx |2 +-
 chart2/source/controller/dialogs/tp_RangeChooser.cxx   |2 +-
 chart2/source/inc/ChartTypeDialogController.hxx|2 +-
 solenv/clang-format/blacklist  |6 +++---
 9 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 6f7034aa89c75b705b2e575493cbc82ab37d8299
Author: Muhammet Kara 
AuthorDate: Wed Oct 16 22:05:18 2019 +0300
Commit: Muhammet Kara 
CommitDate: Thu Oct 17 14:45:28 2019 +0200

chart2: Move some headers to inc

So that they will be accessible from
inside the sidebar dir.

Change-Id: Iaf7b1a800a3b35a5c497d8122f68c97c8cdc9eff
Reviewed-on: https://gerrit.libreoffice.org/80922
Reviewed-by: Muhammet Kara 
Tested-by: Muhammet Kara 

diff --git a/chart2/source/controller/dialogs/ChangingResource.cxx 
b/chart2/source/controller/dialogs/ChangingResource.cxx
index 6e1ba1c67274..c50f274dadd4 100644
--- a/chart2/source/controller/dialogs/ChangingResource.cxx
+++ b/chart2/source/controller/dialogs/ChangingResource.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "ChangingResource.hxx"
+#include 
 
 namespace chart
 {
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx 
b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index 56a7a2173c88..3c34c96982f3 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "ChartTypeDialogController.hxx"
+#include 
 #include 
 #include 
 #include 
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx 
b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
index c9da0b2227e7..60fbf69c289a 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
@@ -27,7 +27,7 @@
 #include "tp_RangeChooser.hxx"
 #include "tp_Wizard_TitlesAndObjects.hxx"
 #include "tp_DataSource.hxx"
-#include "ChartTypeTemplateProvider.hxx"
+#include 
 #include "DialogModel.hxx"
 
 #define CHART_WIZARD_PAGEWIDTH  250
diff --git a/chart2/source/controller/dialogs/dlg_DataSource.cxx 
b/chart2/source/controller/dialogs/dlg_DataSource.cxx
index 86651bcfd6bd..fdbafd92b693 100644
--- a/chart2/source/controller/dialogs/dlg_DataSource.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataSource.cxx
@@ -20,7 +20,7 @@
 #include 
 #include 
 #include 
-#include "ChartTypeTemplateProvider.hxx"
+#include 
 #include 
 #include 
 #include "DialogModel.hxx"
diff --git a/chart2/source/controller/dialogs/tp_ChartType.hxx 
b/chart2/source/controller/dialogs/tp_ChartType.hxx
index 4470ed60443d..22b354a22ad3 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.hxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.hxx
@@ -22,8 +22,8 @@
 
 #include 
 
-#include "ChartTypeDialogController.hxx"
-#include "ChartTypeTemplateProvider.hxx"
+#include 
+#include 
 #include 
 
 #include 
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx 
b/chart2/source/controller/dialogs/tp_DataSource.cxx
index 758664428019..16c2d7f59222 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -21,7 +21,7 @@
 #include 
 #include 
 #include 
-#include "ChartTypeTemplateProvider.hxx"
+#include 
 #include 
 #include 
 #include 
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx 
b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
index 130ab64df371..c809f757125d 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
@@ -20,7 +20,7 @@
 #include "tp_RangeChooser.hxx"
 #include 
 #include 
-#include "ChartTypeTemplateProvider.hxx"
+#include 
 #include "DialogModel.hxx"
 #include 
 #include 
diff --git a/chart2/source/controller/dialogs/ChangingResource.hxx 
b/chart2/source/inc/ChangingResource.hxx
similarity index 100%
rename from chart2/source/controller/dialogs/ChangingResource.hxx
rename to chart2/source/inc/ChangingResource.hxx
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.hxx 
b/chart2/source/inc/ChartTypeDialogController.hxx
similarity index 99%
rename from chart2/source/controller/dialogs/ChartTypeDialogController.hxx
rename to chart2/source/inc/ChartTypeDialogController.hxx
index 2985d31b10db..4a38768e9f77 100644
--- 

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

2019-10-16 Thread Szymon Kłos (via logerrit)
 chart2/source/controller/main/ChartController_Window.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit ba088fc39c929c90a14451d75989241a6f18df7d
Author: Szymon Kłos 
AuthorDate: Tue Oct 15 17:22:32 2019 +0200
Commit: Szymon Kłos 
CommitDate: Wed Oct 16 10:27:20 2019 +0200

Disable chart doubleclick on mobile

To not show any dialog.

Change-Id: Ie19df429b927f746d3fc511ab0aa7b489ec1fd18
Reviewed-on: https://gerrit.libreoffice.org/80850
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/chart2/source/controller/main/ChartController_Window.cxx 
b/chart2/source/controller/main/ChartController_Window.cxx
index 1d058138aa49..9a0c19544c70 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -82,6 +82,9 @@
 #include 
 #include 
 
+#include 
+#include 
+
 #define DRGPIX2 // Drag MinMove in Pixel
 
 using namespace ::com::sun::star;
@@ -924,6 +927,10 @@ void ChartController::execute_MouseButtonUp( const 
MouseEvent& rMEvt )
 
 void ChartController::execute_DoubleClick( const Point* pMousePixel )
 {
+bool isMobile = 
comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView());
+if (isMobile)
+return;
+
 bool bEditText = false;
 if ( m_aSelection.hasSelection() )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - chart2/source sc/source svtools/source sw/source

2019-09-28 Thread Szymon Kłos (via logerrit)
 chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx |   54 ++--
 chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx |   16 -
 sc/source/ui/drawfunc/fuins2.cxx|  130 ++--
 sc/source/ui/inc/fuinsert.hxx   |   14 +
 sc/source/ui/inc/tabvwsh.hxx|3 
 sc/source/ui/view/tabvwsh4.cxx  |1 
 sc/source/ui/view/tabvwshb.cxx  |2 
 svtools/source/dialogs/wizardmachine.cxx|9 
 sw/source/uibase/inc/chartins.hxx   |8 
 sw/source/uibase/inc/textsh.hxx |3 
 sw/source/uibase/shells/textsh.cxx  |   23 ++
 sw/source/uibase/table/chartins.cxx |   32 +-
 12 files changed, 176 insertions(+), 119 deletions(-)

New commits:
commit cb01bb34713f39b55b5994c7a756d95db4a81231
Author: Szymon Kłos 
AuthorDate: Wed Apr 17 17:33:10 2019 +0200
Commit: Michael Meeks 
CommitDate: Sat Sep 28 11:00:00 2019 +0200

Make Chart Creation Wizard async

* FuInsertChart as a memeber in ScTabViewShell
  stores instance is needed to react on the dialog's result
* CreationWizardUnoDlg converted to XAsynchronousExecutableDialog
  added dialog close handler which notifies listeners
  In the Online dialog become dead after closing, additional
  PostUserEvent was needed to kill the dialog after real close
  (without it user needed to select any cell to close dialog)
* Reuse in Writer

Change-Id: I9fe123d5c189d568f0edb4d36173a224a820a8a3
Reviewed-on: https://gerrit.libreoffice.org/79654
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx 
b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
index 9606ae805c6f..ba08b5b7ed55 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard_UNO.cxx
@@ -32,6 +32,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace chart
 {
@@ -83,9 +84,9 @@ void SAL_CALL CreationWizardUnoDlg::release() throw ()
 }
 uno::Any SAL_CALL CreationWizardUnoDlg::queryAggregation( uno::Type const & 
rType )
 {
-if (rType == cppu::UnoType::get())
+if (rType == 
cppu::UnoType::get())
 {
-void * p = static_cast< ui::dialogs::XExecutableDialog * >( this );
+void * p = static_cast< ui::dialogs::XAsynchronousExecutableDialog * 
>( this );
 return uno::Any( , rType );
 }
 else if (rType == cppu::UnoType::get())
@@ -120,9 +121,8 @@ uno::Sequence< uno::Type > CreationWizardUnoDlg::getTypes()

cppu::UnoType::get(),

cppu::UnoType::get(),

cppu::UnoType::get(),
-   
cppu::UnoType::get(),
+   
cppu::UnoType::get(),

cppu::UnoType::get() };
-
 return aTypeList;
 }
 
@@ -147,7 +147,7 @@ void SAL_CALL CreationWizardUnoDlg::disposing( const 
lang::EventObject& /*Source
 //Listener should deregister himself and release all references to the 
closing object.
 }
 
-void SAL_CALL CreationWizardUnoDlg::setTitle( const OUString& /*rTitle*/ )
+void SAL_CALL CreationWizardUnoDlg::setDialogTitle( const OUString& /*rTitle*/ 
)
 {
 }
 void CreationWizardUnoDlg::createDialogOnDemand()
@@ -176,32 +176,34 @@ void CreationWizardUnoDlg::createDialogOnDemand()
 }
 uno::Reference< XComponent > xComp( this );
 if( m_xChartModel.is() )
-{
 m_pDialog = VclPtr::Create( pParent, 
m_xChartModel, m_xCC );
-m_pDialog->AddEventListener( LINK( this, CreationWizardUnoDlg, 
DialogEventHdl ) );
-}
 }
 }
-IMPL_LINK( CreationWizardUnoDlg, DialogEventHdl, VclWindowEvent&, rEvent, void 
)
-{
-if(rEvent.GetId() == VclEventId::ObjectDying)
-m_pDialog = nullptr;//avoid duplicate destruction of m_pDialog
-}
 
-sal_Int16 SAL_CALL CreationWizardUnoDlg::execute(  )
+void SAL_CALL CreationWizardUnoDlg::startExecuteModal( const 
css::uno::Reference& xListener )
 {
-sal_Int16 nRet = RET_CANCEL;
-{
-SolarMutexGuard aSolarGuard;
-createDialogOnDemand();
-if( !m_pDialog )
-return nRet;
-TimerTriggeredControllerLock aTimerTriggeredControllerLock( 
m_xChartModel );
-if( m_bUnlockControllersOnExecute && m_xChartModel.is() )
-m_xChartModel->unlockControllers();
-nRet = m_pDialog->Execute();
-}
-return nRet;
+SolarMutexGuard aSolarGuard;
+m_xDlgClosedListener = xListener;
+createDialogOnDemand();
+
+if( !m_pDialog )
+return;
+
+