[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - chart2/source
chart2/source/controller/main/ControllerCommandDispatch.cxx | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) New commits: commit 3b61e6ceca567ea94a0ec35e49f49addd216358b Author: Kohei Yoshida Date: Fri Jun 6 11:23:02 2014 -0400 fdo#78860: Swap the logic here: Disable -> Enable. Because the UNO property logic had been swapped earlier. Change-Id: I35af3e8cee3c4cbc8da43d7bc478f506048887b0 (cherry picked from commit c4ac853409afcb451bed0d044d36131a08e8e403) diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx index fe3fbb3..7f4f4c1 100644 --- a/chart2/source/controller/main/ControllerCommandDispatch.cxx +++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx @@ -525,7 +525,7 @@ void ControllerCommandDispatch::updateCommandAvailability() bool bShapeContext = m_pChartController && m_pChartController->isShapeContext(); -bool bDisableDataTableDialog = false; +bool bEnableDataTableDialog = false; if ( m_xController.is() ) { Reference< beans::XPropertySet > xProps( m_xController->getModel(), uno::UNO_QUERY ); @@ -533,7 +533,7 @@ void ControllerCommandDispatch::updateCommandAvailability() { try { -xProps->getPropertyValue( "EnableDataTableDialog" ) >>= bDisableDataTableDialog; +xProps->getPropertyValue("EnableDataTableDialog") >>= bEnableDataTableDialog; } catch( const uno::Exception& e ) { @@ -613,7 +613,7 @@ void ControllerCommandDispatch::updateCommandAvailability() // depending on own data m_aCommandAvailability[ ".uno:DataRanges" ] = bIsWritable && bModelStateIsValid && (! m_apModelState->bHasOwnData); -m_aCommandAvailability[ ".uno:DiagramData" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasOwnData && !bDisableDataTableDialog; +m_aCommandAvailability[ ".uno:DiagramData" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasOwnData && bEnableDataTableDialog; // titles m_aCommandAvailability[ ".uno:MainTitle" ] = bIsWritable && bModelStateIsValid && m_apModelState->bHasMainTitle; @@ -649,9 +649,9 @@ void ControllerCommandDispatch::updateCommandAvailability() // series arrangement m_aCommandAvailability[ ".uno:Forward" ] = ( bShapeContext ? isShapeControllerCommandAvailable( ".uno:Forward" ) : -( bIsWritable && bControllerStateIsValid && m_apControllerState->bMayMoveSeriesForward && !bDisableDataTableDialog ) ); +( bIsWritable && bControllerStateIsValid && m_apControllerState->bMayMoveSeriesForward && bEnableDataTableDialog ) ); m_aCommandAvailability[ ".uno:Backward" ] = ( bShapeContext ? isShapeControllerCommandAvailable( ".uno:Backward" ) : -( bIsWritable && bControllerStateIsValid && m_apControllerState->bMayMoveSeriesBackward && !bDisableDataTableDialog ) ); +( bIsWritable && bControllerStateIsValid && m_apControllerState->bMayMoveSeriesBackward && bEnableDataTableDialog ) ); m_aCommandAvailability[ ".uno:InsertDataLabels" ] = bIsWritable; m_aCommandAvailability[ ".uno:InsertDataLabel" ] = bIsWritable; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - chart2/source
chart2/source/inc/macros.hxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b1043b565530309ecadba4d135bccb2773c49d67 Author: Markus Mohrhard Date: Sun Jul 13 07:26:24 2014 +0200 disable 3D OpenGL chart feature is not ready for the release Change-Id: Ibca7d1db4f8eb4e7130e2b05fb86706135a41b1c Reviewed-on: https://gerrit.libreoffice.org/10261 Reviewed-by: Zolnai Tamás Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/chart2/source/inc/macros.hxx b/chart2/source/inc/macros.hxx index 2319afe..21e5911 100644 --- a/chart2/source/inc/macros.hxx +++ b/chart2/source/inc/macros.hxx @@ -30,7 +30,7 @@ typeid( ex ).name() << ", Message: " << \ ex.Message ) -#define ENABLE_GL3D_BARCHART 1 +#define ENABLE_GL3D_BARCHART 0 #endif ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - chart2/source
chart2/source/view/main/ChartView.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 818f4d14981f6731090e5d3ea7c818c9149b4d27 Author: Kohei Yoshida Date: Thu Jul 31 23:33:14 2014 -0400 fdo#75380: Let's not always set the line style to NONE here. This one line guarantees that no matter what the real line style is, it will be ignored. Change-Id: I3bceaf49ce13ddb42ceb56750d8a4ccfef54033b (cherry picked from commit 6053491532a5d9954caaa4abf09af30850f0cb94) Reviewed-on: https://gerrit.libreoffice.org/10671 Reviewed-by: Markus Mohrhard Tested-by: Markus Mohrhard diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index e1f9561..f5f0fb1 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2326,7 +2326,6 @@ void formatPage( //format page tPropertyNameValueMap aNameValueMap; -aNameValueMap.insert( tPropertyNameValueMap::value_type( "LineStyle", uno::makeAny( drawing::LineStyle_NONE ))); PropertyMapper::getValueMap( aNameValueMap, PropertyMapper::getPropertyNameMapForFillAndLineProperties(), xModelPage ); OUString aCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, OUString() ) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - chart2/source
chart2/source/controller/inc/TextLabelItemConverter.hxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 6d9fc845f7b08977e3711b1dbe20ee44e62c3b3d Author: Michael Stahl Date: Mon Aug 4 11:47:28 2014 +0200 hate that stupid auto_ptr deprecation warning Change-Id: I8b290b61d7f081d5b2b72805968a374c91721cc3 diff --git a/chart2/source/controller/inc/TextLabelItemConverter.hxx b/chart2/source/controller/inc/TextLabelItemConverter.hxx index 405d459..2ff8875 100644 --- a/chart2/source/controller/inc/TextLabelItemConverter.hxx +++ b/chart2/source/controller/inc/TextLabelItemConverter.hxx @@ -33,6 +33,7 @@ namespace chart { namespace wrapper { class TextLabelItemConverter : public ::comphelper::ItemConverter { public: +SAL_WNODEPRECATED_DECLARATIONS_PUSH TextLabelItemConverter( const css::uno::Reference& xChartModel, const css::uno::Reference& rPropertySet, @@ -42,6 +43,7 @@ public: bool bDataSeries = false, sal_Int32 nNumberFormat = 0, sal_Int32 nPercentNumberFormat = 0 ); +SAL_WNODEPRECATED_DECLARATIONS_POP virtual ~TextLabelItemConverter(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - chart2/source
chart2/source/view/main/ChartView.cxx | 32 +--- 1 file changed, 1 insertion(+), 31 deletions(-) New commits: commit 73ff5af13bd25b2d0e3a56dd196da217c844a07d Author: Kohei Yoshida Date: Tue Aug 5 14:57:18 2014 -0400 bnc#886540: Let's not push the available area down when no titles are there. This improves visual layout compability with MS Office chart & looks better. Change-Id: I348ea81152eca4e3bba9e0d9460448d9314738ad (cherry picked from commit b398ed8e3f95b75705bb2e53d49589ef7fdbb1c7) Reviewed-on: https://gerrit.libreoffice.org/10770 Reviewed-by: Matúš Kukan Tested-by: Matúš Kukan diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index f5f0fb1..5ea6c95 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2250,37 +2250,7 @@ boost::shared_ptr lcl_createTitle( TitleHelper::eTitleType eType break; } } -else -{ -// #i109336# Improve auto positioning in chart -switch ( eAlignment ) -{ -case ALIGN_TOP: -{ -rRemainingSpace.Y += nYDistance; -rRemainingSpace.Height -= nYDistance; -} -break; -case ALIGN_BOTTOM: -{ -rRemainingSpace.Height -= nYDistance; -} -break; -case ALIGN_LEFT: -{ -rRemainingSpace.X += nXDistance; -rRemainingSpace.Width -= nXDistance; -} -break; -case ALIGN_RIGHT: -{ -rRemainingSpace.Width -= nXDistance; -} -break; -default: -break; -} -} + return apVTitle; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - chart2/source
chart2/source/view/charttypes/GL3DBarChart.cxx |4 ++-- chart2/source/view/main/GL3DRenderer.cxx | 14 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) New commits: commit bd5ebeb67a7f672bb88c5bee0ad983546401e49b Author: Tomáš Chvátal Date: Tue Jun 17 11:25:17 2014 +0200 Allow building with more recent glm versions Use glm::scale(glm::vec3(x, y, z)) instead of glm::scale(x, y, z) Cherry-pick of: 7da3ce7cdb05bcced9ba61724e33d7a395e44e10 Change-Id: Ib9ad6b57cb6b74c8c43c9f6b48f312bfc499ffbe Reviewed-on: https://gerrit.libreoffice.org/9808 Reviewed-by: Fridrich Strba Tested-by: Fridrich Strba diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 036939e..6b7054e 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -121,8 +121,8 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector& rDataSer float nXPos = nIndex * (nBarSizeX + nBarDistanceX); -glm::mat4 aScaleMatrix = glm::scale(nBarSizeX, nBarSizeY, nVal); -glm::mat4 aTranslationMatrix = glm::translate(nXPos, nYPos, 0.0f); +glm::mat4 aScaleMatrix = glm::scale(glm::vec3(nBarSizeX, nBarSizeY, nVal)); +glm::mat4 aTranslationMatrix = glm::translate(glm::vec3(nXPos, nYPos, 0.0f)); glm::mat4 aBarPosition = aTranslationMatrix * aScaleMatrix; maShapes.push_back(new opengl3D::Bar(mpRenderer.get(), aBarPosition, nColor, nId++)); diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx index 8c0b449..91c2298 100644 --- a/chart2/source/view/main/GL3DRenderer.cxx +++ b/chart2/source/view/main/GL3DRenderer.cxx @@ -1003,7 +1003,7 @@ void OpenGL3DRenderer::AddShape3DExtrudeObject(bool roundedCorner, sal_uInt32 nC m_Extrude3DInfo.yScale = glm::length(DirY); m_Extrude3DInfo.zScale = glm::length(DirZ); glm::mat4 transformMatrixInverse = glm::inverse(glm::translate(glm::vec3(tranform))); -glm::mat4 scaleMatrixInverse = glm::inverse(glm::scale(m_Extrude3DInfo.xScale, m_Extrude3DInfo.yScale, m_Extrude3DInfo.zScale * crossZ)); +glm::mat4 scaleMatrixInverse = glm::inverse(glm::scale(glm::vec3(m_Extrude3DInfo.xScale, m_Extrude3DInfo.yScale, m_Extrude3DInfo.zScale * crossZ))); m_Extrude3DInfo.rotation = transformMatrixInverse * modelMatrix * scaleMatrixInverse; //color m_Extrude3DInfo.extrudeColor = getColorAsVector(nColor); @@ -1109,7 +1109,7 @@ void OpenGL3DRenderer::RenderExtrudeFlatSurface(const Extrude3DInfo& extrude3D, extrude3D.yTransform, extrude3D.zTransform}; glm::mat4 aTranslationMatrix = glm::translate(glm::vec3(trans.x, trans.y, trans.z)); -glm::mat4 flatScale = glm::scale(xyScale, xyScale, xyScale); +glm::mat4 flatScale = glm::scale(glm::vec3(xyScale, xyScale, xyScale)); m_Model = aTranslationMatrix * extrude3D.rotation * flatScale; if(!mbPickingMode) { @@ -1150,7 +1150,7 @@ void OpenGL3DRenderer::RenderExtrudeBottomSurface(const Extrude3DInfo& extrude3D else { glm::mat4 topTrans = glm::translate(glm::vec3(0.0, 0.0, -actualZTrans)); -glm::mat4 topScale = glm::scale(xyScale, xyScale, xyScale); +glm::mat4 topScale = glm::scale(glm::vec3(xyScale, xyScale, xyScale)); glm::mat4 aTranslationMatrix = glm::translate(glm::vec3(trans.x, trans.y, trans.z)); m_Model = aTranslationMatrix * extrude3D.rotation * topTrans * topScale; } @@ -1189,7 +1189,7 @@ void OpenGL3DRenderer::RenderExtrudeMiddleSurface(const Extrude3DInfo& extrude3D } else { -glm::mat4 scale = glm::scale(xyScale, xyScale,actualZScale); +glm::mat4 scale = glm::scale(glm::vec3(xyScale, xyScale,actualZScale)); glm::mat4 aTranslationMatrix = glm::translate(glm::vec3(trans.x, trans.y, trans.z)); m_Model = aTranslationMatrix * extrude3D.rotation * scale; } @@ -1231,7 +1231,7 @@ void OpenGL3DRenderer::RenderExtrudeTopSurface(const Extrude3DInfo& extrude3D) //yScale /= (float)(1 + BOTTOM_THRESHOLD); zScale /= (float)(m_RoundBarMesh.bottomThreshold); glm::mat4 orgTrans = glm::translate(glm::vec3(0.0, 0.0, -1.0)); -glm::mat4 scale = glm::scale(xyScale, xyScale, zScale); +glm::mat4 scale = glm::scale(glm::vec3(xyScale, xyScale, zScale)); //MoveModelf(trans, angle, scale); glm::mat4 aTranslationMatrix = glm::translate(glm::vec3(trans.x, trans.y, trans.z)); m_Model = aTranslationMatrix * extrude3D.rotation * scale * orgTrans; @@ -1241,7 +1241,7 @@ void OpenGL3DRenderer::RenderExtrudeTopSurface(const Extrude3DInfo& extrude3D) // use different matrices for different parts glm::mat4 orgTrans = glm::translate(glm::vec3(0.0, 0.0, -1.0)); glm::mat4 topTrans
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - chart2/source
chart2/source/controller/dialogs/tp_Scale.cxx | 24 +--- chart2/source/controller/dialogs/tp_Scale.hxx |3 +-- 2 files changed, 18 insertions(+), 9 deletions(-) New commits: commit 0ea3f764d70b9223a733d8c2857f42fefd17c536 Author: Katarina Behrens Date: Fri Jun 13 23:44:50 2014 +0200 fdo#79028: ungroup widgets and Show() them correctly Showing the whole box (m_pBxMain) shows all children widgets, but that's not what we want as different widgets must be exposed in case of date vs. non-date axis. m_pMt_MainDateStep was then visible at all times, thus bWasDateAxis was always true and m_pFmtFldStepMain value got unintentionally reset Change-Id: I4be0b18f181a45fe6bd3cac0594d6a34d875293e diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx index a3df39f..805cc62 100644 --- a/chart2/source/controller/dialogs/tp_Scale.cxx +++ b/chart2/source/controller/dialogs/tp_Scale.cxx @@ -84,13 +84,12 @@ ScaleTabPage::ScaleTabPage(Window* pWindow,const SfxItemSet& rInAttrs) : get(m_pLB_TimeResolution, "LB_TIME_RESOLUTION"); get(m_pCbx_AutoTimeResolution, "CBX_AUTO_TIME_RESOLUTION"); -get(m_pBxMain, "boxMAIN"); +get(m_pTxtMain, "TXT_STEP_MAIN"); get(m_pFmtFldStepMain, "EDT_STEP_MAIN"); get(m_pMt_MainDateStep, "MT_MAIN_DATE_STEP"); get(m_pLB_MainTimeUnit, "LB_MAIN_TIME_UNIT"); get(m_pCbxAutoStepMain, "CBX_AUTO_STEP_MAIN"); -get(m_pBxMinor, "boxMINOR"); get(m_pMtStepHelp, "MT_STEPHELP"); get(m_pLB_HelpTimeUnit, "LB_HELP_TIME_UNIT"); get(m_pCbxAutoStepHelp, "CBX_AUTO_STEP_HELP"); @@ -147,13 +146,16 @@ void ScaleTabPage::EnableControls() m_pCbxLogarithm->Show( bValueAxis && !bDateAxis ); m_pBxMinMax->Show(bValueAxis); -m_pBxMain->Show( bValueAxis ); -m_pBxMinor->Show( bValueAxis ); -m_pBxOrigin->Show( m_bShowAxisOrigin && bValueAxis ); + +m_pTxtMain->Show( bValueAxis ); +m_pCbxAutoStepMain->Show( bValueAxis ); m_pTxtHelpCount->Show( bValueAxis && !bDateAxis ); m_pTxtHelp->Show( bDateAxis ); +m_pMtStepHelp->Show( bValueAxis ); +m_pCbxAutoStepHelp->Show( bValueAxis ); +m_pBxOrigin->Show( m_bShowAxisOrigin && bValueAxis ); m_pBxResolution->Show( bDateAxis ); bool bWasDateAxis = m_pMt_MainDateStep->IsVisible(); @@ -165,6 +167,7 @@ void ScaleTabPage::EnableControls() else m_pMt_MainDateStep->SetValue( static_cast(m_pFmtFldStepMain->GetValue()) ); } + m_pFmtFldStepMain->Show( bValueAxis && !bDateAxis ); m_pMt_MainDateStep->Show( bDateAxis ); @@ -603,8 +606,15 @@ void ScaleTabPage::HideAllControls() m_pBxType->Hide(); m_pCbxLogarithm->Hide(); m_pBxMinMax->Hide(); -m_pBxMain->Hide(); -m_pBxMinor->Hide(); +m_pTxtMain->Hide(); +m_pFmtFldStepMain->Hide(); +m_pMt_MainDateStep->Hide(); +m_pLB_MainTimeUnit->Hide(); +m_pCbxAutoStepMain->Hide(); +m_pTxtHelpCount->Hide(); +m_pTxtHelp->Hide(); +m_pMtStepHelp->Hide(); +m_pCbxAutoStepHelp->Hide(); m_pBxOrigin->Hide(); m_pBxResolution->Hide(); } diff --git a/chart2/source/controller/dialogs/tp_Scale.hxx b/chart2/source/controller/dialogs/tp_Scale.hxx index 6839c09..7cb1b48 100644 --- a/chart2/source/controller/dialogs/tp_Scale.hxx +++ b/chart2/source/controller/dialogs/tp_Scale.hxx @@ -65,13 +65,12 @@ private: ListBox* m_pLB_TimeResolution; CheckBox*m_pCbx_AutoTimeResolution; -VclBox* m_pBxMain; +FixedText* m_pTxtMain; FormattedField* m_pFmtFldStepMain; MetricField* m_pMt_MainDateStep; ListBox* m_pLB_MainTimeUnit; CheckBox*m_pCbxAutoStepMain; -VclBox* m_pBxMinor; FixedText* m_pTxtHelpCount; FixedText* m_pTxtHelp; MetricField* m_pMtStepHelp; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - chart2/source
chart2/source/view/charttypes/BarChart.cxx |9 ++--- chart2/source/view/charttypes/BubbleChart.cxx | 18 -- chart2/source/view/charttypes/GL3DBarChart.cxx |4 +++- chart2/source/view/charttypes/PieChart.cxx |9 ++--- chart2/source/view/main/VDataSeries.cxx|2 +- 5 files changed, 28 insertions(+), 14 deletions(-) New commits: commit 701f4543f316ff3fdccdab4f0ed9b393d2391d2f Author: Markus Mohrhard Date: Sun Jun 22 03:11:35 2014 +0200 don't try to set property mapping if there is no value Change-Id: I422d651e303553e2ce30895b44b8d96664418c19 Reviewed-on: https://gerrit.libreoffice.org/9850 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx index aa53db0..cf46db8 100644 --- a/chart2/source/view/charttypes/BarChart.cxx +++ b/chart2/source/view/charttypes/BarChart.cxx @@ -808,9 +808,12 @@ void BarChart::createShapes() if(bHasFillColorMapping) { -uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW ); -xProps->setPropertyValue("FillColor", uno::makeAny(static_cast( - pSeries->getValueByProperty(nPointIndex, "FillColor"; +double nPropVal = pSeries->getValueByProperty(nPointIndex, "FillColor"); +if(!rtl::math::isNan(nPropVal)) +{ +uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW ); +xProps->setPropertyValue("FillColor", uno::makeAny(static_cast(nPropVal))); +} } //set name/classified ObjectID (CID) ShapeFactory::setShapeName(xShape diff --git a/chart2/source/view/charttypes/BubbleChart.cxx b/chart2/source/view/charttypes/BubbleChart.cxx index c8c6db5..45d91a6 100644 --- a/chart2/source/view/charttypes/BubbleChart.cxx +++ b/chart2/source/view/charttypes/BubbleChart.cxx @@ -324,15 +324,21 @@ void BubbleChart::createShapes() if(bHasFillColorMapping) { -uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW ); -xProps->setPropertyValue("FillColor", uno::makeAny(static_cast( - pSeries->getValueByProperty(nIndex, "FillColor"; +double nPropVal = pSeries->getValueByProperty(nIndex, "FillColor"); +if(!rtl::math::isNan(nPropVal)) +{ +uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW ); +xProps->setPropertyValue("FillColor", uno::makeAny(static_cast(nPropVal))); +} } if(bHasBorderColorMapping) { -uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW ); -xProps->setPropertyValue("LineColor", uno::makeAny(static_cast( - pSeries->getValueByProperty(nIndex, "LineColor"; +double nPropVal = pSeries->getValueByProperty(nIndex, "LineColor"); +if(!rtl::math::isNan(nPropVal)) +{ +uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW ); +xProps->setPropertyValue("LineColor", uno::makeAny(static_cast(nPropVal))); +} } m_pShapeFactory->setShapeName( xShape, "MarkHandles" ); diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 6b7054e..4c52dea 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -114,7 +114,9 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector& rDataSer { if(bMappedFillProperty) { -nColor = static_cast(rDataSeries.getValueByProperty(nIndex, "FillColor")); +double nPropVal = rDataSeries.getValueByProperty(nIndex, "FillColor"); +if(!rtl::math::isNan(nPropVal)) +nColor = static_cast(nPropVal); } float nVal = rDataSeries.getYValue(nIndex); diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - chart2/source
chart2/source/controller/dialogs/DataBrowser.cxx |3 +-- chart2/source/controller/main/ChartController_EditData.cxx |4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) New commits: commit 388e66387bb6346f7cdc8b55ade39fd6a0bc2545 Author: Kohei Yoshida Date: Fri Jun 27 11:31:06 2014 -0400 Flush modified data to the model when pressing OK in the data table dialog. This dialog used to have no OK / Cancel buttons, and the data would get flushed when the dialog got dismissed. This behavior got lost during the dialog conversion. Also, SaveModified() does check whether or not the data table is modified. No need to call IsModified() before calling SaveModified(). Change-Id: I5cea88cb52127cc5c7c1be67a5a592d87df92d0c (cherry picked from commit 483a4b546c850e82a2d1d304238d4830ac6b441f) Reviewed-on: https://gerrit.libreoffice.org/9940 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index 94174dd..bf4f089 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -1202,8 +1202,7 @@ bool DataBrowser::SaveModified() bool DataBrowser::EndEditing() { -if( IsModified()) -SaveModified(); +SaveModified(); // apply changes made to series headers ::std::for_each( m_aSeriesHeaders.begin(), m_aSeriesHeaders.end(), impl::applyChangesFunctor()); diff --git a/chart2/source/controller/main/ChartController_EditData.cxx b/chart2/source/controller/main/ChartController_EditData.cxx index c87f167..726ba03 100644 --- a/chart2/source/controller/main/ChartController_EditData.cxx +++ b/chart2/source/controller/main/ChartController_EditData.cxx @@ -57,8 +57,8 @@ void ChartController::executeDispatch_EditData() SCH_RESSTR( STR_ACTION_EDIT_CHART_DATA ), m_xUndoManager ); DataEditor aDataEditorDialog( pParent, xChartDoc, m_xCC ); -// the dialog has no OK/Cancel -aDataEditorDialog.Execute(); +if (aDataEditorDialog.Execute() == RET_OK) +aDataEditorDialog.ApplyChangesToModel(); aUndoGuard.commit(); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - chart2/source
chart2/source/controller/dialogs/DataBrowserModel.cxx |4 1 file changed, 4 deletions(-) New commits: commit 556412d3fa3916b1e1d0375fa999fdf92136b64e Author: Kohei Yoshida Date: Thu Jun 26 14:51:47 2014 -0400 fdo#79151: No need to offset column index by category labels. In fact, doing so would lead to a corrupt internal data table. The internal data stores category labels separately from the column data, so there is no reason why we need to offset for category labels here. (cherry picked from commit ecde8155fefcdacb08177a10a4eddc24f6675b0b) Conflicts: chart2/source/controller/dialogs/DataBrowserModel.cxx Change-Id: I29dd99e53837cba7a1e28d2a1ef39a5384378805 Reviewed-on: https://gerrit.libreoffice.org/9927 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx index 8a85f8e..ceccad0 100644 --- a/chart2/source/controller/dialogs/DataBrowserModel.cxx +++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx @@ -345,9 +345,6 @@ void DataBrowserModel::insertDataSeries( sal_Int32 nAfterColumnIndex ) if( xChartType.is()) { -sal_Int32 nOffset = 0; -if( xDiagram.is() && lcl_ShowCategories( xDiagram )) -nOffset=getCategoryColumnCount(); // get shared sequences of current series Reference< chart2::XDataSeriesContainer > xSeriesCnt( xChartType, uno::UNO_QUERY ); lcl_tSharedSeqVec aSharedSequences; @@ -365,7 +362,6 @@ void DataBrowserModel::insertDataSeries( sal_Int32 nAfterColumnIndex ) xSource->getDataSequences()); sal_Int32 nSeqIdx = 0; sal_Int32 nSeqSize = aLSequences.getLength(); -nStartCol -= (nOffset - 1); for( sal_Int32 nIndex = nStartCol; (nSeqIdx < nSeqSize); ++nSeqIdx ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - chart2/source
chart2/source/view/main/OpenGLRender.cxx |3 +++ chart2/source/view/main/OpenGLRender.hxx |2 ++ 2 files changed, 5 insertions(+) New commits: commit b1d4fbb69491bcf211fb4c8cb5c2dd4d9efb4edb Author: Markus Mohrhard Date: Sat Jul 5 20:15:59 2014 +0200 don't forget glewInit Change-Id: Ifc1c995f50fe34dbb072345aab37190d3a57e074 Reviewed-on: https://gerrit.libreoffice.org/10094 Reviewed-by: Tomaž Vajngerl Tested-by: Tomaž Vajngerl diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx index 12dfb79..6884098 100644 --- a/chart2/source/view/main/OpenGLRender.cxx +++ b/chart2/source/view/main/OpenGLRender.cxx @@ -120,6 +120,8 @@ int OpenGLRender::InitOpenGL() //TODO: moggi: get the information from the context mbArbMultisampleSupported = true; +aContext.init(); + if (glewIsSupported("framebuffer_object") != GLEW_OK) { SAL_WARN("chart2.opengl", "GL stack has no framebuffer support"); @@ -344,6 +346,7 @@ void OpenGLRender::renderDebug() void OpenGLRender::prepareToRender() { +aContext.setWinSize(Size(m_iWidth, m_iHeight)); glViewport(0, 0, m_iWidth, m_iHeight); if (!m_FboID[0]) { diff --git a/chart2/source/view/main/OpenGLRender.hxx b/chart2/source/view/main/OpenGLRender.hxx index e88fffa..187cb5e 100644 --- a/chart2/source/view/main/OpenGLRender.hxx +++ b/chart2/source/view/main/OpenGLRender.hxx @@ -119,6 +119,8 @@ public: private: +OpenGLContext aContext; + com::sun::star::uno::Reference< com::sun::star::drawing::XShape > mxTarget; #if 0 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - chart2/source
chart2/source/model/template/ChartType.cxx | 24 ++-- chart2/source/model/template/ChartType.hxx |7 +-- 2 files changed, 27 insertions(+), 4 deletions(-) New commits: commit 30d5ee596d725377cec38cfc99e5d5891b42b35d Author: Michael Stahl Date: Fri Jul 4 14:53:42 2014 +0200 chart2: add some locking to chart::ChartType UNO service On the libreoffice-4-3 branch, chart2_unoapi crashed with what looks like a corrupted ChartType::m_aDataSeries triggering STL assertions. Try to protect the mutable members with SolarMutex guards. Change-Id: I3f2edd36b8ecf37ef60239415f70abfc8b59244d (cherry picked from commit 6cad548ee21f19b816726a03995b9bc8905757f8) Reviewed-on: https://gerrit.libreoffice.org/10085 Reviewed-by: Markus Mohrhard Tested-by: Markus Mohrhard diff --git a/chart2/source/model/template/ChartType.cxx b/chart2/source/model/template/ChartType.cxx index 9fb275f..ea1f5ab 100644 --- a/chart2/source/model/template/ChartType.cxx +++ b/chart2/source/model/template/ChartType.cxx @@ -26,6 +26,7 @@ #include "CloneHelper.hxx" #include "AxisIndexDefines.hxx" #include "ContainerHelper.hxx" +#include #include #include @@ -56,7 +57,11 @@ ChartType::ChartType( const ChartType & rOther ) : m_xContext( rOther.m_xContext ), m_bNotifyChanges( true ) { -CloneHelper::CloneRefVector< Reference< chart2::XDataSeries > >( rOther.m_aDataSeries, m_aDataSeries ); +{ +SolarMutexGuard g; // access to rOther.m_aDataSeries +CloneHelper::CloneRefVector >( +rOther.m_aDataSeries, m_aDataSeries); +} ModifyListenerHelper::addListenerToAllElements( m_aDataSeries, m_xModifyEventForwarder ); } @@ -150,6 +155,8 @@ void SAL_CALL ChartType::addDataSeries( const Reference< chart2::XDataSeries >& throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) { +SolarMutexGuard g; + impl_addDataSeriesWithoutNotification( xDataSeries ); fireModifyEvent(); } @@ -161,6 +168,8 @@ void SAL_CALL ChartType::removeDataSeries( const Reference< chart2::XDataSeries if( !xDataSeries.is()) throw container::NoSuchElementException(); +SolarMutexGuard g; + tDataSeriesContainerType::iterator aIt( ::std::find( m_aDataSeries.begin(), m_aDataSeries.end(), xDataSeries ) ); @@ -177,6 +186,8 @@ void SAL_CALL ChartType::removeDataSeries( const Reference< chart2::XDataSeries Sequence< Reference< chart2::XDataSeries > > SAL_CALL ChartType::getDataSeries() throw (uno::RuntimeException, std::exception) { +SolarMutexGuard g; + return ContainerHelper::ContainerToSequence( m_aDataSeries ); } @@ -184,6 +195,8 @@ void SAL_CALL ChartType::setDataSeries( const Sequence< Reference< chart2::XData throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception) { +SolarMutexGuard g; + m_bNotifyChanges = false; try { @@ -309,7 +322,14 @@ void ChartType::firePropertyChangeEvent() void ChartType::fireModifyEvent() { -if( m_bNotifyChanges ) +bool bNotifyChanges; + +{ +SolarMutexGuard g; +bNotifyChanges = m_bNotifyChanges; +} + +if (bNotifyChanges) m_xModifyEventForwarder->modified( lang::EventObject( static_cast< uno::XWeak* >( this ))); } diff --git a/chart2/source/model/template/ChartType.hxx b/chart2/source/model/template/ChartType.hxx index 82eb8033..a4c8473 100644 --- a/chart2/source/model/template/ChartType.hxx +++ b/chart2/source/model/template/ChartType.hxx @@ -140,7 +140,8 @@ protected: DECLARE_XTYPEPROVIDER() protected: -::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder; +::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > +const m_xModifyEventForwarder; private: void impl_addDataSeriesWithoutNotification( @@ -149,13 +150,15 @@ private: private: ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > -m_xContext; +const m_xContext; typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > > tDataSeriesContainerType; +// --- mutable members: the following members need mutex guard --- + tDataSeriesContainerType m_aDataSeries; bool m_bNotifyChanges; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - chart2/source
chart2/source/view/main/OpenGLRender.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 606af1462d81ac5188e0a6a3a1c270a327a68fd4 Author: Markus Mohrhard Date: Thu Jul 10 11:16:40 2014 +0200 we need to make sure the context is current Change-Id: Ia3d9df493899949f8de096f1cb0a3b63bffac0eb Reviewed-on: https://gerrit.libreoffice.org/10184 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx index 6884098..b325f1e 100644 --- a/chart2/source/view/main/OpenGLRender.cxx +++ b/chart2/source/view/main/OpenGLRender.cxx @@ -346,6 +346,7 @@ void OpenGLRender::renderDebug() void OpenGLRender::prepareToRender() { +aContext.makeCurrent(); aContext.setWinSize(Size(m_iWidth, m_iHeight)); glViewport(0, 0, m_iWidth, m_iHeight); if (!m_FboID[0]) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - chart2/source
chart2/source/controller/dialogs/DialogModel.cxx | 27 --- 1 file changed, 15 insertions(+), 12 deletions(-) New commits: commit da866a12fac748991a25870bf2a36076a47f90b2 Author: Markus Mohrhard Date: Sun Jun 22 03:37:24 2014 +0200 extract common code Change-Id: I9327f232f1edb9ef052eb7868ac60774f3b6e4cf Reviewed-on: https://gerrit.libreoffice.org/10072 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx index e3f9384..4cab7d9 100644 --- a/chart2/source/controller/dialogs/DialogModel.cxx +++ b/chart2/source/controller/dialogs/DialogModel.cxx @@ -468,6 +468,19 @@ Reference< data::XDataProvider > DialogModel::getDataProvider() const return aResult; } +namespace { + +void addMissingRoles(DialogModel::tRolesWithRanges& rResult, const uno::Sequence& rRoles) +{ +for(sal_Int32 i = 0, n = rRoles.getLength(); i < n; ++i) +{ +if(rResult.find(rRoles[i]) == rResult.end()) + rResult.insert(DialogModel::tRolesWithRanges::value_type(rRoles[i], OUString())); +} +} + +} + DialogModel::tRolesWithRanges DialogModel::getRolesWithRanges( const Reference< XDataSeries > & xSeries, const OUString & aRoleOfSequenceForLabel, @@ -484,21 +497,11 @@ DialogModel::tRolesWithRanges DialogModel::getRolesWithRanges( { // add missing mandatory roles Sequence< OUString > aRoles( xChartType->getSupportedMandatoryRoles()); -OUString aEmptyString; -sal_Int32 nI = 0; -for( nI=0; nI < aRoles.getLength(); ++nI ) -{ -if( aResult.find( aRoles[nI] ) == aResult.end() ) -aResult.insert( DialogModel::tRolesWithRanges::value_type( aRoles[nI], aEmptyString )); -} +addMissingRoles(aResult, aRoles); // add missing optional roles aRoles = xChartType->getSupportedOptionalRoles(); -for( nI=0; nI < aRoles.getLength(); ++nI ) -{ -if( aResult.find( aRoles[nI] ) == aResult.end() ) -aResult.insert( DialogModel::tRolesWithRanges::value_type( aRoles[nI], aEmptyString )); -} +addMissingRoles(aResult, aRoles); } } catch( const uno::Exception & ex ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - chart2/source chart2/uiconfig
chart2/source/controller/dialogs/DialogModel.cxx |4 ++ chart2/source/controller/dialogs/tp_DataSource.cxx | 29 - chart2/source/controller/dialogs/tp_DataSource.hxx |2 - chart2/uiconfig/ui/tp_DataSource.ui| 24 + 4 files changed, 6 insertions(+), 53 deletions(-) New commits: commit 2bd5cb9f62450916267ad4c6d50ebff2d824e7c0 Author: Markus Mohrhard Date: Sun Jun 22 04:12:04 2014 +0200 show the property mapping sequences by default Change-Id: I32417ed53e491a66f700e77ae0fff2154fa5441c Reviewed-on: https://gerrit.libreoffice.org/10073 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx index 4cab7d9..e18c7d3 100644 --- a/chart2/source/controller/dialogs/DialogModel.cxx +++ b/chart2/source/controller/dialogs/DialogModel.cxx @@ -502,6 +502,10 @@ DialogModel::tRolesWithRanges DialogModel::getRolesWithRanges( // add missing optional roles aRoles = xChartType->getSupportedOptionalRoles(); addMissingRoles(aResult, aRoles); + +// add missing property roles +aRoles = xChartType->getSupportedPropertyRoles(); +addMissingRoles(aResult, aRoles); } } catch( const uno::Exception & ex ) diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index 8a83c5b..99903a2 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -28,7 +28,6 @@ #include "tp_DataSourceControls.hxx" #include "ControllerLockGuard.hxx" #include "DataSourceHelper.hxx" -#include "dlg_PropertyMapping.hxx" #include #include #include @@ -217,7 +216,6 @@ DataSourceTabPage::DataSourceTabPage( get(m_pFT_DATALABELS ,"FT_DATALABELS"); get(m_pEDT_CATEGORIES ,"EDT_CATEGORIES"); get(m_pIMB_RANGE_CAT ,"IMB_RANGE_CAT"); -get(m_pBtn_AddMapping ,"BTN_ADD_MAPPING"); m_pFT_CAPTION->Show(!bHideDescription); @@ -247,9 +245,6 @@ DataSourceTabPage::DataSourceTabPage( m_pEDT_RANGE->SetStyle( m_pEDT_RANGE->GetStyle() | WB_FORCECTRLBACKGROUND ); m_pEDT_CATEGORIES->SetStyle( m_pEDT_CATEGORIES->GetStyle() | WB_FORCECTRLBACKGROUND ); -// mapped properties -m_pBtn_AddMapping->SetClickHdl( LINK( this, DataSourceTabPage, AddMappingHdl )); - // set symbol font for arrows // note: StarSymbol is substituted to OpenSymbol for OOo Font aSymbolFont( m_pBTN_UP->GetFont()); @@ -469,12 +464,6 @@ void DataSourceTabPage::fillRoleListBox() } m_pLB_ROLE->SetUpdateMode( true ); - -if(pSeriesEntry->m_xChartType -->getSupportedPropertyRoles().getLength() == 0) -m_pBtn_AddMapping->Disable(); -else -m_pBtn_AddMapping->Enable(); } } @@ -764,24 +753,6 @@ IMPL_LINK( DataSourceTabPage, RangeUpdateDataHdl, Edit*, pEdit ) return 0; } -IMPL_LINK_NOARG( DataSourceTabPage, AddMappingHdl ) -{ -SeriesEntry * pSeriesEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->FirstSelected()); -if(!pSeriesEntry) -return 0; - -PropertyMappingDlg aDlg(this, pSeriesEntry->m_xChartType); -short aRet = aDlg.Execute(); -if(aRet == RET_OK) -{ -OUString aNewMappingName = DialogModel::ConvertRoleFromUIToInternal(aDlg.getSelectedEntry()); -if(!aNewMappingName.isEmpty()) -m_pLB_ROLE->InsertEntry( lcl_GetRoleLBEntry( aNewMappingName, OUString())); -} - -return 0; -} - void DataSourceTabPage::listeningFinished( const OUString & rNewRange ) { diff --git a/chart2/source/controller/dialogs/tp_DataSource.hxx b/chart2/source/controller/dialogs/tp_DataSource.hxx index b89d4d4..496333e 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.hxx +++ b/chart2/source/controller/dialogs/tp_DataSource.hxx @@ -82,7 +82,6 @@ protected: DECL_LINK( RangeUpdateDataHdl, Edit* ); DECL_LINK( UpButtonClickedHdl, void* ); DECL_LINK( DownButtonClickedHdl, void* ); -DECL_LINK( AddMappingHdl, void* ); // RangeSelectionListenerParent virtual void listeningFinished( const OUString & rNewRange ) SAL_OVERRIDE; @@ -137,7 +136,6 @@ private: FixedText* m_pFT_DATALABELS;//used for xy charts Edit* m_pEDT_CATEGORIES; PushButton*m_pIMB_RANGE_CAT; -PushButton*m_pBtn_AddMapping; OUString m_aFixedTextRange; diff --git a/chart2/uiconfig/ui/tp_DataSource.ui b/chart2/uiconfig/ui/tp_DataSource.ui index a067a6f..f7bed1d 100644 --- a/chart2/uiconfig/ui/tp_DataSource.ui +++ b/chart2/uiconfig/ui/tp_DataSource.ui @@ -1,6 +1,7 @@ + - + True @@ -96,7 +97,6 @@ True False True -False Tr
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - chart2/source chart2/uiconfig
chart2/source/controller/dialogs/dlg_ChartType.cxx|2 - chart2/source/controller/dialogs/tp_ChartType.cxx |7 ++-- chart2/source/controller/dialogs/tp_ChartType.hxx |2 - chart2/source/controller/dialogs/tp_PointGeometry.cxx |2 - chart2/uiconfig/ui/tp_ChartType.ui| 27 +- 5 files changed, 21 insertions(+), 19 deletions(-) New commits: commit 935a11d018d440318affab5b67feac625d181b66 Author: Katarina Behrens Date: Sun Jul 20 19:44:37 2014 +0200 fdo#81547: prevent crash by reading relevant .ui file instead of no longer existing resource. Additionally, tweak widget visibility so that only relevant widgets are shown in Data series properties -> Layout tab. This is achieved by setting initial status of most of the widgets in .ui file to hidden, as *ResourceGroup::showControls() methods will take care of showing them when appropriate Change-Id: Iacbc689fb410b30515e433bcf4a96c087047ca73 Reviewed-on: https://gerrit.libreoffice.org/10496 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/chart2/source/controller/dialogs/dlg_ChartType.cxx b/chart2/source/controller/dialogs/dlg_ChartType.cxx index 49620c7..4acb338 100644 --- a/chart2/source/controller/dialogs/dlg_ChartType.cxx +++ b/chart2/source/controller/dialogs/dlg_ChartType.cxx @@ -47,7 +47,7 @@ ChartTypeDialog::ChartTypeDialog( Window* pParent uno::Reference::query(m_xChartModel), m_xCC, true/*live update*/, -true/*hide title description*/); +false/*don't show title description*/); m_pChartTypeTabPage->initializePage(); m_pChartTypeTabPage->Show(); diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index 0e313b6..00defcf 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -678,7 +678,7 @@ IMPL_LINK_NOARG(GeometryResourceGroup, GeometryChangeHdl) ChartTypeTabPage::ChartTypeTabPage(Window* pParent , const uno::Reference< XChartDocument >& xChartModel , const uno::Reference< uno::XComponentContext >& xContext -, bool bDoLiveUpdate, bool bHideDescription) +, bool bDoLiveUpdate, bool bShowDescription) : OWizardPage(pParent, "tp_ChartType", "modules/schart/ui/tp_ChartType.ui") , m_pDim3DLookResourceGroup( new Dim3DLookResourceGroup(this) ) @@ -702,9 +702,9 @@ ChartTypeTabPage::ChartTypeTabPage(Window* pParent m_pSubTypeList->set_width_request(aSize.Width()); m_pSubTypeList->set_height_request(aSize.Height()); -if( bHideDescription ) +if( bShowDescription ) { -m_pFT_ChooseType->Hide(); +m_pFT_ChooseType->Show(); } else { @@ -914,6 +914,7 @@ void ChartTypeTabPage::selectMainType() void ChartTypeTabPage::showAllControls( ChartTypeDialogController& rTypeController ) { +m_pMainTypeList->Show(); m_pSubTypeList->Show(); bool bShow = rTypeController.shouldShow_3DLookControl(); diff --git a/chart2/source/controller/dialogs/tp_ChartType.hxx b/chart2/source/controller/dialogs/tp_ChartType.hxx index 4d3229a..81557a4 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.hxx +++ b/chart2/source/controller/dialogs/tp_ChartType.hxx @@ -53,7 +53,7 @@ public: ::com::sun::star::chart2::XChartDocument >& xChartModel , const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext -, bool bDoLiveUpdate, bool bHideDescription = false ); +, bool bDoLiveUpdate, bool bShowDescription = true ); virtual ~ChartTypeTabPage(); virtual voidinitializePage() SAL_OVERRIDE; diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.cxx b/chart2/source/controller/dialogs/tp_PointGeometry.cxx index 68a20d9..779eedb 100644 --- a/chart2/source/controller/dialogs/tp_PointGeometry.cxx +++ b/chart2/source/controller/dialogs/tp_PointGeometry.cxx @@ -31,7 +31,7 @@ namespace chart { SchLayoutTabPage::SchLayoutTabPage(Window* pWindow,const SfxItemSet& rInAttrs) - : SfxTabPage(pWindow, SchResId(TP_LAYOUT), rInAttrs) + : SfxTabPage(pWindow, "tp_ChartType", "modules/schart/ui/tp_ChartType.ui", rInAttrs) , m_pGeometryResources(0) { m_pGeometryResources = new BarGeometryResources( this ); diff --git a/chart2/uiconfig/ui/tp_ChartType.ui b/chart2/uiconfig/ui/tp_ChartType.ui index cc4452b..18cbdc1 100644 --- a/chart2/uiconfig/ui/tp_ChartType.ui +++ b/chart2/uiconfig/ui/tp_ChartType.ui @@ -47,7 +47,7 @@ 6 -True +False False 0 Choose a chart type @@ -76,7 +76,7 @@ 6 -True +
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - chart2/source include/xmloff xmloff/source
chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx | 35 +- include/xmloff/xmltoken.hxx |4 + xmloff/source/chart/PropertyMap.hxx |7 ++ xmloff/source/chart/PropertyMaps.cxx| 21 ++ xmloff/source/core/xmltoken.cxx |4 + 5 files changed, 70 insertions(+), 1 deletion(-) New commits: commit de58ba7b1ccb90633ca3e78187997f17b2a64d9e Author: Kohei Yoshida Date: Sat Jul 26 14:44:38 2014 -0400 bnc#885825: Handle ODF import and export of data label border properties. Change-Id: Ic8c7bc873768008537cd52a3fd4b11031b403139 (cherry picked from commit 6c2c974dd3f0b21a23bc3bc5560487d28bbe0fad) Reviewed-on: https://gerrit.libreoffice.org/10563 Reviewed-by: Markus Mohrhard Tested-by: Markus Mohrhard diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx index f3c150e..1dc0cc9 100644 --- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx @@ -80,7 +80,11 @@ enum PROP_SERIES_DATAPOINT_LABEL_PLACEMENT, //other series properties PROP_SERIES_ATTACHED_AXIS, -PROP_SERIES_DATAPOINT_TEXT_ROTATION +PROP_SERIES_DATAPOINT_TEXT_ROTATION, +PROP_SERIES_DATAPOINT_LABEL_BORDER_STYLE, +PROP_SERIES_DATAPOINT_LABEL_BORDER_WIDTH, +PROP_SERIES_DATAPOINT_LABEL_BORDER_COLOR, +PROP_SERIES_DATAPOINT_LABEL_BORDER_TRANS }; void lcl_AddPropertiesToVector_PointProperties( @@ -142,6 +146,35 @@ void lcl_AddPropertiesToVector_PointProperties( cppu::UnoType::get(), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT )); + +rOutProperties.push_back( +Property( CHART_UNONAME_LABEL_BORDER_STYLE, + PROP_SERIES_DATAPOINT_LABEL_BORDER_STYLE, + cppu::UnoType::get(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + +rOutProperties.push_back( +Property( CHART_UNONAME_LABEL_BORDER_WIDTH, + PROP_SERIES_DATAPOINT_LABEL_BORDER_WIDTH, + cppu::UnoType::get(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); + +rOutProperties.push_back( +Property( CHART_UNONAME_LABEL_BORDER_COLOR, + PROP_SERIES_DATAPOINT_LABEL_BORDER_COLOR, + cppu::UnoType::get(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEVOID // "maybe auto" + | beans::PropertyAttribute::MAYBEDEFAULT )); + +rOutProperties.push_back( +Property( CHART_UNONAME_LABEL_BORDER_TRANS, + PROP_SERIES_DATAPOINT_LABEL_BORDER_TRANS, + cppu::UnoType::get(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEDEFAULT )); } void lcl_AddPropertiesToVector_SeriesOnly( diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx index 9e206d8..e03dcfd 100644 --- a/include/xmloff/xmltoken.hxx +++ b/include/xmloff/xmltoken.hxx @@ -1067,6 +1067,10 @@ namespace xmloff { namespace token { XML_LABEL_RANGE, XML_LABEL_RANGES, XML_LABEL_STRING, +XML_LABEL_STROKE, +XML_LABEL_STROKE_COLOR, +XML_LABEL_STROKE_OPACITY, +XML_LABEL_STROKE_WIDTH, XML_LAMBDA, XML_LANDSCAPE, XML_LANGUAGE, diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx index c6b63e5..a876c2b 100644 --- a/xmloff/source/chart/PropertyMap.hxx +++ b/xmloff/source/chart/PropertyMap.hxx @@ -53,6 +53,8 @@ #define XML_SCH_TYPE_AXIS_POSITION_VALUE( XML_SCH_TYPES_START + 14 ) #define XML_SCH_TYPE_AXIS_LABEL_POSITION( XML_SCH_TYPES_START + 15 ) #define XML_SCH_TYPE_TICK_MARK_POSITION ( XML_SCH_TYPES_START + 16 ) +#define XML_SCH_TYPE_LABEL_BORDER_STYLE ( XML_SCH_TYPES_START + 17 ) +#define XML_SCH_TYPE_LABEL_BORDER_OPACITY ( XML_SCH_TYPES_START + 18 ) // context ids #define XML_SCH_CONTEXT_USER_SYMBOL ( XML_SCH_CTF_START + 0 ) @@ -146,6 +148,11 @@ const XMLPropertyMapEntry aXMLChartPropMap[] = // OpenGL 3D chart flags MAP_ENTRY_ODF_EXT( "RoundedEdge", LO_EXT, XML_ROUNDED_EDGE, XML_TYPE_BOOL), +MAP_ENTRY_ODF_EXT( "LabelBorderColor", LO_EXT, XML_LABEL_STROKE_COLOR, XML_TYPE_COLOR ), +MAP_ENTRY_ODF_EXT( "LabelBorderStyle", LO_EXT, XML_LABEL_STROKE, XML_SCH_TYPE_LABEL_BORDER_STYLE ), +MAP_ENTRY_ODF_EXT( "LabelBorderTransparency", LO_EXT, XML_LABEL_STROKE_OPACITY, XML_SCH_TYPE_LABEL_BORDER_OPACITY ), +MAP_ENTRY_ODF_EXT( "LabelBo
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - chart2/source drawinglayer/Library_drawinglayer.mk drawinglayer/source include/drawinglayer include/svx include/vcl svx/inc svx/Library_svxco
chart2/source/view/inc/AbstractShapeFactory.hxx|4 chart2/source/view/inc/OpenglShapeFactory.hxx |4 chart2/source/view/inc/ShapeFactory.hxx|4 chart2/source/view/main/ChartView.cxx |4 chart2/source/view/main/OpenglShapeFactory.cxx | 85 +- drawinglayer/Library_drawinglayer.mk |3 drawinglayer/source/primitive2d/baseprimitive2d.cxx|1 drawinglayer/source/primitive2d/openglprimitive2d.cxx | 32 --- drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx |6 drawinglayer/source/processor2d/vclprocessor2d.cxx | 10 - drawinglayer/source/processor2d/vclprocessor2d.hxx |3 include/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx |3 include/drawinglayer/primitive2d/openglprimitive2d.hxx | 41 include/svx/svdobj.hxx |1 include/svx/unoshape.hxx | 10 - include/vcl/opengl/IOpenGLRenderer.hxx | 28 --- include/vcl/opengl/OpenGLContext.hxx |1 svx/Library_svxcore.mk |1 svx/inc/svdoopengl.hxx |4 svx/source/svdraw/svdobj.cxx |2 svx/source/svdraw/svdoopengl.cxx |9 - svx/source/unodraw/unomod.cxx |4 svx/source/unodraw/unopage.cxx |3 svx/source/unodraw/unoprov.cxx |1 svx/source/unodraw/unoshap4.cxx| 10 - 25 files changed, 29 insertions(+), 245 deletions(-) New commits: commit d72d80aa8393c9416423602779cb63b22141033a Author: Markus Mohrhard Date: Sun Jun 15 22:24:46 2014 +0200 Make OpenGL 2D rendering working again. Change-Id: I29101aee77ac37f5a8e1b929793d7554bc425b26 Reviewed-on: https://gerrit.libreoffice.org/10075 Reviewed-by: Kohei Yoshida Tested-by: Kohei Yoshida diff --git a/chart2/source/view/inc/AbstractShapeFactory.hxx b/chart2/source/view/inc/AbstractShapeFactory.hxx index b9b247f..015d524 100644 --- a/chart2/source/view/inc/AbstractShapeFactory.hxx +++ b/chart2/source/view/inc/AbstractShapeFactory.hxx @@ -237,9 +237,9 @@ public: /** * Only necessary for stateless implementations */ -virtual void render(com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage > xDrawPage) = 0; +virtual void render(com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > xRootShape) = 0; -virtual void clearPage(com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage > xDrawPage) = 0; +virtual void clearPage(com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > xRootShape) = 0; static ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > getChartRootShape( const ::com::sun::star::uno::Reference< diff --git a/chart2/source/view/inc/OpenglShapeFactory.hxx b/chart2/source/view/inc/OpenglShapeFactory.hxx index c93199f..e9b2614 100644 --- a/chart2/source/view/inc/OpenglShapeFactory.hxx +++ b/chart2/source/view/inc/OpenglShapeFactory.hxx @@ -184,9 +184,9 @@ public: virtual void setPageSize( com::sun::star::uno::Reference < com::sun::star::drawing::XShapes > xChartShapes, const com::sun::star::awt::Size& rSize ) SAL_OVERRIDE; -virtual void render(com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage > xDrawPage) SAL_OVERRIDE; +virtual void render(com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > xRootShape) SAL_OVERRIDE; -virtual void clearPage(com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage > xDrawPage) SAL_OVERRIDE; +virtual void clearPage(com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > xRootShape) SAL_OVERRIDE; }; } diff --git a/chart2/source/view/inc/ShapeFactory.hxx b/chart2/source/view/inc/ShapeFactory.hxx index 87a4387..74a4d38 100644 --- a/chart2/source/view/inc/ShapeFactory.hxx +++ b/chart2/source/view/inc/ShapeFactory.hxx @@ -197,9 +197,9 @@ public: /** * not necessary right now */ -virtual void render(com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage > ) SAL_OVERRIDE {} +virtual void render(com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > ) SAL_OVERRIDE {} -virtual void clearPage(com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage > ) SAL_OVERRIDE {} +virtual void clearPage(com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > ) SAL_OVERRIDE {} private: ShapeFac
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - chart2/source dbaccess/source include/oox offapi/com oox/source sc/inc sc/source sw/inc sw/source
chart2/source/inc/InternalDataProvider.hxx |8 chart2/source/tools/InternalDataProvider.cxx | 200 ++--- dbaccess/source/core/inc/DatabaseDataProvider.hxx |6 dbaccess/source/core/misc/DatabaseDataProvider.cxx |8 include/oox/drawingml/chart/chartconverter.hxx |8 offapi/com/sun/star/chart2/data/XDataProvider.idl |3 oox/source/drawingml/chart/chartconverter.cxx |6 oox/source/drawingml/chart/datasourceconverter.cxx |4 oox/source/drawingml/chart/seriesconverter.cxx |2 sc/inc/chart2uno.hxx |4 sc/source/filter/inc/excelchartconverter.hxx |8 sc/source/filter/oox/excelchartconverter.cxx |3 sc/source/ui/unoobj/chart2uno.cxx |8 sw/inc/unochart.hxx|5 sw/source/core/unocore/unochart.cxx|8 15 files changed, 209 insertions(+), 72 deletions(-) New commits: commit 2a5fbd9e48c33734bd44c56ac5742f913cd63df4 Author: Kohei Yoshida Date: Wed Jul 2 09:53:54 2014 -0400 bnc#812796: Correctly handle static value array for OOXML charts. We need to pass the role of the data sequence in order to avoid unreliable guess work when importing static value array. Also, not all Excel's scatter plots have real numeric X values; some have textural X values in which case Excel switch to generating 1, 2, 3, ... as X values. When importing to our chart implementation, using "categories" role in such cases instead of "values-x" results in a more faithful chart rendering. (cherry picked from commit 6c4e21a234f12e1310ba06f9859e08b424acf8bf) Conflicts: chart2/source/inc/InternalDataProvider.hxx chart2/source/tools/InternalDataProvider.cxx Change-Id: If4bc1f650bb024dcd1b1b36537f457fb38404a78 Reviewed-on: https://gerrit.libreoffice.org/10040 Tested-by: Markus Mohrhard Reviewed-by: Markus Mohrhard diff --git a/chart2/source/inc/InternalDataProvider.hxx b/chart2/source/inc/InternalDataProvider.hxx index 901c792..4bc998a 100644 --- a/chart2/source/inc/InternalDataProvider.hxx +++ b/chart2/source/inc/InternalDataProvider.hxx @@ -134,6 +134,11 @@ public: const OUString& aRangeRepresentation ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; + +virtual css::uno::Reference SAL_CALL +createDataSequenceByValueArray( const OUString& aRole, const OUString& aRangeRepresentation ) +throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XRangeSelection > SAL_CALL getRangeSelection() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; @@ -232,6 +237,9 @@ private: void lcl_deleteMapReferences( const OUString & rRangeRepresentation ); +css::uno::Reference +createDataSequenceFromArray( const OUString& rArrayStr, const OUString& rRole ); + void lcl_adaptMapReferences( const OUString & rOldRangeRepresentation, const OUString & rNewRangeRepresentation ); diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx index e83fbae..f6081b5 100644 --- a/chart2/source/tools/InternalDataProvider.cxx +++ b/chart2/source/tools/InternalDataProvider.cxx @@ -492,79 +492,155 @@ void InternalDataProvider::lcl_decreaseMapReferences( Reference< chart2::data::XDataSequence > InternalDataProvider::lcl_createDataSequenceAndAddToMap( const OUString & rRangeRepresentation ) { -OUString aRangeRepresentation = rRangeRepresentation; -if( aRangeRepresentation.indexOf('{') >= 0 ) -{ -::std::vector< double > aNewData; -::std::vector< uno::Any > aNewLabels; -OUStringaToken; -sal_Int32 nCategories = 0; -sal_Int32 nIndex = 0; -boolbValues = true; -boolbLabelSet = false; -OUString str = aRangeRepresentation.replace('{',' ').replace('}',' '); - -m_aInternalData.clearDefaultData(); -sal_Int32 n = m_aInternalData.getColumnCount(); -if( n ) -n = n - 1; - -do +Reference xSeq = createDataSequenceFromArray(rRangeRepresentation, OUString()); +if (xSeq.is()) +return xSeq; + +xSeq.set(new UncachedDataSequence(this, rRangeRepresentation)); +lcl_addDataSequenceToMap(rRangeRepresentation, xSeq); +return xSeq; +} + +uno::Reference +InternalDataProvider::createDataSequenceFromArray( const OUString& rArrayStr, const OUString& rRole ) +{ +if (rArrayStr.indexOf('{') != 0 || rArrayStr[rArrayStr.getLength()-1] != '}') +{ +// Not an array string. +return uno::Reference(); +