[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - 75 commits - basic/source bridges/source chart2/Library_chartcontroller.mk chart2/source chart2/uiconfig chart2/UIConfig_chart2.mk comphelper/source connectivity/source cui/source dbaccess/source desktop/source extensions/source filter/qa filter/source forms/source fpicker/source fpicker/uiconfig fpicker/UIConfig_fps.mk framework/source hwpfilter/source include/sfx2 include/svx include/tools include/unotools jvmfwk/plugins jvmfwk/source mysqlc/source officecfg/registry oox/source registry/source reportdesign/source sal/qa sc/inc scripting/source sc/sdi sc/source sd/inc sd/sdi sd/source sfx2/source shell/source sot/source starmath/source stoc/source svl/qa svtools/source svtools/uiconfig svtools/UIConfig_svt.mk svx/inc svx/Library_svx.mk svx/source sw/inc sw/qa sw/source test/source toolkit/source tools/source ucb/source unotools/source unoxml/source vbahelper/source vcl/headless xmloff/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Thu Jul 16 23:27:39 PDT 2015
basic/source/runtime/methods.cxx | 18
bridges/source/jni_uno/jni_java2uno.cxx | 2
bridges/source/jni_uno/jni_uno2java.cxx | 6
chart2/Library_chartcontroller.mk | 2
chart2/UIConfig_chart2.mk | 1
chart2/source/controller/accessibility/AccessibleViewForwarder.cxx | 27
chart2/source/controller/accessibility/AccessibleViewForwarder.hxx | 3
chart2/source/controller/inc/ChartController.hxx | 2
chart2/source/controller/main/ChartController.cxx | 30
chart2/source/controller/sidebar/Chart2PanelFactory.cxx | 3
chart2/source/controller/sidebar/ChartElementsPanel.cxx | 41
chart2/source/controller/sidebar/ChartElementsPanel.hxx | 7
chart2/source/controller/sidebar/ChartSeriesPanel.cxx | 453 ++++++++
chart2/source/controller/sidebar/ChartSeriesPanel.hxx | 106 +
chart2/source/controller/sidebar/ChartSidebarModifyListener.cxx | 42
chart2/source/controller/sidebar/ChartSidebarModifyListener.hxx | 50
chart2/uiconfig/ui/sidebarelements.ui | 536 ++++------
chart2/uiconfig/ui/sidebarseries.ui | 156 ++
comphelper/source/misc/anytostring.cxx | 2
connectivity/source/drivers/dbase/DResultSet.cxx | 2
connectivity/source/drivers/evoab2/NResultSet.cxx | 2
connectivity/source/drivers/file/FResultSet.cxx | 12
cui/source/dialogs/scriptdlg.cxx | 6
cui/source/factory/dlgfact.cxx | 139 --
cui/source/factory/dlgfact.hxx | 28
dbaccess/source/filter/xml/xmlDataSource.cxx | 18
dbaccess/source/filter/xml/xmlLogin.cxx | 4
dbaccess/source/ui/misc/DExport.cxx | 2
desktop/source/deployment/manager/dp_manager.cxx | 5
desktop/source/deployment/misc/dp_descriptioninfoset.cxx | 2
desktop/source/deployment/registry/component/dp_component.cxx | 22
desktop/source/deployment/registry/package/dp_package.cxx | 11
extensions/source/update/check/updatecheckconfig.cxx | 4
filter/qa/cppunit/data/eps/fail/short-1.eps |binary
filter/source/graphicfilter/ieps/ieps.cxx | 16
filter/source/msfilter/msdffimp.cxx | 10
forms/source/component/FormComponent.cxx | 4
forms/source/richtext/attributedispatcher.cxx | 2
forms/source/xforms/namedcollection.hxx | 2
fpicker/UIConfig_fps.mk | 1
fpicker/source/office/RemoteFilesDialog.cxx | 5
fpicker/uiconfig/ui/remotefilesdialog.ui | 241 ++++
framework/source/helper/ocomponentenumeration.cxx | 2
framework/source/services/frame.cxx | 5
framework/source/uielement/subtoolbarcontroller.cxx | 5
hwpfilter/source/drawdef.h | 6
hwpfilter/source/formula.cxx | 2
hwpfilter/source/hbox.cxx | 34
hwpfilter/source/hbox.h | 30
hwpfilter/source/hcode.cxx | 66 -
hwpfilter/source/hinfo.cxx | 56 -
hwpfilter/source/hiodev.h | 4
hwpfilter/source/hpara.cxx | 4
hwpfilter/source/hpara.h | 14
hwpfilter/source/hwpeq.cxx | 44
hwpfilter/source/hwpfile.cxx | 2
hwpfilter/source/hwpread.cxx | 76 -
hwpfilter/source/hwpreader.cxx | 279 ++---
include/sfx2/filedlghelper.hxx | 2
include/sfx2/sidebar/EnumContext.hxx | 3
include/svx/EnhancedCustomShape2d.hxx | 1
include/svx/IAccessibleViewForwarder.hxx | 30
include/svx/ShapeTypeHandler.hxx | 14
include/svx/camera3d.hxx | 3
include/svx/charmap.hxx | 4
include/svx/chrtitem.hxx | 7
include/svx/colrctrl.hxx | 3
include/svx/ctredlin.hxx | 33
include/svx/cube3d.hxx | 2
include/svx/deflt3d.hxx | 17
include/svx/dlgctl3d.hxx | 3
include/svx/dlgctrl.hxx | 4
include/svx/drawitem.hxx | 9
include/svx/e3ditem.hxx | 4
include/svx/fmmodel.hxx | 1
include/svx/fmtools.hxx | 14
include/svx/fmview.hxx | 1
include/svx/fontworkgallery.hxx | 12
include/svx/frmdirlbox.hxx | 2
include/svx/frmsel.hxx | 3
include/svx/galctrl.hxx | 2
include/svx/gallery1.hxx | 3
include/svx/galleryitem.hxx | 2
include/svx/galtheme.hxx | 1
include/svx/graphctl.hxx | 9
include/svx/gridctrl.hxx | 6
include/svx/hdft.hxx | 1
include/svx/imapdlg.hxx | 1
include/svx/ipolypolygoneditorcontroller.hxx | 1
include/svx/itemwin.hxx | 3
include/svx/langbox.hxx | 3
include/svx/nbdtmg.hxx | 1
include/svx/numfmtsh.hxx | 2
include/svx/numvset.hxx | 6
include/svx/obj3d.hxx | 57 -
include/svx/ofaitem.hxx | 1
include/svx/orienthelper.hxx | 2
include/svx/pagectrl.hxx | 22
include/svx/pageitem.hxx | 1
include/svx/paraprev.hxx | 42
include/svx/relfld.hxx | 1
include/svx/ruler.hxx | 20
include/svx/scene3d.hxx | 70 -
include/svx/sdasaitm.hxx | 6
include/svx/sdr/contact/objectcontact.hxx | 3
include/svx/sdr/contact/viewcontact.hxx | 9
include/svx/sdr/contact/viewobjectcontact.hxx | 3
include/svx/sdr/overlay/overlaymanager.hxx | 3
include/svx/sdr/overlay/overlaypolypolygon.hxx | 1
include/svx/sdr/overlay/overlayprimitive2dsequenceobject.hxx | 5
include/svx/sdr/overlay/overlayselection.hxx | 1
include/svx/sdr/table/tablecontroller.hxx | 3
include/svx/sdrpaintwindow.hxx | 1
include/svx/srchdlg.hxx | 17
include/svx/svdcrtv.hxx | 5
include/svx/svddrag.hxx | 4
include/svx/svddrgmt.hxx | 1
include/svx/svddrgv.hxx | 16
include/svx/svdedtv.hxx | 9
include/svx/svdedxv.hxx | 3
include/svx/svdetc.hxx | 2
include/svx/svdglev.hxx | 11
include/svx/svdglue.hxx | 1
include/svx/svdhdl.hxx | 2
include/svx/svdhlpln.hxx | 5
include/svx/svdlayer.hxx | 55 -
include/svx/svdmark.hxx | 18
include/svx/svdmodel.hxx | 66 -
include/svx/svdmrkv.hxx | 16
include/svx/svdobj.hxx | 11
include/svx/svdoedge.hxx | 2
include/svx/svdogrp.hxx | 3
include/svx/svdoole2.hxx | 1
include/svx/svdopath.hxx | 1
include/svx/svdotable.hxx | 6
include/svx/svdotext.hxx | 1
include/svx/svdouno.hxx | 1
include/svx/svdpage.hxx | 36
include/svx/svdpagv.hxx | 2
include/svx/svdpntv.hxx | 17
include/svx/svdpoev.hxx | 1
include/svx/svdsnpv.hxx | 16
include/svx/svdtrans.hxx | 4
include/svx/svdundo.hxx | 9
include/svx/svdview.hxx | 5
include/svx/svdxcgv.hxx | 1
include/svx/svxdlg.hxx | 40
include/svx/tbxalign.hxx | 47
include/svx/tbxcolor.hxx | 4
include/svx/txencbox.hxx | 5
include/svx/unomaster.hxx | 2
include/svx/unoshape.hxx | 1
include/svx/view3d.hxx | 120 --
include/svx/viewpt3d.hxx | 7
include/svx/xbitmap.hxx | 2
include/svx/xit.hxx | 1
include/svx/xpoly.hxx | 1
include/svx/xtable.hxx | 1
include/tools/inetmime.hxx | 165 +--
include/unotools/tempfile.hxx | 15
jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx | 2
jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 2
jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 4
jvmfwk/source/framework.cxx | 4
mysqlc/source/mysqlc_connection.cxx | 2
mysqlc/source/mysqlc_databasemetadata.cxx | 4
mysqlc/source/mysqlc_resultset.cxx | 22
mysqlc/source/mysqlc_resultsetmetadata.cxx | 14
officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu | 8
officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu | 28
officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu | 8
officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu | 101 +
officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu | 8
officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs | 6
oox/source/export/drawingml.cxx | 2
oox/source/ppt/timenodelistcontext.cxx | 2
registry/source/regkey.cxx | 2
reportdesign/source/core/api/Section.cxx | 2
reportdesign/source/ui/report/ReportController.cxx | 2
sal/qa/osl/file/osl_File.cxx | 2
sc/inc/dbdata.hxx | 5
sc/inc/drwlayer.hxx | 3
sc/inc/pch/precompiled_sc.hxx | 2
sc/sdi/drawsh.sdi | 2
sc/source/core/data/drwlayer.cxx | 16
sc/source/core/tool/dbdata.cxx | 21
sc/source/ui/Accessibility/AccessibleDocument.cxx | 32
sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx | 32
sc/source/ui/app/scdll.cxx | 4
sc/source/ui/docshell/dbdocfun.cxx | 3
sc/source/ui/docshell/docsh5.cxx | 20
sc/source/ui/drawfunc/drawsh2.cxx | 1
sc/source/ui/inc/AccessibleDocument.hxx | 31
sc/source/ui/view/cellsh2.cxx | 4
scripting/source/provider/MasterScriptProvider.cxx | 4
scripting/source/vbaevents/eventhelper.cxx | 2
sd/inc/pch/precompiled_sd.hxx | 1
sd/sdi/_drvwsh.sdi | 3
sd/source/core/EffectMigration.cxx | 2
sd/source/core/annotations/AnnotationEnumeration.cxx | 2
sd/source/core/stlfamily.cxx | 2
sd/source/core/stlsheet.cxx | 4
sd/source/filter/html/pubdlg.cxx | 4
sd/source/filter/ppt/pptinanimations.cxx | 4
sd/source/ui/accessibility/AccessibleViewForwarder.cxx | 35
sd/source/ui/animations/CustomAnimationPane.cxx | 2
sd/source/ui/animations/motionpathtag.cxx | 5
sd/source/ui/animations/motionpathtag.hxx | 1
sd/source/ui/app/sddll.cxx | 3
sd/source/ui/app/tbxww.cxx | 7
sd/source/ui/inc/AccessibleViewForwarder.hxx | 31
sd/source/ui/inc/DrawViewShell.hxx | 2
sd/source/ui/slideshow/slideshowimpl.cxx | 2
sd/source/ui/unoidl/DrawController.cxx | 8
sd/source/ui/unoidl/unoobj.cxx | 8
sd/source/ui/unoidl/unoobj.hxx | 2
sd/source/ui/unoidl/unopage.cxx | 2
sd/source/ui/view/drviews7.cxx | 6
sd/source/ui/view/drviewsa.cxx | 42
sd/source/ui/view/drviewsc.cxx | 14
sd/source/ui/view/drviewse.cxx | 1
sd/source/ui/view/drviewsj.cxx | 3
sfx2/source/doc/guisaveas.cxx | 6
sfx2/source/doc/plugin.cxx | 2
sfx2/source/doc/sfxbasemodel.cxx | 6
sfx2/source/sidebar/EnumContext.cxx | 3
sfx2/source/view/sfxbasecontroller.cxx | 2
shell/source/sessioninstall/SyncDbusSessionHelper.cxx | 2
sot/source/unoolestorage/xolesimplestorage.cxx | 4
starmath/source/accessibility.cxx | 4
stoc/source/invocation_adapterfactory/iafactory.cxx | 4
stoc/source/javavm/javavm.cxx | 2
svl/qa/unit/test_INetContentType.cxx | 12
svtools/UIConfig_svt.mk | 1
svtools/source/svhtml/parhtml.cxx | 5
svtools/source/uno/treecontrolpeer.cxx | 12
svtools/source/uno/unoiface.cxx | 8
svtools/uiconfig/ui/remotefilesdialog.ui | 241 ----
svx/Library_svx.mk | 1
svx/inc/dragmt3d.hxx | 2
svx/inc/galbrws2.hxx | 4
svx/inc/galobj.hxx | 1
svx/inc/sdr/contact/objectcontactofpageview.hxx | 3
svx/inc/sdr/contact/viewcontactofsdrpage.hxx | 3
svx/inc/sdr/overlay/overlaymanagerbuffered.hxx | 3
svx/inc/sdr/primitive2d/sdrcaptionprimitive2d.hxx | 1
svx/inc/sdr/primitive2d/sdrellipseprimitive2d.hxx | 6
svx/inc/sdr/primitive2d/sdrrectangleprimitive2d.hxx | 1
svx/inc/svdibrow.hxx | 5
svx/source/accessibility/GraphCtlAccessibleContext.cxx | 25
svx/source/customshapes/EnhancedCustomShape2d.cxx | 17
svx/source/dialog/contimp.hxx | 3
svx/source/dialog/contwnd.hxx | 4
svx/source/dialog/imapwnd.hxx | 7
svx/source/dialog/langbox.cxx | 11
svx/source/dialog/svxruler.cxx | 17
svx/source/fmcomp/fmgridif.cxx | 2
svx/source/fmcomp/gridcell.cxx | 2
svx/source/form/fmmodel.cxx | 6
svx/source/form/fmpgeimp.cxx | 1
svx/source/form/sdbdatacolumn.cxx | 224 ----
svx/source/gallery2/galbrws1.hxx | 1
svx/source/gallery2/galbrws2.cxx | 8
svx/source/inc/GraphCtlAccessibleContext.hxx | 3
svx/source/inc/datanavi.hxx | 8
svx/source/inc/filtnav.hxx | 3
svx/source/inc/fmcontrolbordermanager.hxx | 7
svx/source/inc/fmexch.hxx | 1
svx/source/inc/fmexpl.hxx | 10
svx/source/inc/fmpgeimp.hxx | 5
svx/source/inc/fmshimp.hxx | 1
svx/source/inc/formcontrolling.hxx | 6
svx/source/inc/formtoolbars.hxx | 7
svx/source/inc/frmselimpl.hxx | 3
svx/source/inc/gridcell.hxx | 5
svx/source/inc/sdbdatacolumn.hxx | 67 -
svx/source/inc/stringlistresource.hxx | 17
svx/source/inc/svxpixelctlaccessiblecontext.hxx | 12
svx/source/inc/tabwin.hxx | 2
svx/source/sdr/contact/objectcontact.cxx | 6
svx/source/sdr/contact/objectcontactofpageview.cxx | 7
svx/source/sdr/contact/viewcontact.cxx | 6
svx/source/sdr/contact/viewcontactofsdrpage.cxx | 6
svx/source/sdr/overlay/overlaymanager.cxx | 6
svx/source/sdr/overlay/overlaymanagerbuffered.cxx | 7
svx/source/sidebar/PanelFactory.cxx | 2
svx/source/sidebar/area/AreaTransparencyGradientControl.hxx | 1
svx/source/sidebar/graphic/GraphicPropertyPanel.hxx | 1
svx/source/sidebar/line/LinePropertyPanel.hxx | 1
svx/source/sidebar/styles/StylesPropertyPanel.cxx | 19
svx/source/sidebar/styles/StylesPropertyPanel.hxx | 17
svx/source/svdraw/svdedtv2.cxx | 14
svx/source/svdraw/svdobj.cxx | 19
svx/source/svdraw/svdoedge.cxx | 5
svx/source/svdraw/svdogrp.cxx | 19
svx/source/svdraw/svdpage.cxx | 2
svx/source/svdraw/svdpoev.cxx | 42
svx/source/svdraw/svdundo.cxx | 7
svx/source/table/cell.cxx | 9
svx/source/table/cell.hxx | 1
svx/source/table/cellcursor.cxx | 2
svx/source/table/propertyset.cxx | 2
svx/source/table/tabledesign.cxx | 4
svx/source/tbxctrls/extrusioncontrols.hxx | 1
svx/source/tbxctrls/fontworkgallery.cxx | 30
svx/source/tbxctrls/tbxalign.cxx | 105 -
svx/source/tbxctrls/tbxdrctl.cxx | 2
svx/source/toolbars/extrusionbar.cxx | 2
svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.hxx | 2
sw/inc/accmap.hxx | 3
sw/inc/drawdoc.hxx | 3
sw/inc/pch/precompiled_sw.hxx | 1
sw/qa/extras/ooxmlexport/ooxmlexport5.cxx | 2
sw/qa/extras/uiwriter/uiwriter.cxx | 50
sw/source/core/access/accmap.cxx | 39
sw/source/core/access/accnotextframe.cxx | 2
sw/source/core/draw/drawdoc.cxx | 6
sw/source/filter/xml/xmlexp.cxx | 2
sw/source/filter/xml/xmlfmte.cxx | 2
sw/source/ui/vba/vbaselection.cxx | 8
sw/source/uibase/app/swmodule.cxx | 4
sw/source/uibase/docvw/edtwin.cxx | 4
test/source/sheet/xprintareas.cxx | 4
toolkit/source/awt/vclxmenu.cxx | 4
toolkit/source/awt/vclxwindows.cxx | 12
toolkit/source/controls/unocontrol.cxx | 2
toolkit/source/controls/unocontrols.cxx | 2
tools/source/inet/inetmime.cxx | 29
ucb/source/core/ucbcmds.cxx | 2
ucb/source/ucp/webdav-neon/webdavcontent.cxx | 2
unotools/source/ucbhelper/tempfile.cxx | 20
unoxml/source/rdf/librdf_repository.cxx | 3
vbahelper/source/msforms/vbacheckbox.cxx | 2
vbahelper/source/msforms/vbaradiobutton.cxx | 2
vcl/headless/svpgdi.cxx | 4
xmloff/source/draw/ximppage.cxx | 2
xmloff/source/style/impastpl.cxx | 2
337 files changed, 2237 insertions(+), 3637 deletions(-)
New commits:
commit 07ff2841ccf6d4f93941838305248f7048fec803
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Fri Jul 17 01:41:10 2015 +0200
add data label handling to series panel
Change-Id: I37415b5effb6ac320184008b9b25988804387715
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index 389ec28..b8b1b5a 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -24,6 +24,7 @@
#include <com/sun/star/chart2/DataPointLabel.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/chart/DataLabelPlacement.hpp>
#include "ChartSeriesPanel.hxx"
#include "ChartController.hxx"
@@ -76,6 +77,68 @@ void setDataLabelVisible(css::uno::Reference<css::frame::XModel> xModel, const O
DataSeriesHelper::deleteDataLabelsFromSeriesAndAllPoints(xSeries);
}
+struct LabelPlacementMap
+{
+ sal_Int32 nPos;
+ sal_Int32 nApi;
+};
+
+LabelPlacementMap aLabelPlacementMap[] = {
+ { 0, css::chart::DataLabelPlacement::TOP },
+ { 1, css::chart::DataLabelPlacement::BOTTOM },
+ { 2, css::chart::DataLabelPlacement::CENTER },
+ { 3, css::chart::DataLabelPlacement::OUTSIDE },
+ { 4, css::chart::DataLabelPlacement::INSIDE },
+ { 5, css::chart::DataLabelPlacement::NEAR_ORIGIN }
+};
+
+sal_Int32 getDataLabelPlacement(css::uno::Reference<css::frame::XModel> xModel,
+ const OUString& rCID)
+{
+ css::uno::Reference< css::beans::XPropertySet > xSeries(
+ ObjectIdentifier::getDataSeriesForCID(rCID, xModel), uno::UNO_QUERY );
+
+ if (!xSeries.is())
+ return false;
+
+ css::uno::Any aAny = xSeries->getPropertyValue("LabelPlacement");
+ if (!aAny.hasValue())
+ return 0;
+
+ sal_Int32 nPlacement = 0;
+ aAny >>= nPlacement;
+
+ for (size_t i = 0; i < SAL_N_ELEMENTS(aLabelPlacementMap); ++i)
+ {
+ if (aLabelPlacementMap[i].nApi == nPlacement)
+ return aLabelPlacementMap[i].nPos;
+ }
+
+ return 0;
+}
+
+void setDataLabelPlacement(css::uno::Reference<css::frame::XModel> xModel,
+ const OUString& rCID, sal_Int32 nPos)
+{
+ css::uno::Reference< css::beans::XPropertySet > xSeries(
+ ObjectIdentifier::getDataSeriesForCID(rCID, xModel), uno::UNO_QUERY );
+
+ if (!xSeries.is())
+ return;
+
+ sal_Int32 nApi = 0;
+ for (size_t i = 0; i < SAL_N_ELEMENTS(aLabelPlacementMap); ++i)
+ {
+ if (aLabelPlacementMap[i].nPos == nPos)
+ {
+ nApi = aLabelPlacementMap[i].nApi;
+ break;
+ }
+ }
+
+ xSeries->setPropertyValue("LabelPlacement", css::uno::makeAny(nApi));
+}
+
bool isTrendlineVisible(css::uno::Reference<css::frame::XModel> xModel,
const OUString& rCID)
{
@@ -192,6 +255,8 @@ ChartSeriesPanel::ChartSeriesPanel(
get(mpRBPrimaryAxis, "radiobutton_primary_axis");
get(mpRBSecondaryAxis, "radiobutton_secondary_axis");
+ get(mpLBLabelPlacement, "comboboxtext_label");
+
Initialize();
}
@@ -213,6 +278,8 @@ void ChartSeriesPanel::dispose()
mpRBPrimaryAxis.clear();
mpRBSecondaryAxis.clear();
+ mpLBLabelPlacement.clear();
+
PanelLayout::dispose();
}
@@ -232,6 +299,8 @@ void ChartSeriesPanel::Initialize()
aLink = LINK(this, ChartSeriesPanel, RadioBtnHdl);
mpRBPrimaryAxis->SetToggleHdl(aLink);
mpRBSecondaryAxis->SetToggleHdl(aLink);
+
+ mpLBLabelPlacement->SetSelectHdl(LINK(this, ChartSeriesPanel, ListBoxHdl));
}
void ChartSeriesPanel::updateData()
@@ -250,7 +319,8 @@ void ChartSeriesPanel::updateData()
assert(eType == OBJECTTYPE_DATA_SERIES);
#endif
SolarMutexGuard aGuard;
- mpCBLabel->Check(isDataLabelVisible(mxModel, aCID));
+ bool bLabelVisible = isDataLabelVisible(mxModel, aCID);
+ mpCBLabel->Check(bLabelVisible);
mpCBTrendline->Check(isTrendlineVisible(mxModel, aCID));
mpCBXError->Check(isErrorBarVisible(mxModel, aCID, false));
mpCBYError->Check(isErrorBarVisible(mxModel, aCID, true));
@@ -258,6 +328,9 @@ void ChartSeriesPanel::updateData()
bool bPrimaryAxis = isPrimaryAxis(mxModel, aCID);
mpRBPrimaryAxis->Check(bPrimaryAxis);
mpRBSecondaryAxis->Check(!bPrimaryAxis);
+
+ mpLBLabelPlacement->Enable(bLabelVisible);
+ mpLBLabelPlacement->SelectEntryPos(getDataLabelPlacement(mxModel, aCID));
}
VclPtr<vcl::Window> ChartSeriesPanel::Create (
@@ -353,6 +426,28 @@ IMPL_LINK_NOARG(ChartSeriesPanel, RadioBtnHdl)
return 0;
}
+IMPL_LINK_NOARG(ChartSeriesPanel, ListBoxHdl)
+{
+ css::uno::Reference<css::frame::XController> xController(mxModel->getCurrentController());
+ css::uno::Reference<css::view::XSelectionSupplier> xSelectionSupplier(xController, css::uno::UNO_QUERY);
+ if (!xSelectionSupplier.is())
+ return 0;
+
+ uno::Any aAny = xSelectionSupplier->getSelection();
+ assert(aAny.hasValue());
+ OUString aCID;
+ aAny >>= aCID;
+#ifdef DBG_UTIL
+ ObjectType eType = ObjectIdentifier::getObjectType(aCID);
+ assert(eType == OBJECTTYPE_DATA_SERIES);
+#endif
+
+ sal_Int32 nPos = mpLBLabelPlacement->GetSelectEntryPos();
+ setDataLabelPlacement(mxModel, aCID, nPos);
+
+ return 0;
+}
+
}} // end of namespace ::chart::sidebar
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
index a0c773b..32cce955 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
@@ -83,6 +83,8 @@ private:
VclPtr<RadioButton> mpRBPrimaryAxis;
VclPtr<RadioButton> mpRBSecondaryAxis;
+ VclPtr<ListBox> mpLBLabelPlacement;
+
css::uno::Reference<css::frame::XFrame> mxFrame;
::sfx2::sidebar::EnumContext maContext;
SfxBindings* mpBindings;
@@ -94,6 +96,7 @@ private:
DECL_LINK(CheckBoxHdl, CheckBox*);
DECL_LINK(RadioBtnHdl, void*);
+ DECL_LINK(ListBoxHdl, void*);
};
} } // end of namespace ::chart::sidebar
commit d84f954cc0ad22cf62e279da2e473f79d1fb889b
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Fri Jul 17 01:08:12 2015 +0200
also handle primary vs secondary axis in series panel
Change-Id: Ieed69e1e7ebd88b15dd6a6fb51863fab4f57479c
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index b318f59..389ec28 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/chart2/DataPointLabel.hpp>
#include <com/sun/star/chart/ErrorBarStyle.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
#include "ChartSeriesPanel.hxx"
#include "ChartController.hxx"
@@ -144,6 +145,31 @@ void setErrorBarVisible(css::uno::Reference<css::frame::XModel>
}
}
+bool isPrimaryAxis(css::uno::Reference<css::frame::XModel>
+ xModel, const OUString& rCID)
+{
+ css::uno::Reference< css::chart2::XDataSeries > xSeries(
+ ObjectIdentifier::getDataSeriesForCID(rCID, xModel), uno::UNO_QUERY );
+
+ if (!xSeries.is())
+ return true;
+
+ return DataSeriesHelper::getAttachedAxisIndex(xSeries) == 0;
+}
+
+void setAttachedAxisType(css::uno::Reference<css::frame::XModel>
+ xModel, const OUString& rCID, bool bPrimary)
+{
+ css::uno::Reference< css::beans::XPropertySet > xSeries(
+ ObjectIdentifier::getDataSeriesForCID(rCID, xModel), uno::UNO_QUERY );
+
+ if (!xSeries.is())
+ return;
+
+ sal_Int32 nIndex = bPrimary ? 0 : 1;
+ xSeries->setPropertyValue("AttachedAxisIndex", css::uno::makeAny(nIndex));
+}
+
}
ChartSeriesPanel::ChartSeriesPanel(
@@ -163,6 +189,9 @@ ChartSeriesPanel::ChartSeriesPanel(
get(mpCBXError, "checkbutton_x_error");
get(mpCBYError, "checkbutton_y_error");
+ get(mpRBPrimaryAxis, "radiobutton_primary_axis");
+ get(mpRBSecondaryAxis, "radiobutton_secondary_axis");
+
Initialize();
}
@@ -181,6 +210,9 @@ void ChartSeriesPanel::dispose()
mpCBXError.clear();
mpCBYError.clear();
+ mpRBPrimaryAxis.clear();
+ mpRBSecondaryAxis.clear();
+
PanelLayout::dispose();
}
@@ -196,6 +228,10 @@ void ChartSeriesPanel::Initialize()
mpCBTrendline->SetClickHdl(aLink);
mpCBXError->SetClickHdl(aLink);
mpCBYError->SetClickHdl(aLink);
+
+ aLink = LINK(this, ChartSeriesPanel, RadioBtnHdl);
+ mpRBPrimaryAxis->SetToggleHdl(aLink);
+ mpRBSecondaryAxis->SetToggleHdl(aLink);
}
void ChartSeriesPanel::updateData()
@@ -218,6 +254,10 @@ void ChartSeriesPanel::updateData()
mpCBTrendline->Check(isTrendlineVisible(mxModel, aCID));
mpCBXError->Check(isErrorBarVisible(mxModel, aCID, false));
mpCBYError->Check(isErrorBarVisible(mxModel, aCID, true));
+
+ bool bPrimaryAxis = isPrimaryAxis(mxModel, aCID);
+ mpRBPrimaryAxis->Check(bPrimaryAxis);
+ mpRBSecondaryAxis->Check(!bPrimaryAxis);
}
VclPtr<vcl::Window> ChartSeriesPanel::Create (
@@ -290,6 +330,29 @@ IMPL_LINK(ChartSeriesPanel, CheckBoxHdl, CheckBox*, pCheckBox)
return 0;
}
+IMPL_LINK_NOARG(ChartSeriesPanel, RadioBtnHdl)
+{
+ css::uno::Reference<css::frame::XController> xController(mxModel->getCurrentController());
+ css::uno::Reference<css::view::XSelectionSupplier> xSelectionSupplier(xController, css::uno::UNO_QUERY);
+ if (!xSelectionSupplier.is())
+ return 0;
+
+ uno::Any aAny = xSelectionSupplier->getSelection();
+ assert(aAny.hasValue());
+ OUString aCID;
+ aAny >>= aCID;
+#ifdef DBG_UTIL
+ ObjectType eType = ObjectIdentifier::getObjectType(aCID);
+ assert(eType == OBJECTTYPE_DATA_SERIES);
+#endif
+
+ bool bChecked = mpRBPrimaryAxis->IsChecked();
+
+ setAttachedAxisType(mxModel, aCID, bChecked);
+
+ return 0;
+}
+
}} // end of namespace ::chart::sidebar
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
index 7594e28..a0c773b 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
@@ -80,6 +80,9 @@ private:
VclPtr<CheckBox> mpCBXError;
VclPtr<CheckBox> mpCBYError;
+ VclPtr<RadioButton> mpRBPrimaryAxis;
+ VclPtr<RadioButton> mpRBSecondaryAxis;
+
css::uno::Reference<css::frame::XFrame> mxFrame;
::sfx2::sidebar::EnumContext maContext;
SfxBindings* mpBindings;
@@ -90,6 +93,7 @@ private:
void Initialize();
DECL_LINK(CheckBoxHdl, CheckBox*);
+ DECL_LINK(RadioBtnHdl, void*);
};
} } // end of namespace ::chart::sidebar
diff --git a/chart2/uiconfig/ui/sidebarseries.ui b/chart2/uiconfig/ui/sidebarseries.ui
index afcc7a9..88180b5 100644
--- a/chart2/uiconfig/ui/sidebarseries.ui
+++ b/chart2/uiconfig/ui/sidebarseries.ui
@@ -2,7 +2,7 @@
<!-- Generated with glade 3.18.3 -->
<interface>
<requires lib="gtk+" version="3.12"/>
- <object class="GtkGrid" id="DataSeriesPanel">
+ <object class="GtkGrid" id="ChartSeriesPanel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
commit 98b0cd76606935fb03476837f8d44acfab62e249
Author: Eike Rathke <erack at redhat.com>
Date: Fri Jul 17 00:57:18 2015 +0200
do not reset existing HasHeader on anonymous database range
tdf#88402 related
Change-Id: I401c67da383227496e9d8c2b2ed0671e2a2796f2
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 050ace4..3ee3d00 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -315,9 +315,6 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
ScDBData* ScDocShell::GetAnonymousDBData(const ScRange& rRange)
{
- bool bHasHeader = aDocument.HasColHeader(
- rRange.aStart.Col(), rRange.aStart.Row(), rRange.aEnd.Col(), rRange.aEnd.Row(), rRange.aStart.Tab());
-
ScDBCollection* pColl = aDocument.GetDBCollection();
if (!pColl)
return NULL;
@@ -326,7 +323,13 @@ ScDBData* ScDocShell::GetAnonymousDBData(const ScRange& rRange)
if (!pData)
return NULL;
- pData->SetHeader(bHasHeader);
+ if (!pData->HasHeader())
+ {
+ bool bHasHeader = aDocument.HasColHeader(
+ rRange.aStart.Col(), rRange.aStart.Row(), rRange.aEnd.Col(), rRange.aEnd.Row(), rRange.aStart.Tab());
+ pData->SetHeader(bHasHeader);
+ }
+
return pData;
}
commit 6567538600b6da2abdd684e5ee242aca595c6344
Author: Eike Rathke <erack at redhat.com>
Date: Fri Jul 17 00:15:00 2015 +0200
inherit existing HasHeader when expanding/shrinking anonymous database range
tdf#88402 related
Adding columns, invoking Data->Sort, Cancel now still does not lose a
HasHeader set in a previous Sort dialog.
Change-Id: I1388b8f6a1964fb584f1826751072ba648f53ab7
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index 9e245b6..050ace4 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -236,6 +236,15 @@ ScDBData* ScDocShell::GetDBData( const ScRange& rMarked, ScGetDBMode eMode, ScGe
SCROW nOldY2;
SCTAB nOldTab;
pNoNameData->GetArea( nOldTab, nOldX1, nOldY1, nOldX2, nOldY2 );
+
+ // If previously bHasHeader was set and the new range starts on the
+ // same row and intersects the old column range, then don't reset
+ // bHasHeader but assume that the new range still has headers, just
+ // some are empty or numeric.
+ if (!bHasHeader && pNoNameData->HasHeader() && nTab == nOldTab && nStartRow == nOldY1 &&
+ nStartCol <= nOldY2 && nOldY1 <= nEndCol)
+ bHasHeader = true;
+
DBAreaDeleted( nOldTab, nOldX1, nOldY1, nOldX2, nOldY2 );
pNoNameData->SetSortParam( ScSortParam() ); // Parameter zuruecksetzen
commit 6be4dfccdac9aa2d6488f9cee03622e56024f0b4
Author: Varun <varun.dhall at studentpartner.com>
Date: Thu Jul 16 15:54:23 2015 +0530
Added UNO test coverage for SwXTextDefaults
Conflicts:
sw/qa/extras/uiwriter/uiwriter.cxx
Change-Id: I963509aae81616711726268a5b215b2ecb93898f
Reviewed-on: https://gerrit.libreoffice.org/17125
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index b0e0457..72e5a8c 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -37,6 +37,7 @@
#include <unotbl.hxx>
#include <pagedesc.hxx>
#include "com/sun/star/text/XDefaultNumberingProvider.hpp"
+#include "com/sun/star/awt/FontUnderline.hpp"
#include <svx/svdpage.hxx>
#include <svx/svdview.hxx>
@@ -117,6 +118,7 @@ public:
void testTdf90808();
void testTdf75137();
void testTdf83798();
+ void testPropertyDefaults();
void testTableBackgroundColor();
void testTdf88899();
void testTdf90362();
@@ -173,6 +175,7 @@ public:
CPPUNIT_TEST(testTdf90808);
CPPUNIT_TEST(testTdf75137);
CPPUNIT_TEST(testTdf83798);
+ CPPUNIT_TEST(testPropertyDefaults);
CPPUNIT_TEST(testTableBackgroundColor);
CPPUNIT_TEST(testTdf88899);
CPPUNIT_TEST(testTdf90362);
@@ -1530,6 +1533,53 @@ void SwUiWriterTest::testTdf83798()
pCrsr->DeleteMark();
}
+void SwUiWriterTest::testPropertyDefaults()
+{
+ createDoc();
+ uno::Reference<lang::XMultiServiceFactory> xFact(mxComponent, uno::UNO_QUERY);
+ uno::Reference<uno::XInterface> xInterface(xFact->createInstance("com.sun.star.text.Defaults"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropSet(xInterface, uno::UNO_QUERY_THROW);
+ uno::Reference<beans::XPropertyState> xPropState(xInterface, uno::UNO_QUERY);
+ //testing CharFontName from style::CharacterProperties
+ //getting property default
+ uno::Any aCharFontName = xPropState->getPropertyDefault(OUString("CharFontName"));
+ //asserting property default and defaults received from "css.text.Defaults" service
+ CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue(OUString("CharFontName")), aCharFontName);
+ //changing the default value
+ xPropSet->setPropertyValue(OUString("CharFontName"), uno::makeAny(OUString("Symbol")));
+ CPPUNIT_ASSERT_EQUAL(uno::makeAny(OUString("Symbol")), xPropSet->getPropertyValue(OUString("CharFontName")));
+ //resetting the value to default
+ xPropState->setPropertyToDefault(OUString("CharFontName"));
+ CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue(OUString("CharFontName")), aCharFontName);
+ //testing CharHeight from style::CharacterProperties
+ //getting property default
+ uno::Any aCharHeight = xPropState->getPropertyDefault(OUString("CharHeight"));
+ //asserting property default and defaults received from "css.text.Defaults" service
+ CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue(OUString("CharHeight")), aCharHeight);
+ //changing the default value
+ xPropSet->setPropertyValue(OUString("CharHeight"), uno::makeAny(float(14)));
+ CPPUNIT_ASSERT_EQUAL(uno::makeAny(float(14)), xPropSet->getPropertyValue(OUString("CharHeight")));
+ //resetting the value to default
+ xPropState->setPropertyToDefault(OUString("CharHeight"));
+ CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue(OUString("CharHeight")), aCharHeight);
+ //testing CharWeight from style::CharacterProperties
+ uno::Any aCharWeight = xPropSet->getPropertyValue(OUString("CharWeight"));
+ //changing the default value
+ xPropSet->setPropertyValue(OUString("CharWeight"), uno::makeAny(float(awt::FontWeight::BOLD)));
+ CPPUNIT_ASSERT_EQUAL(uno::makeAny(float(awt::FontWeight::BOLD)), xPropSet->getPropertyValue(OUString("CharWeight")));
+ //resetting the value to default
+ xPropState->setPropertyToDefault(OUString("CharWeight"));
+ CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue(OUString("CharWeight")), aCharWeight);
+ //testing CharUnderline from style::CharacterProperties
+ uno::Any aCharUnderline = xPropSet->getPropertyValue(OUString("CharUnderline"));
+ //changing the default value
+ xPropSet->setPropertyValue(OUString("CharUnderline"), uno::makeAny(sal_Int16(awt::FontUnderline::SINGLE)));
+ CPPUNIT_ASSERT_EQUAL(uno::makeAny(sal_Int16(awt::FontUnderline::SINGLE)), xPropSet->getPropertyValue(OUString("CharUnderline")));
+ //resetting the value to default
+ xPropState->setPropertyToDefault(OUString("CharUnderline"));
+ CPPUNIT_ASSERT_EQUAL(xPropSet->getPropertyValue(OUString("CharUnderline")), aCharUnderline);
+}
+
void SwUiWriterTest::testTableBackgroundColor()
{
SwDoc* pDoc = createDoc();
commit 4f1a8f697e05bc4fb52be7a84a3307d595b4c09b
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Thu Jul 16 23:16:06 2015 +0300
Convert Alignment button to the generic controller
Change-Id: I76ead43fa1cfe7ba1b62d2b13c4f4d7658a9f290
diff --git a/include/svx/tbxalign.hxx b/include/svx/tbxalign.hxx
deleted file mode 100644
index 8c8c0e4..0000000
--- a/include/svx/tbxalign.hxx
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_SVX_TBXALIGN_HXX
-#define INCLUDED_SVX_TBXALIGN_HXX
-
-#include <sfx2/tbxctrl.hxx>
-#include <svx/svxdllapi.h>
-
-
-class SVX_DLLPUBLIC SvxTbxCtlAlign: public SfxToolBoxControl
-{
-public:
- virtual sal_Bool SAL_CALL opensSubToolbar() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual OUString SAL_CALL getSubToolbarName() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual void SAL_CALL functionSelected( const OUString& aCommand ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- virtual void SAL_CALL updateImage() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-
- virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE;
-
- SFX_DECL_TOOLBOX_CONTROL();
-
- SvxTbxCtlAlign( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
- virtual ~SvxTbxCtlAlign() {}
-private:
- OUString m_aSubTbName;
- OUString m_aSubTbResName;
- OUString m_aCommand;
-};
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
index c91995f..554eced 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
@@ -187,6 +187,20 @@
</node>
</node>
<node oor:name="ToolBar">
+ <node oor:name="AlignmentControl" oor:op="replace">
+ <prop oor:name="Command">
+ <value>.uno:ObjectAlign</value>
+ </prop>
+ <prop oor:name="Module">
+ <value/>
+ </prop>
+ <prop oor:name="Controller">
+ <value>com.sun.star.comp.framework.SubToolBarController</value>
+ </prop>
+ <prop oor:name="Value">
+ <value>alignmentbar;.uno:ObjectAlignLeft</value>
+ </prop>
+ </node>
<node oor:name="GraphicFilterControl" oor:op="replace">
<prop oor:name="Command">
<value>.uno:GraphicFilterToolbox</value>
diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx
index 689eb50..0557c2e 100644
--- a/sc/inc/pch/precompiled_sc.hxx
+++ b/sc/inc/pch/precompiled_sc.hxx
@@ -810,7 +810,6 @@
#include <svx/sxcecitm.hxx>
#include <svx/sxciaitm.hxx>
#include <svx/tbcontrl.hxx>
-#include <svx/tbxalign.hxx>
#include <svx/tbxcolor.hxx>
#include <svx/tbxctl.hxx>
#include <svx/txenctab.hxx>
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index 3f5e983..33e035e 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -66,7 +66,6 @@
// Controls
-#include <svx/tbxalign.hxx>
#include <svx/tbxctl.hxx>
#include <svx/fillctrl.hxx>
#include <svx/linectrl.hxx>
@@ -157,7 +156,6 @@ void ScDLL::Init()
// SvxToolboxController
SvxTbxCtlDraw ::RegisterControl(SID_INSERT_DRAW, pMod);
- SvxTbxCtlAlign ::RegisterControl(SID_OBJECT_ALIGN, pMod);
SvxFillToolBoxControl ::RegisterControl(0, pMod);
SvxLineStyleToolBoxControl ::RegisterControl(0, pMod);
SvxLineWidthToolBoxControl ::RegisterControl(0, pMod);
diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi
index 827bdff..2a721d8 100644
--- a/sd/sdi/_drvwsh.sdi
+++ b/sd/sdi/_drvwsh.sdi
@@ -1265,9 +1265,8 @@ interface DrawView
StateMethod = GetMenuState ;
]
- TbxImageItem ObjectAlign SID_OBJECT_ALIGN // ole : no, status : ?
+ SfxVoidItem ObjectAlign SID_OBJECT_ALIGN // ole : no, status : ?
[
- ExecMethod = FuSupport ;
StateMethod = GetMenuState ;
GroupId = GID_DOCUMENT ;
Cachable , Export ;
diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx
index 0a499e8..8fb1907 100644
--- a/sd/source/ui/app/sddll.cxx
+++ b/sd/source/ui/app/sddll.cxx
@@ -161,7 +161,6 @@ void SdDLL::RegisterControllers()
SfxModule* pMod = SD_MOD();
// ToolBoxControls registrieren
- SdTbxControl::RegisterControl( SID_OBJECT_ALIGN, pMod );
SdTbxControl::RegisterControl( SID_ZOOM_TOOLBOX, pMod );
SdTbxControl::RegisterControl( SID_OBJECT_CHOOSE_MODE, pMod );
SdTbxControl::RegisterControl( SID_POSITION, pMod );
diff --git a/sd/source/ui/app/tbxww.cxx b/sd/source/ui/app/tbxww.cxx
index 69a8e4e..ee33923 100644
--- a/sd/source/ui/app/tbxww.cxx
+++ b/sd/source/ui/app/tbxww.cxx
@@ -62,10 +62,6 @@ VclPtr<SfxPopupWindow> SdTbxControl::CreatePopupWindow()
OUStringBuffer aTbxResName( "private:resource/toolbar/" );
switch( GetSlotId() )
{
- case SID_OBJECT_ALIGN:
- aTbxResName.appendAscii( "alignmentbar" );
- aToolBarResStr = aTbxResName.makeStringAndClear();
- break;
case SID_ZOOM_TOOLBOX:
aTbxResName.appendAscii( "zoombar" );
aToolBarResStr = aTbxResName.makeStringAndClear();
@@ -156,8 +152,7 @@ void SdTbxControl::StateChanged( sal_uInt16 nSId,
if( nSId != SID_ZOOM_TOOLBOX &&
nSId != SID_DRAWTBX_INSERT &&
- nSId != SID_POSITION &&
- nSId != SID_OBJECT_ALIGN )
+ nSId != SID_POSITION )
{
if( nSId != SID_OBJECT_CHOOSE_MODE &&
rTbx.IsItemChecked( SID_OBJECT_CHOOSE_MODE ) )
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index 66a6e86..c5c89ba 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -66,7 +66,7 @@ class DrawViewShell
public SfxListener
{
public:
- static const int SLOTARRAY_COUNT = 24;
+ static const int SLOTARRAY_COUNT = 22;
TYPEINFO_OVERRIDE();
SFX_DECL_INTERFACE(SD_IF_SDDRAWVIEWSHELL)
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 8b6d968..c8311e9 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -292,8 +292,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
if( nSId != SID_ZOOM_TOOLBOX &&
nSId != SID_DRAWTBX_INSERT &&
- nSId != SID_POSITION &&
- nSId != SID_OBJECT_ALIGN )
+ nSId != SID_POSITION )
{
if( nId != SID_OBJECT_CHOOSE_MODE )
rSet.Put( TbxImageItem( SID_OBJECT_CHOOSE_MODE, 0 ) );
@@ -1365,7 +1364,6 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
if( xSlideshow.is() && xSlideshow->isRunning() )
{
- rSet.ClearItem(SID_OBJECT_ALIGN);
rSet.ClearItem(SID_ZOOM_TOOLBOX);
rSet.ClearItem(SID_OBJECT_CHOOSE_MODE);
rSet.ClearItem(SID_DRAWTBX_TEXT);
@@ -1379,7 +1377,6 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
rSet.ClearItem(SID_DRAWTBX_INSERT);
rSet.ClearItem(SID_INSERTFILE);
rSet.ClearItem(SID_OBJECT_ROTATE);
- rSet.ClearItem(SID_OBJECT_ALIGN);
rSet.ClearItem(SID_POSITION);
rSet.ClearItem(SID_FM_CONFIG);
rSet.ClearItem(SID_ANIMATION_EFFECTS);
@@ -1400,7 +1397,6 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
rSet.DisableItem(SID_DRAWTBX_INSERT);
rSet.DisableItem(SID_INSERTFILE);
rSet.DisableItem(SID_OBJECT_ROTATE);
- rSet.DisableItem(SID_OBJECT_ALIGN);
rSet.DisableItem(SID_POSITION);
rSet.DisableItem(SID_FM_CONFIG);
rSet.DisableItem(SID_ANIMATION_EFFECTS);
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index a1b332e..2176907 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -224,28 +224,26 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
mpSlotArray = new sal_uInt16[ SLOTARRAY_COUNT ];
mpSlotArray[ 0 ] = SID_OBJECT_CHOOSE_MODE;
mpSlotArray[ 1 ] = SID_OBJECT_ROTATE;
- mpSlotArray[ 2 ] = SID_OBJECT_ALIGN;
- mpSlotArray[ 3 ] = SID_OBJECT_ALIGN_LEFT;
- mpSlotArray[ 4 ] = SID_ZOOM_TOOLBOX;
- mpSlotArray[ 5 ] = SID_ZOOM_TOOLBOX;
- mpSlotArray[ 6 ] = SID_DRAWTBX_TEXT;
- mpSlotArray[ 7 ] = SID_ATTR_CHAR;
- mpSlotArray[ 8 ] = SID_DRAWTBX_RECTANGLES;
- mpSlotArray[ 9 ] = SID_DRAW_RECT;
- mpSlotArray[ 10 ] = SID_DRAWTBX_ELLIPSES;
- mpSlotArray[ 11 ] = SID_DRAW_ELLIPSE;
- mpSlotArray[ 12 ] = SID_DRAWTBX_LINES;
- mpSlotArray[ 13 ] = SID_DRAW_FREELINE_NOFILL;
- mpSlotArray[ 14 ] = SID_DRAWTBX_3D_OBJECTS;
- mpSlotArray[ 15 ] = SID_3D_CUBE;
- mpSlotArray[ 16 ] = SID_DRAWTBX_INSERT;
- mpSlotArray[ 17 ] = SID_INSERT_DIAGRAM;
- mpSlotArray[ 18 ] = SID_POSITION;
- mpSlotArray[ 19 ] = SID_FRAME_TO_TOP;
- mpSlotArray[ 20 ] = SID_DRAWTBX_CONNECTORS;
- mpSlotArray[ 21 ] = SID_TOOL_CONNECTOR;
- mpSlotArray[ 22 ] = SID_DRAWTBX_ARROWS;
- mpSlotArray[ 23 ] = SID_LINE_ARROW_END;
+ mpSlotArray[ 2 ] = SID_ZOOM_TOOLBOX;
+ mpSlotArray[ 3 ] = SID_ZOOM_TOOLBOX;
+ mpSlotArray[ 4 ] = SID_DRAWTBX_TEXT;
+ mpSlotArray[ 5 ] = SID_ATTR_CHAR;
+ mpSlotArray[ 6 ] = SID_DRAWTBX_RECTANGLES;
+ mpSlotArray[ 7 ] = SID_DRAW_RECT;
+ mpSlotArray[ 8 ] = SID_DRAWTBX_ELLIPSES;
+ mpSlotArray[ 9 ] = SID_DRAW_ELLIPSE;
+ mpSlotArray[ 10 ] = SID_DRAWTBX_LINES;
+ mpSlotArray[ 11 ] = SID_DRAW_FREELINE_NOFILL;
+ mpSlotArray[ 12 ] = SID_DRAWTBX_3D_OBJECTS;
+ mpSlotArray[ 13 ] = SID_3D_CUBE;
+ mpSlotArray[ 14 ] = SID_DRAWTBX_INSERT;
+ mpSlotArray[ 15 ] = SID_INSERT_DIAGRAM;
+ mpSlotArray[ 16 ] = SID_POSITION;
+ mpSlotArray[ 17 ] = SID_FRAME_TO_TOP;
+ mpSlotArray[ 18 ] = SID_DRAWTBX_CONNECTORS;
+ mpSlotArray[ 19 ] = SID_TOOL_CONNECTOR;
+ mpSlotArray[ 20 ] = SID_DRAWTBX_ARROWS;
+ mpSlotArray[ 21 ] = SID_LINE_ARROW_END;
SetPool( &GetDoc()->GetPool() );
diff --git a/sd/source/ui/view/drviewsc.cxx b/sd/source/ui/view/drviewsc.cxx
index d3508a6..0bacea5 100644
--- a/sd/source/ui/view/drviewsc.cxx
+++ b/sd/source/ui/view/drviewsc.cxx
@@ -73,17 +73,6 @@ sal_uInt16 DrawViewShell::GetIdBySubId( sal_uInt16 nSId )
}
break;
- case SID_OBJECT_ALIGN_LEFT:
- case SID_OBJECT_ALIGN_CENTER:
- case SID_OBJECT_ALIGN_RIGHT:
- case SID_OBJECT_ALIGN_UP:
- case SID_OBJECT_ALIGN_MIDDLE:
- case SID_OBJECT_ALIGN_DOWN:
- {
- nMappedSId = SID_OBJECT_ALIGN;
- }
- break;
-
case SID_FRAME_TO_TOP:
case SID_MOREFRONT:
case SID_MOREBACK:
@@ -277,9 +266,6 @@ void DrawViewShell::UpdateToolboxImages( SfxItemSet &rSet, bool bPermanent )
nId = GetArrayId( SID_POSITION ) + 1;
rSet.Put( TbxImageItem( SID_POSITION, mpSlotArray[nId] ) );
-
- nId = GetArrayId( SID_OBJECT_ALIGN ) + 1;
- rSet.Put( TbxImageItem( SID_OBJECT_ALIGN, mpSlotArray[nId] ) );
}
else
{
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 516f487..84208f1 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -728,7 +728,6 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
// execute slots of ToolboxController mapped
case SID_OBJECT_CHOOSE_MODE:
case SID_POSITION:
- case SID_OBJECT_ALIGN:
case SID_ZOOM_TOOLBOX:
case SID_DRAWTBX_TEXT:
case SID_DRAWTBX_RECTANGLES:
diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx
index 10a3f5a..f239c36 100644
--- a/sd/source/ui/view/drviewsj.cxx
+++ b/sd/source/ui/view/drviewsj.cxx
@@ -227,6 +227,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
if(pObj->ISA(E3dCompoundObject))
{
+ rSet.DisableItem( SID_OBJECT_ALIGN );
rSet.DisableItem( SID_OBJECT_ALIGN_LEFT );
rSet.DisableItem( SID_OBJECT_ALIGN_CENTER );
rSet.DisableItem( SID_OBJECT_ALIGN_RIGHT );
@@ -414,6 +415,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
if(bE3dCompoundObject)
{
+ rSet.DisableItem( SID_OBJECT_ALIGN );
rSet.DisableItem( SID_OBJECT_ALIGN_LEFT );
rSet.DisableItem( SID_OBJECT_ALIGN_CENTER );
rSet.DisableItem( SID_OBJECT_ALIGN_RIGHT );
@@ -471,6 +473,7 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
rSet.DisableItem( SID_DELETE );
rSet.DisableItem( SID_ATTR_TRANSFORM );
+ rSet.DisableItem( SID_OBJECT_ALIGN );
rSet.DisableItem( SID_OBJECT_ALIGN_LEFT );
rSet.DisableItem( SID_OBJECT_ALIGN_CENTER );
rSet.DisableItem( SID_OBJECT_ALIGN_RIGHT );
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index a890ed7..22216d6 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -227,7 +227,6 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
svx/source/tbxctrls/linectrl \
svx/source/tbxctrls/tbunocontroller \
svx/source/tbxctrls/tbunosearchcontrollers \
- svx/source/tbxctrls/tbxalign \
svx/source/tbxctrls/tbxcolor \
svx/source/tbxctrls/tbxdrctl \
svx/source/tbxctrls/verttexttbxctrl \
diff --git a/svx/source/tbxctrls/tbxalign.cxx b/svx/source/tbxctrls/tbxalign.cxx
deleted file mode 100644
index def2b2e..0000000
--- a/svx/source/tbxctrls/tbxalign.cxx
+++ /dev/null
@@ -1,105 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include <svl/aeitem.hxx>
-
-#include <svx/dialmgr.hxx>
-#include <svx/dialogs.hrc>
-
-#include "svx/tbxalign.hxx"
-#include <sfx2/imagemgr.hxx>
-#include <vcl/svapp.hxx>
-#include <osl/mutex.hxx>
-
-#include <sfx2/app.hxx>
-#include <vcl/toolbox.hxx>
-
-SFX_IMPL_TOOLBOX_CONTROL(SvxTbxCtlAlign, SfxAllEnumItem);
-
-/*
- * Klasse fuer SwToolbox
- */
-SvxTbxCtlAlign::SvxTbxCtlAlign( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :
- SfxToolBoxControl( nSlotId, nId, rTbx )
- , m_aSubTbName( "alignmentbar" )
- , m_aSubTbResName( "private:resource/toolbar/alignmentbar" )
-{
- rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWN | rTbx.GetItemBits( nId ) );
- rTbx.Invalidate();
-
- m_aCommand = m_aCommandURL;
-}
-
-/*
- * Hier wird das Fenster erzeugt
- * Lage der Toolbox mit GetToolBox() abfragbar
- * rItemRect sind die Screen-Koordinaten
- */
-
-VclPtr<SfxPopupWindow> SvxTbxCtlAlign::CreatePopupWindow()
-{
- SolarMutexGuard aGuard;
- if ( GetSlotId() == SID_OBJECT_ALIGN )
- createAndPositionSubToolBar( m_aSubTbResName );
- return NULL;
-}
-
-
-// XSubToolbarController
-
-
-sal_Bool SAL_CALL SvxTbxCtlAlign::opensSubToolbar() throw (::com::sun::star::uno::RuntimeException, std::exception)
-{
- // We control a sub-toolbar therefore, we have to return true.
- return sal_True;
-}
-
-OUString SAL_CALL SvxTbxCtlAlign::getSubToolbarName() throw (::com::sun::star::uno::RuntimeException, std::exception)
-{
- // Provide the controlled sub-toolbar name, so we are notified whenever
- // this toolbar executes a function.
- SolarMutexGuard aGuard;
- return m_aSubTbName;
-}
-
-void SAL_CALL SvxTbxCtlAlign::functionSelected( const OUString& aCommand ) throw (::com::sun::star::uno::RuntimeException, std::exception)
-{
- // remember the new command
- m_aCommand = aCommand;
-
- // Our sub-toolbar wants to execute a function.
- // We have to change the image of our toolbar button to reflect the new function.
- updateImage();
-}
-
-void SAL_CALL SvxTbxCtlAlign::updateImage() throw (::com::sun::star::uno::RuntimeException, std::exception)
-{
- // We should update the button image of our parent (toolbar). Use the stored
- // command to set the correct current image.
- SolarMutexGuard aGuard;
- if ( !m_aCommand.isEmpty() )
- {
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame( getFrameInterface());
- Image aImage = GetImage( xFrame, m_aCommand, hasBigImages() );
- if ( !!aImage )
- GetToolBox().SetItemImage( GetId(), aImage );
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index d26b462..1540a5e 100644
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -950,7 +950,6 @@
#include <svx/sxciaitm.hxx>
#include <svx/sxenditm.hxx>
#include <svx/tbcontrl.hxx>
-#include <svx/tbxalign.hxx>
#include <svx/tbxcolor.hxx>
#include <svx/tbxctl.hxx>
#include <svx/unoapi.hxx>
diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx
index ec9a758..5236516 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -42,7 +42,6 @@
#include <svx/layctrl.hxx>
#include <svx/fontwork.hxx>
#include <SwSpellDialogChildWindow.hxx>
-#include <svx/tbxalign.hxx>
#include <svx/grafctrl.hxx>
#include <svx/tbxcolor.hxx>
#include <svx/clipboardctl.hxx>
@@ -286,7 +285,6 @@ void SwDLL::RegisterControls()
SfxRecentFilesToolBoxControl::RegisterControl( FN_OPEN_FILE, pMod );
SvxTbxCtlDraw::RegisterControl(SID_INSERT_DRAW, pMod );
- SvxTbxCtlAlign::RegisterControl(SID_OBJECT_ALIGN, pMod );
SwTbxAnchor::RegisterControl(FN_TOOL_ANCHOR, pMod );
SwTbxFieldCtrl::RegisterControl(FN_INSERT_FIELD_CTRL, pMod );
SwTbxAutoTextCtrl::RegisterControl(FN_GLOSSARY_DLG, pMod );
commit 8ccea9c7d661da42d3e5a3f459f8f568990e8fac
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Thu Jul 16 17:44:56 2015 +0300
sc: Disable the alignment group button
... when all its items are disabled. That's the same
behavior now as in Writer.
Change-Id: Ic74d0737ae7cc709a64524c1aa43783af8f4fbcc
diff --git a/sc/sdi/drawsh.sdi b/sc/sdi/drawsh.sdi
index 7fb2639..2801b17 100644
--- a/sc/sdi/drawsh.sdi
+++ b/sc/sdi/drawsh.sdi
@@ -125,7 +125,7 @@ interface TableDraw
Export = FALSE ;
// PseudoPrefix = SID_OBJECT_ALIGN;
ExecMethod = ExecDrawFunc ;
- StateMethod = NoState ;
+ StateMethod = GetDrawFuncState ;
GroupId = GID_FORMAT ;
FastCall , Cachable ;
ToolBoxConfig ;
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx
index bed8407..e01639d 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -164,6 +164,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl
rSet.DisableItem( SID_OBJECT_ALIGN_UP );
rSet.DisableItem( SID_OBJECT_ALIGN_MIDDLE );
rSet.DisableItem( SID_OBJECT_ALIGN_DOWN );
+ rSet.DisableItem( SID_OBJECT_ALIGN );
// pseudo slots for Format menu
rSet.DisableItem( SID_ALIGN_ANY_LEFT );
commit de48b8af6ddf272bf37be1574630986a302fd5c8
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Thu Jul 16 16:56:28 2015 +0300
Ignore string status updates completely
See no benefit of it here, and also it has some unexpected
results with some commands that have enum commands, and
use a string item to update the currently selected item.
Change-Id: Iae54c4e1fb7a3aa5a7c1a03904fb3629ed63c8f0
diff --git a/framework/source/uielement/subtoolbarcontroller.cxx b/framework/source/uielement/subtoolbarcontroller.cxx
index 3a16760..63a0984 100644
--- a/framework/source/uielement/subtoolbarcontroller.cxx
+++ b/framework/source/uielement/subtoolbarcontroller.cxx
@@ -137,7 +137,6 @@ void SubToolBarController::statusChanged( const css::frame::FeatureStateEvent& E
TriState eTri = TRISTATE_FALSE;
bool bValue;
- OUString aStrValue;
css::frame::status::ItemStatus aItemState;
css::frame::status::Visibility aItemVisibility;
@@ -150,10 +149,6 @@ void SubToolBarController::statusChanged( const css::frame::FeatureStateEvent& E
eTri = TRISTATE_TRUE;
nItemBits |= ToolBoxItemBits::CHECKABLE;
}
- else if ( Event.State >>= aStrValue )
- {
- pToolBox->SetItemText( nId, aStrValue );
- }
else if ( Event.State >>= aItemState )
{
eTri = TRISTATE_INDET;
commit b1d4af61c68be8dcda6fa97aa6cef97e77d77c23
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Thu Jul 16 16:43:30 2015 +0300
Convert FontWorkShapeTypeControl to the generic controller
Change-Id: I7824136aa2780c4062a66f7a5284a342862f319a
diff --git a/include/svx/fontworkgallery.hxx b/include/svx/fontworkgallery.hxx
index fa71862..b415f35 100644
--- a/include/svx/fontworkgallery.hxx
+++ b/include/svx/fontworkgallery.hxx
@@ -48,17 +48,6 @@ class SfxBindings;
namespace svx
{
-class SVX_DLLPUBLIC SAL_WARN_UNUSED FontWorkShapeTypeControl : public SfxToolBoxControl
-{
-public:
- SFX_DECL_TOOLBOX_CONTROL();
- FontWorkShapeTypeControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx );
- virtual ~FontWorkShapeTypeControl();
-
- virtual void Select(sal_uInt16 nSelectModifier) SAL_OVERRIDE;
- virtual VclPtr<SfxPopupWindow> CreatePopupWindow() SAL_OVERRIDE;
-};
-
class SAL_WARN_UNUSED FontworkCharacterSpacingDialog : public ModalDialog
{
VclPtr<MetricField> m_pMtrScale;
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
index 46f5d96..c91995f 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Controller.xcu
@@ -411,6 +411,20 @@
<value>com.sun.star.comp.svx.FontworkCharacterSpacingController</value>
</prop>
</node>
+ <node oor:name="FontworkShapeTypeControl" oor:op="replace">
+ <prop oor:name="Command">
+ <value>.uno:FontworkShapeType</value>
+ </prop>
+ <prop oor:name="Module">
+ <value/>
+ </prop>
+ <prop oor:name="Controller">
+ <value>com.sun.star.comp.framework.SubToolBarController</value>
+ </prop>
+ <prop oor:name="Value">
+ <value>fontworkshapetype</value>
+ </prop>
+ </node>
<node oor:name="c3" oor:op="replace">
<prop oor:name="Command">
<value>.uno:ChartElementSelector</value>
diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx
index 646f969..689eb50 100644
--- a/sc/inc/pch/precompiled_sc.hxx
+++ b/sc/inc/pch/precompiled_sc.hxx
@@ -731,7 +731,6 @@
#include <svx/fntszctl.hxx>
#include <svx/fontwork.hxx>
#include <svx/fontworkbar.hxx>
-#include <svx/fontworkgallery.hxx>
#include <svx/formatpaintbrushctrl.hxx>
#include <svx/framelinkarray.hxx>
#include <svx/gallery.hxx>
diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx
index e920cc5..3f5e983 100644
--- a/sc/source/ui/app/scdll.cxx
+++ b/sc/source/ui/app/scdll.cxx
@@ -33,7 +33,6 @@
#include <avmedia/mediaplayer.hxx>
#include <avmedia/mediatoolbox.hxx>
#include <comphelper/types.hxx>
-#include <svx/fontworkgallery.hxx>
#include <svx/ParaLineSpacingPopup.hxx>
#include <svtools/parhtml.hxx>
@@ -217,7 +216,6 @@ void ScDLL::Init()
// CustomShape extrusion controller
SvxColorToolBoxControl::RegisterControl( SID_EXTRUSION_3D_COLOR, pMod );
- svx::FontWorkShapeTypeControl::RegisterControl( SID_FONTWORK_SHAPE_TYPE, pMod );
// Child Windows
diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx
index 0f87ab5..0bf4d96 100644
--- a/sd/inc/pch/precompiled_sd.hxx
+++ b/sd/inc/pch/precompiled_sd.hxx
@@ -648,7 +648,6 @@
#include <svx/fntszctl.hxx>
#include <svx/fontwork.hxx>
#include <svx/fontworkbar.hxx>
-#include <svx/fontworkgallery.hxx>
#include <svx/formatpaintbrushctrl.hxx>
#include <svx/gallery.hxx>
#include <svx/galleryitem.hxx>
diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx
index 70c9178..0a499e8 100644
--- a/sd/source/ui/app/sddll.cxx
+++ b/sd/source/ui/app/sddll.cxx
@@ -69,7 +69,6 @@
#include <svx/fntctl.hxx>
#include <svx/fntszctl.hxx>
#include <svx/fontwork.hxx>
-#include <svx/fontworkgallery.hxx>
#include <svx/formatpaintbrushctrl.hxx>
#include <svx/ParaLineSpacingPopup.hxx>
#include <svx/grafctrl.hxx>
@@ -250,7 +249,6 @@ void SdDLL::RegisterControllers()
SvxClipBoardControl::RegisterControl( SID_PASTE_UNFORMATTED, pMod );
SvxColorToolBoxControl::RegisterControl( SID_EXTRUSION_3D_COLOR, pMod );
- svx::FontWorkShapeTypeControl::RegisterControl( SID_FONTWORK_SHAPE_TYPE, pMod );
svx::ParaLineSpacingPopup::RegisterControl(SID_ATTR_PARA_LINESPACE, pMod);
::avmedia::MediaToolBoxControl::RegisterControl( SID_AVMEDIA_TOOLBOX, pMod );
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index bae32a4..191c9a8 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -260,36 +260,6 @@ IMPL_LINK_NOARG(FontWorkGalleryDialog, DoubleClickFavoriteHdl)
-SFX_IMPL_TOOLBOX_CONTROL( FontWorkShapeTypeControl, SfxStringItem );
-FontWorkShapeTypeControl::FontWorkShapeTypeControl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx )
-: SfxToolBoxControl( nSlotId, nId, rTbx )
-{
- rTbx.SetItemBits( nId, ToolBoxItemBits::DROPDOWNONLY | rTbx.GetItemBits( nId ) );
- rTbx.Invalidate();
-}
-
-
-
-FontWorkShapeTypeControl::~FontWorkShapeTypeControl()
-{
-}
-
-
-
-VclPtr<SfxPopupWindow> FontWorkShapeTypeControl::CreatePopupWindow()
-{
- OUString aSubTbxResName( "private:resource/toolbar/fontworkshapetype" );
- createAndPositionSubToolBar( aSubTbxResName );
- return NULL;
-}
-
-
-
-void FontWorkShapeTypeControl::Select(sal_uInt16 /*nSelectModifier*/)
-{
-
-}
-
class FontworkAlignmentWindow : public ToolbarMenu
{
public:
diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx
index 7d01854..ec9a758 100644
--- a/sw/source/uibase/app/swmodule.cxx
+++ b/sw/source/uibase/app/swmodule.cxx
@@ -50,7 +50,6 @@
#include <svx/imapdlg.hxx>
#include <svx/srchdlg.hxx>
#include <svx/hyperdlg.hxx>
-#include <svx/fontworkgallery.hxx>
#include <svx/modctrl.hxx>
#include <com/sun/star/scanner/ScannerManager.hpp>
#include <com/sun/star/container/XSet.hpp>
@@ -294,7 +293,6 @@ void SwDLL::RegisterControls()
svx::ParaLineSpacingPopup::RegisterControl(SID_ATTR_PARA_LINESPACE, pMod);
SvxColorToolBoxControl::RegisterControl( SID_EXTRUSION_3D_COLOR, pMod );
- svx::FontWorkShapeTypeControl::RegisterControl( SID_FONTWORK_SHAPE_TYPE, pMod );
SfxSaveAsToolBoxControl::RegisterControl(SID_SAVEASDOC, pMod );
SvxClipBoardControl::RegisterControl(SID_PASTE, pMod );
commit f18ca153aac53408284062309db513ab73f7dd2c
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Jul 16 22:30:34 2015 +0200
oox: fix invalid mime type "image/tif"
(regression from ccfc02f7691848284403d339ee17054169fbff1d)
Change-Id: I29a366228bf08f29edfa4a8e963889e34aa3d2ea
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index df535f8..b5ef21f 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -849,7 +849,7 @@ OUString DrawingML::WriteImage( const Graphic& rGraphic , bool bRelPathToMedia )
pExtension = ".png";
break;
case GFX_LINK_TYPE_NATIVE_TIF:
- sMediaType = "image/tif";
+ sMediaType = "image/tiff";
pExtension = ".tif";
break;
case GFX_LINK_TYPE_NATIVE_WMF:
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index 3df813e..0d45a49 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -209,7 +209,7 @@ DECLARE_OOXMLEXPORT_TEST(testContentTypeTIF, "fdo77476.docx")
if (!pXmlDoc)
return;
- assertXPath(pXmlDoc, "/ContentType:Types/ContentType:Override[@ContentType='image/tif']", "PartName", "/word/media/image1.tif");
+ assertXPath(pXmlDoc, "/ContentType:Types/ContentType:Override[@ContentType='image/tiff']", "PartName", "/word/media/image1.tif");
}
DECLARE_OOXMLEXPORT_TEST(testFDO77117, "fdo77117.docx")
commit f8958ab9ab8e0a3643fe50d6d756e5997b614336
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Jul 16 22:27:50 2015 +0200
removed by someone
Change-Id: I1c63248f18440b902088f27a9614db8ffb87150c
diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
index 2dadc78..8325ee4 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
@@ -408,6 +408,10 @@ void ChartElementsPanel::updateData()
mpLBLegendPosition->SelectEntryPos(getLegendPos(mxModel));
}
+void ChartElementsPanel::modelInvalid()
+{
+}
+
VclPtr<vcl::Window> ChartElementsPanel::Create (
vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
commit 857bc3094eafaaf69c607222ec9f90e84da07916
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Jul 16 22:12:03 2015 +0200
handle error bars in series panel
Change-Id: I29558530f775d1fab3dd2fca2e6c03c4717af769
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index c6f1a9b..b318f59 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -22,6 +22,7 @@
#include <sfx2/sidebar/ControlFactory.hxx>
#include <com/sun/star/chart2/DataPointLabel.hpp>
+#include <com/sun/star/chart/ErrorBarStyle.hpp>
#include "ChartSeriesPanel.hxx"
#include "ChartController.hxx"
@@ -39,6 +40,7 @@
#include "ChartModel.hxx"
#include "DataSeriesHelper.hxx"
#include "RegressionCurveHelper.hxx"
+#include "StatisticsHelper.hxx"
using namespace css;
using namespace css::uno;
@@ -109,6 +111,39 @@ void setTrendlineVisible(css::uno::Reference<css::frame::XModel>
}
+bool isErrorBarVisible(css::uno::Reference<css::frame::XModel>
+ xModel, const OUString& rCID, bool bYError)
+{
+ css::uno::Reference< css::chart2::XDataSeries > xSeries(
+ ObjectIdentifier::getDataSeriesForCID(rCID, xModel), uno::UNO_QUERY );
+
+ if (!xSeries.is())
+ return false;
+
+ return StatisticsHelper::hasErrorBars(xSeries, bYError);
+}
+
+void setErrorBarVisible(css::uno::Reference<css::frame::XModel>
+ xModel, const OUString& rCID, bool bYError, bool bVisible)
+{
+ css::uno::Reference< css::chart2::XDataSeries > xSeries(
+ ObjectIdentifier::getDataSeriesForCID(rCID, xModel), uno::UNO_QUERY );
+
+ if (!xSeries.is())
+ return;
+
+ if (bVisible)
+ {
+ StatisticsHelper::addErrorBars( xSeries, comphelper::getProcessComponentContext(),
+ css::chart::ErrorBarStyle::STANDARD_DEVIATION,
+ bYError);
+ }
+ else
+ {
+ StatisticsHelper::removeErrorBars( xSeries, bYError );
+ }
+}
+
}
ChartSeriesPanel::ChartSeriesPanel(
@@ -181,6 +216,8 @@ void ChartSeriesPanel::updateData()
SolarMutexGuard aGuard;
mpCBLabel->Check(isDataLabelVisible(mxModel, aCID));
mpCBTrendline->Check(isTrendlineVisible(mxModel, aCID));
+ mpCBXError->Check(isErrorBarVisible(mxModel, aCID, false));
+ mpCBYError->Check(isErrorBarVisible(mxModel, aCID, true));
}
VclPtr<vcl::Window> ChartSeriesPanel::Create (
@@ -245,6 +282,10 @@ IMPL_LINK(ChartSeriesPanel, CheckBoxHdl, CheckBox*, pCheckBox)
setDataLabelVisible(mxModel, aCID, bChecked);
else if (pCheckBox == mpCBTrendline.get())
setTrendlineVisible(mxModel, aCID, bChecked);
+ else if (pCheckBox == mpCBXError.get())
+ setErrorBarVisible(mxModel, aCID, false, bChecked);
+ else if (pCheckBox == mpCBYError.get())
+ setErrorBarVisible(mxModel, aCID, true, bChecked);
return 0;
}
commit c3ad5c110a83e25e9ff00e56d612075755136e3e
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Jul 16 22:02:30 2015 +0200
always update the data when we change selection
Change-Id: Iae62f84401c23415a05fa2c5d1a541b239252aea
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index 054f338..c6f1a9b 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -208,12 +208,6 @@ void ChartSeriesPanel::DataChanged(
void ChartSeriesPanel::HandleContextChange(
const ::sfx2::sidebar::EnumContext& rContext)
{
- if(maContext == rContext)
- {
- // Nothing to do.
- return;
- }
-
maContext = rContext;
updateData();
}
commit 4038d2eb47f03e981a61c7de37c2b15da532f9fc
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Jul 16 22:01:57 2015 +0200
dispose child elements
Change-Id: Ic74e2bb8bf84c7de19ca31b2c7195b96e0eaa230
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index e93fd06..054f338 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -141,6 +141,11 @@ void ChartSeriesPanel::dispose()
css::uno::Reference<css::util::XModifyBroadcaster> xBroadcaster(mxModel, css::uno::UNO_QUERY_THROW);
xBroadcaster->removeModifyListener(mxListener);
+ mpCBLabel.clear();
+ mpCBTrendline.clear();
+ mpCBXError.clear();
+ mpCBYError.clear();
+
PanelLayout::dispose();
}
commit cdddbb70830d399de9bb388f45aeab34210338da
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Jul 16 22:00:26 2015 +0200
let the series panel also listen to chart changes
Change-Id: I875398d1b020c821319c9c8d9f9b183d49a5004a
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index 598c1d1..e93fd06 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -120,7 +120,8 @@ ChartSeriesPanel::ChartSeriesPanel(
mxFrame(rxFrame),
maContext(),
mpBindings(pBindings),
- mxModel(pController->getModel())
+ mxModel(pController->getModel()),
+ mxListener(new ChartSidebarModifyListener(this))
{
get(mpCBLabel, "checkbutton_label");
get(mpCBTrendline, "checkbutton_trendline");
@@ -137,12 +138,17 @@ ChartSeriesPanel::~ChartSeriesPanel()
void ChartSeriesPanel::dispose()
{
+ css::uno::Reference<css::util::XModifyBroadcaster> xBroadcaster(mxModel, css::uno::UNO_QUERY_THROW);
+ xBroadcaster->removeModifyListener(mxListener);
PanelLayout::dispose();
}
void ChartSeriesPanel::Initialize()
{
+ css::uno::Reference<css::util::XModifyBroadcaster> xBroadcaster(mxModel, css::uno::UNO_QUERY_THROW);
+ xBroadcaster->addModifyListener(mxListener);
+
updateData();
Link<> aLink = LINK(this, ChartSeriesPanel, CheckBoxHdl);
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
index f38aa9e..7594e28 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
@@ -23,6 +23,8 @@
#include <sfx2/sidebar/IContextChangeReceiver.hxx>
#include <svx/sidebar/PanelLayout.hxx>
+#include "ChartSidebarModifyListener.hxx"
+
#include <com/sun/star/util/XModifyListener.hpp>
class FixedText;
@@ -37,7 +39,8 @@ namespace sidebar {
class ChartSeriesPanel : public PanelLayout,
public ::sfx2::sidebar::IContextChangeReceiver,
- public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
+ public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface,
+ public ChartSidebarModifyListenerParent
{
public:
static VclPtr<vcl::Window> Create(
@@ -67,8 +70,8 @@ public:
virtual ~ChartSeriesPanel();
virtual void dispose() SAL_OVERRIDE;
- void updateData();
- void modelInvalid();
+ virtual void updateData() SAL_OVERRIDE;
+ virtual void modelInvalid() SAL_OVERRIDE;
private:
//ui controls
commit 0ae9523012269ee2d093f35ecbf58da1d7f13f53
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Jul 16 21:29:20 2015 +0200
extract the modify listener
Change-Id: Ie191e47b009afc5e3d4655d9b83189540e280dca
diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk
index facaf66..f2d4b28 100644
--- a/chart2/Library_chartcontroller.mk
+++ b/chart2/Library_chartcontroller.mk
@@ -190,6 +190,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\
chart2/source/controller/sidebar/Chart2PanelFactory \
chart2/source/controller/sidebar/ChartElementsPanel \
chart2/source/controller/sidebar/ChartSeriesPanel \
+ chart2/source/controller/sidebar/ChartSidebarModifyListener \
))
# Runtime dependency for unit-tests
diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.cxx b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
index 42f88db..2dadc78 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.cxx
@@ -44,6 +44,7 @@
#include "ChartModel.hxx"
+
using namespace css;
using namespace css::uno;
using ::sfx2::sidebar::Theme;
@@ -69,42 +70,6 @@ enum class AxisType
Y_SECOND
};
-class ChartSidebarModifyListener : public cppu::WeakImplHelper1<css::util::XModifyListener>
-{
-public:
-
- ChartSidebarModifyListener(ChartElementsPanel* pParent);
- virtual ~ChartSidebarModifyListener();
-
- virtual void SAL_CALL modified(const css::lang::EventObject& rEvent)
- throw (::css::uno::RuntimeException, ::std::exception) SAL_OVERRIDE;
-
- virtual void SAL_CALL disposing(const css::lang::EventObject& rEvent)
- throw (::css::uno::RuntimeException, ::std::exception) SAL_OVERRIDE;
-
-private:
- VclPtr<ChartElementsPanel> mpParent;
-};
-
-ChartSidebarModifyListener::ChartSidebarModifyListener(ChartElementsPanel* pParent):
- mpParent(pParent)
-{
-}
-
-ChartSidebarModifyListener::~ChartSidebarModifyListener()
-{
-}
-
-void ChartSidebarModifyListener::modified(const css::lang::EventObject& /*rEvent*/)
- throw (::css::uno::RuntimeException, ::std::exception)
-{
- mpParent->updateData();
-}
-
-void ChartSidebarModifyListener::disposing(const css::lang::EventObject& /*rEvent*/)
- throw (::css::uno::RuntimeException, ::std::exception)
-{}
-
ChartModel* getChartModel(css::uno::Reference<css::frame::XModel> xModel)
{
ChartModel* pModel = dynamic_cast<ChartModel*>(xModel.get());
diff --git a/chart2/source/controller/sidebar/ChartElementsPanel.hxx b/chart2/source/controller/sidebar/ChartElementsPanel.hxx
index 51e7e49..358a8be 100644
--- a/chart2/source/controller/sidebar/ChartElementsPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartElementsPanel.hxx
@@ -22,6 +22,7 @@
#include <sfx2/sidebar/ControllerItem.hxx>
#include <sfx2/sidebar/IContextChangeReceiver.hxx>
#include <svx/sidebar/PanelLayout.hxx>
+#include "ChartSidebarModifyListener.hxx"
#include <com/sun/star/util/XModifyListener.hpp>
@@ -37,7 +38,8 @@ namespace sidebar {
class ChartElementsPanel : public PanelLayout,
public ::sfx2::sidebar::IContextChangeReceiver,
- public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
+ public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface,
+ public ChartSidebarModifyListenerParent
{
public:
static VclPtr<vcl::Window> Create(
@@ -67,7 +69,8 @@ public:
virtual ~ChartElementsPanel();
virtual void dispose() SAL_OVERRIDE;
- void updateData();
+ virtual void updateData() SAL_OVERRIDE;
+ virtual void modelInvalid() SAL_OVERRIDE;
private:
//ui controls
diff --git a/chart2/source/controller/sidebar/ChartSidebarModifyListener.cxx b/chart2/source/controller/sidebar/ChartSidebarModifyListener.cxx
new file mode 100644
index 0000000..fdf2dc1
--- /dev/null
+++ b/chart2/source/controller/sidebar/ChartSidebarModifyListener.cxx
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "ChartSidebarModifyListener.hxx"
+
+namespace chart {
+namespace sidebar {
+
+ChartSidebarModifyListenerParent::~ChartSidebarModifyListenerParent()
+{
+}
+
+ChartSidebarModifyListener::ChartSidebarModifyListener(ChartSidebarModifyListenerParent* pParent):
+ mpParent(pParent)
+{
+}
+
+ChartSidebarModifyListener::~ChartSidebarModifyListener()
+{
+}
+
+void ChartSidebarModifyListener::modified(const css::lang::EventObject& /*rEvent*/)
+ throw (::css::uno::RuntimeException, ::std::exception)
+{
+ mpParent->updateData();
+}
+
+void ChartSidebarModifyListener::disposing(const css::lang::EventObject& /*rEvent*/)
+ throw (::css::uno::RuntimeException, ::std::exception)
+{
+ mpParent->modelInvalid();
+}
+
+} }
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/sidebar/ChartSidebarModifyListener.hxx b/chart2/source/controller/sidebar/ChartSidebarModifyListener.hxx
new file mode 100644
index 0000000..5db469e
--- /dev/null
+++ b/chart2/source/controller/sidebar/ChartSidebarModifyListener.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_SIDEBAR_CHARTSIDEBAR_MODIFYLISTENER_HXX
+#define INCLUDED_CHART2_SOURCE_CONTROLLER_SIDEBAR_CHARTSIDEBAR_MODIFYLISTENER_HXX
+
+#include <com/sun/star/util/XModifyListener.hpp>
+#include <cppuhelper/implbase1.hxx>
+
+namespace chart {
+namespace sidebar {
+
+class ChartSidebarModifyListenerParent
+{
+public:
+ virtual ~ChartSidebarModifyListenerParent();
+
+ virtual void updateData() = 0;
+
+ virtual void modelInvalid() = 0;
+};
+
+class ChartSidebarModifyListener : public cppu::WeakImplHelper1<css::util::XModifyListener>
+{
+public:
+
+ ChartSidebarModifyListener(ChartSidebarModifyListenerParent* pParent);
+ virtual ~ChartSidebarModifyListener();
+
+ virtual void SAL_CALL modified(const css::lang::EventObject& rEvent)
+ throw (::css::uno::RuntimeException, ::std::exception) SAL_OVERRIDE;
+
+ virtual void SAL_CALL disposing(const css::lang::EventObject& rEvent)
+ throw (::css::uno::RuntimeException, ::std::exception) SAL_OVERRIDE;
+
+private:
+ ChartSidebarModifyListenerParent* mpParent;
+};
+
+} }
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 329818a7a1e064675b7f840d8455c963d2a773b2
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Jul 16 21:15:31 2015 +0200
handle trendline checkbox in series panel
Change-Id: I4fc0634ed35c645d2080c667e8ffb90d606612a2
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index 1d21425..598c1d1 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -38,6 +38,7 @@
#include "ChartModel.hxx"
#include "DataSeriesHelper.hxx"
+#include "RegressionCurveHelper.hxx"
using namespace css;
using namespace css::uno;
@@ -72,6 +73,42 @@ void setDataLabelVisible(css::uno::Reference<css::frame::XModel> xModel, const O
DataSeriesHelper::deleteDataLabelsFromSeriesAndAllPoints(xSeries);
}
+bool isTrendlineVisible(css::uno::Reference<css::frame::XModel> xModel,
+ const OUString& rCID)
+{
+ css::uno::Reference< css::chart2::XRegressionCurveContainer > xRegressionCurveContainer(
+ ObjectIdentifier::getDataSeriesForCID(rCID, xModel), uno::UNO_QUERY );
+
+ if (!xRegressionCurveContainer.is())
+ return false;
+
+ return xRegressionCurveContainer->getRegressionCurves().getLength() != 0;
+}
+
+void setTrendlineVisible(css::uno::Reference<css::frame::XModel>
+ xModel, const OUString& rCID, bool bVisible)
+{
+ css::uno::Reference< css::chart2::XRegressionCurveContainer > xRegressionCurveContainer(
+ ObjectIdentifier::getDataSeriesForCID(rCID, xModel), uno::UNO_QUERY );
+
+ if (!xRegressionCurveContainer.is())
+ return;
+
+ if (bVisible)
+ {
+ /* code */
+ uno::Reference< chart2::XRegressionCurve > xCurve =
+ RegressionCurveHelper::addRegressionCurve(
+ CHREGRESS_LINEAR,
+ xRegressionCurveContainer,
+ comphelper::getProcessComponentContext());
+ }
+ else
+ RegressionCurveHelper::removeAllExceptMeanValueLine(
+ xRegressionCurveContainer );
+
+}
+
}
ChartSeriesPanel::ChartSeriesPanel(
@@ -132,6 +169,7 @@ void ChartSeriesPanel::updateData()
#endif
SolarMutexGuard aGuard;
mpCBLabel->Check(isDataLabelVisible(mxModel, aCID));
+ mpCBTrendline->Check(isTrendlineVisible(mxModel, aCID));
}
VclPtr<vcl::Window> ChartSeriesPanel::Create (
@@ -200,6 +238,8 @@ IMPL_LINK(ChartSeriesPanel, CheckBoxHdl, CheckBox*, pCheckBox)
#endif
if (pCheckBox == mpCBLabel.get())
setDataLabelVisible(mxModel, aCID, bChecked);
+ else if (pCheckBox == mpCBTrendline.get())
+ setTrendlineVisible(mxModel, aCID, bChecked);
return 0;
}
commit 71c6ee42d3311b31896e5a408d8f83f4e5d7726e
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Jul 16 20:17:37 2015 +0200
first parts in data series panel
Change-Id: Ia25460e6f57ff6d3c44bae1ddb33a36845ffcdd2
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
index 732aefc..1d21425 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -21,6 +21,8 @@
#include <sfx2/sidebar/Theme.hxx>
#include <sfx2/sidebar/ControlFactory.hxx>
+#include <com/sun/star/chart2/DataPointLabel.hpp>
+
#include "ChartSeriesPanel.hxx"
#include "ChartController.hxx"
#include <sfx2/bindings.hxx>
@@ -35,6 +37,7 @@
#include <comphelper/processfactory.hxx>
#include "ChartModel.hxx"
+#include "DataSeriesHelper.hxx"
using namespace css;
using namespace css::uno;
@@ -42,6 +45,35 @@ using ::sfx2::sidebar::Theme;
namespace chart { namespace sidebar {
+namespace {
+
+bool isDataLabelVisible(css::uno::Reference<css::frame::XModel> xModel, const OUString& rCID)
+{
+ css::uno::Reference< css::chart2::XDataSeries > xSeries(
+ ObjectIdentifier::getDataSeriesForCID(rCID, xModel), uno::UNO_QUERY );
+
+ if (!xSeries.is())
+ return false;
+
+ return DataSeriesHelper::hasDataLabelsAtSeries(xSeries);
+}
+
+void setDataLabelVisible(css::uno::Reference<css::frame::XModel> xModel, const OUString& rCID, bool bVisible)
+{
+ css::uno::Reference< css::chart2::XDataSeries > xSeries(
+ ObjectIdentifier::getDataSeriesForCID(rCID, xModel), uno::UNO_QUERY );
+
+ if (!xSeries.is())
+ return;
+
+ if (bVisible)
+ DataSeriesHelper::insertDataLabelsToSeriesAndAllPoints(xSeries);
+ else
+ DataSeriesHelper::deleteDataLabelsFromSeriesAndAllPoints(xSeries);
+}
+
+}
+
ChartSeriesPanel::ChartSeriesPanel(
vcl::Window* pParent,
const css::uno::Reference<css::frame::XFrame>& rxFrame,
@@ -53,6 +85,11 @@ ChartSeriesPanel::ChartSeriesPanel(
mpBindings(pBindings),
mxModel(pController->getModel())
{
+ get(mpCBLabel, "checkbutton_label");
+ get(mpCBTrendline, "checkbutton_trendline");
+ get(mpCBXError, "checkbutton_x_error");
+ get(mpCBYError, "checkbutton_y_error");
+
Initialize();
}
@@ -69,11 +106,32 @@ void ChartSeriesPanel::dispose()
void ChartSeriesPanel::Initialize()
{
+ updateData();
+
+ Link<> aLink = LINK(this, ChartSeriesPanel, CheckBoxHdl);
+ mpCBLabel->SetClickHdl(aLink);
+ mpCBTrendline->SetClickHdl(aLink);
+ mpCBXError->SetClickHdl(aLink);
+ mpCBYError->SetClickHdl(aLink);
}
void ChartSeriesPanel::updateData()
{
+ css::uno::Reference<css::frame::XController> xController(mxModel->getCurrentController());
+ css::uno::Reference<css::view::XSelectionSupplier> xSelectionSupplier(xController, css::uno::UNO_QUERY);
+ if (!xSelectionSupplier.is())
+ return;
+
+ uno::Any aAny = xSelectionSupplier->getSelection();
+ assert(aAny.hasValue());
+ OUString aCID;
+ aAny >>= aCID;
+#ifdef DBG_UTIL
+ ObjectType eType = ObjectIdentifier::getObjectType(aCID);
+ assert(eType == OBJECTTYPE_DATA_SERIES);
+#endif
SolarMutexGuard aGuard;
+ mpCBLabel->Check(isDataLabelVisible(mxModel, aCID));
}
VclPtr<vcl::Window> ChartSeriesPanel::Create (
@@ -124,6 +182,28 @@ void ChartSeriesPanel::modelInvalid()
}
+IMPL_LINK(ChartSeriesPanel, CheckBoxHdl, CheckBox*, pCheckBox)
+{
+ bool bChecked = pCheckBox->IsChecked();
+ css::uno::Reference<css::frame::XController> xController(mxModel->getCurrentController());
+ css::uno::Reference<css::view::XSelectionSupplier> xSelectionSupplier(xController, css::uno::UNO_QUERY);
+ if (!xSelectionSupplier.is())
+ return 0;
+
+ uno::Any aAny = xSelectionSupplier->getSelection();
+ assert(aAny.hasValue());
+ OUString aCID;
+ aAny >>= aCID;
+#ifdef DBG_UTIL
+ ObjectType eType = ObjectIdentifier::getObjectType(aCID);
+ assert(eType == OBJECTTYPE_DATA_SERIES);
+#endif
+ if (pCheckBox == mpCBLabel.get())
+ setDataLabelVisible(mxModel, aCID, bChecked);
+
+ return 0;
+}
+
}} // end of namespace ::chart::sidebar
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
index 6fa61e3..f38aa9e 100644
--- a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
@@ -72,6 +72,10 @@ public:
private:
//ui controls
+ VclPtr<CheckBox> mpCBLabel;
+ VclPtr<CheckBox> mpCBTrendline;
+ VclPtr<CheckBox> mpCBXError;
+ VclPtr<CheckBox> mpCBYError;
css::uno::Reference<css::frame::XFrame> mxFrame;
::sfx2::sidebar::EnumContext maContext;
@@ -81,6 +85,8 @@ private:
css::uno::Reference<css::util::XModifyListener> mxListener;
void Initialize();
+
+ DECL_LINK(CheckBoxHdl, CheckBox*);
};
} } // end of namespace ::chart::sidebar
commit 75d50b7189bf9fb37d3024fa5765dfb22ca6fce6
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Jul 16 18:44:23 2015 +0200
generate correct sidebar context strings for charts
Change-Id: I92adf79c461f3536475da318e03b60f2e1adc08f
diff --git a/chart2/source/controller/inc/ChartController.hxx b/chart2/source/controller/inc/ChartController.hxx
index e15f8c6..00d297b 100644
--- a/chart2/source/controller/inc/ChartController.hxx
+++ b/chart2/source/controller/inc/ChartController.hxx
@@ -153,7 +153,7 @@ public:
::com::sun::star::uno::XComponentContext > const & xContext);
virtual ~ChartController();
- static OUString GetContextName();
+ OUString GetContextName();
// ::com::sun::star::lang::XServiceInfo
virtual OUString SAL_CALL getImplementationName()
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index a7a92f1..056e721 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -73,6 +73,8 @@
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <boost/bind.hpp>
+
// this is needed to properly destroy the unique_ptr to the AcceleratorExecute
// object in the DTOR
#include <svtools/acceleratorexecute.hxx>
@@ -114,8 +116,8 @@ ChartController::ChartController(uno::Reference<uno::XComponentContext> const &
m_aDispatchContainer( m_xCC, this ),
m_eDrawMode( CHARTDRAW_SELECT ),
mpSelectionChangeHandler(new svx::sidebar::SelectionChangeHandler(
- &ChartController::GetContextName, this,
- sfx2::sidebar::EnumContext::Context_Cell))
+ ::boost::bind(&ChartController::GetContextName, this),
+ this, sfx2::sidebar::EnumContext::Context_Cell))
{
m_aDoubleClickTimer.SetTimeoutHdl( LINK( this, ChartController, DoubleClickWaitingHdl ) );
}
@@ -296,6 +298,30 @@ bool ChartController::TheModelRef::is() const
OUString ChartController::GetContextName()
{
+ uno::Any aAny = getSelection();
+ if (!aAny.hasValue())
+ return OUString("Chart");
+
+ OUString aCID;
+ aAny >>= aCID;
+
+ if (aCID.isEmpty())
+ return OUString("Chart");
+
+ ObjectType eObjectID = ObjectIdentifier::getObjectType(aCID);
+ switch (eObjectID)
+ {
+ case OBJECTTYPE_DATA_SERIES:
+ return OUString("Series");
+ break;
+ case OBJECTTYPE_DATA_ERRORS_X:
+ case OBJECTTYPE_DATA_ERRORS_Y:
+ case OBJECTTYPE_DATA_ERRORS_Z:
+ return OUString("ErrorBar");
+ default:
+ break;
+ }
+
return OUString("Chart");
}
commit d4d56067b7e0d654701912a3fd54cf2b452a8d28
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Jul 16 18:44:01 2015 +0200
add skeleton for chart series panel
Change-Id: Ib1e5da270812aa909a6e773abbd9716256f4d5f4
diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk
index 1b2b46d..facaf66 100644
--- a/chart2/Library_chartcontroller.mk
+++ b/chart2/Library_chartcontroller.mk
@@ -189,6 +189,7 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\
chart2/source/controller/main/UndoGuard \
chart2/source/controller/sidebar/Chart2PanelFactory \
chart2/source/controller/sidebar/ChartElementsPanel \
+ chart2/source/controller/sidebar/ChartSeriesPanel \
))
# Runtime dependency for unit-tests
diff --git a/chart2/UIConfig_chart2.mk b/chart2/UIConfig_chart2.mk
index ab8ce34..d2e8408 100644
--- a/chart2/UIConfig_chart2.mk
+++ b/chart2/UIConfig_chart2.mk
@@ -43,6 +43,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\
chart2/uiconfig/ui/inserttitledlg \
chart2/uiconfig/ui/paradialog \
chart2/uiconfig/ui/sidebarelements \
+ chart2/uiconfig/ui/sidebarseries \
chart2/uiconfig/ui/smoothlinesdlg \
chart2/uiconfig/ui/steppedlinesdlg \
chart2/uiconfig/ui/titlerotationtabpage \
diff --git a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
index 29ea916..61e1677 100644
--- a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
+++ b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
@@ -30,6 +30,7 @@
#include <cppuhelper/supportsservice.hxx>
#include "ChartElementsPanel.hxx"
+#include "ChartSeriesPanel.hxx"
#include "ChartController.hxx"
using namespace css::uno;
@@ -93,6 +94,8 @@ Reference<css::ui::XUIElement> SAL_CALL ChartPanelFactory::createUIElement (
VclPtr<vcl::Window> pPanel;
if (rsResourceURL.endsWith("/ElementsPanel"))
pPanel = ChartElementsPanel::Create( pParentWindow, xFrame, pBindings, pController );
+ else if (rsResourceURL.endsWith("/SeriesPanel"))
+ pPanel = ChartSeriesPanel::Create(pParentWindow, xFrame, pBindings, pController);
/*
else if (rsResourceURL.endsWith("/CellAppearancePropertyPanel"))
pPanel = CellAppearancePropertyPanel::Create( pParentWindow, xFrame, pBindings );
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.cxx b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
new file mode 100644
index 0000000..732aefc
--- /dev/null
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.cxx
@@ -0,0 +1,129 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <sfx2/sidebar/ResourceDefinitions.hrc>
+#include <sfx2/sidebar/Theme.hxx>
+#include <sfx2/sidebar/ControlFactory.hxx>
+
+#include "ChartSeriesPanel.hxx"
+#include "ChartController.hxx"
+#include <sfx2/bindings.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/imagemgr.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/lstbox.hxx>
+#include <vcl/field.hxx>
+#include <vcl/toolbox.hxx>
+#include <svl/intitem.hxx>
+#include <svl/stritem.hxx>
+#include <comphelper/processfactory.hxx>
+
+#include "ChartModel.hxx"
+
+using namespace css;
+using namespace css::uno;
+using ::sfx2::sidebar::Theme;
+
+namespace chart { namespace sidebar {
+
+ChartSeriesPanel::ChartSeriesPanel(
+ vcl::Window* pParent,
+ const css::uno::Reference<css::frame::XFrame>& rxFrame,
+ SfxBindings* pBindings,
+ ChartController* pController)
+ : PanelLayout(pParent, "ChartSeriesPanel", "modules/schart/ui/sidebarseries.ui", rxFrame),
+ mxFrame(rxFrame),
+ maContext(),
+ mpBindings(pBindings),
+ mxModel(pController->getModel())
+{
+ Initialize();
+}
+
+ChartSeriesPanel::~ChartSeriesPanel()
+{
+ disposeOnce();
+}
+
+void ChartSeriesPanel::dispose()
+{
+
+ PanelLayout::dispose();
+}
+
+void ChartSeriesPanel::Initialize()
+{
+}
+
+void ChartSeriesPanel::updateData()
+{
+ SolarMutexGuard aGuard;
+}
+
+VclPtr<vcl::Window> ChartSeriesPanel::Create (
+ vcl::Window* pParent,
+ const css::uno::Reference<css::frame::XFrame>& rxFrame,
+ SfxBindings* pBindings, ChartController* pController)
+{
+ if (pParent == NULL)
+ throw lang::IllegalArgumentException("no parent Window given to ChartSeriesPanel::Create", NULL, 0);
+ if ( ! rxFrame.is())
+ throw lang::IllegalArgumentException("no XFrame given to ChartSeriesPanel::Create", NULL, 1);
+ if (pBindings == NULL)
+ throw lang::IllegalArgumentException("no SfxBindings given to ChartSeriesPanel::Create", NULL, 2);
+
+ return VclPtr<ChartSeriesPanel>::Create(
+ pParent, rxFrame, pBindings, pController);
+}
+
+void ChartSeriesPanel::DataChanged(
+ const DataChangedEvent& )
+{
+ updateData();
+}
+
+void ChartSeriesPanel::HandleContextChange(
+ const ::sfx2::sidebar::EnumContext& rContext)
+{
+ if(maContext == rContext)
+ {
+ // Nothing to do.
+ return;
+ }
+
+ maContext = rContext;
+ updateData();
+}
+
+void ChartSeriesPanel::NotifyItemUpdate(
+ sal_uInt16 /*nSID*/,
+ SfxItemState /*eState*/,
+ const SfxPoolItem* /*pState*/,
+ const bool )
+{
+}
+
+void ChartSeriesPanel::modelInvalid()
+{
+
+}
+
+}} // end of namespace ::chart::sidebar
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/sidebar/ChartSeriesPanel.hxx b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
new file mode 100644
index 0000000..6fa61e3
--- /dev/null
+++ b/chart2/source/controller/sidebar/ChartSeriesPanel.hxx
@@ -0,0 +1,90 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_SIDEBAR_CHARTSERIESPANEL_HXX
+#define INCLUDED_CHART2_SOURCE_CONTROLLER_SIDEBAR_CHARTSERIESPANEL_HXX
+
+#include <sfx2/sidebar/ControllerItem.hxx>
+#include <sfx2/sidebar/IContextChangeReceiver.hxx>
+#include <svx/sidebar/PanelLayout.hxx>
+
+#include <com/sun/star/util/XModifyListener.hpp>
+
+class FixedText;
+class ListBox;
+class NumericField;
+
+namespace chart {
+
+class ChartController;
+
+namespace sidebar {
+
+class ChartSeriesPanel : public PanelLayout,
+ public ::sfx2::sidebar::IContextChangeReceiver,
+ public ::sfx2::sidebar::ControllerItem::ItemUpdateReceiverInterface
+{
+public:
+ static VclPtr<vcl::Window> Create(
+ vcl::Window* pParent,
+ const css::uno::Reference<css::frame::XFrame>& rxFrame,
+ SfxBindings* pBindings, ChartController* pController);
+
+ virtual void DataChanged(
+ const DataChangedEvent& rEvent) SAL_OVERRIDE;
+
+ virtual void HandleContextChange(
+ const ::sfx2::sidebar::EnumContext& rContext) SAL_OVERRIDE;
+
+ virtual void NotifyItemUpdate(
+ const sal_uInt16 nSId,
+ const SfxItemState eState,
+ const SfxPoolItem* pState,
+ const bool bIsEnabled) SAL_OVERRIDE;
+
+ SfxBindings* GetBindings() { return mpBindings;}
+
+ // constructor/destuctor
+ ChartSeriesPanel(
+ vcl::Window* pParent,
+ const css::uno::Reference<css::frame::XFrame>& rxFrame,
+ SfxBindings* pBindings, ChartController* pController);
+ virtual ~ChartSeriesPanel();
+ virtual void dispose() SAL_OVERRIDE;
+
+ void updateData();
+ void modelInvalid();
+
+private:
+ //ui controls
+
+ css::uno::Reference<css::frame::XFrame> mxFrame;
+ ::sfx2::sidebar::EnumContext maContext;
+ SfxBindings* mpBindings;
+
+ css::uno::Reference<css::frame::XModel> mxModel;
+ css::uno::Reference<css::util::XModifyListener> mxListener;
+
+ void Initialize();
+};
+
+} } // end of namespace ::chart::sidebar
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/uiconfig/ui/sidebarseries.ui b/chart2/uiconfig/ui/sidebarseries.ui
new file mode 100644
index 0000000..afcc7a9
--- /dev/null
+++ b/chart2/uiconfig/ui/sidebarseries.ui
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.18.3 -->
+<interface>
+ <requires lib="gtk+" version="3.12"/>
+ <object class="GtkGrid" id="DataSeriesPanel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="label_series_name">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">label</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_label">
+ <property name="label" translatable="yes">Show data label</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_trendline">
+ <property name="label" translatable="yes">Trendline</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Axis:</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="radiobutton_primary_axis">
+ <property name="label" translatable="yes">Primary Y-Axis</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="radiobutton_secondary_axis">
+ <property name="label" translatable="yes">Secondary Y-Axis</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.49000000953674316</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">radiobutton_primary_axis</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_y_error">
+ <property name="label" translatable="yes">Y Error Bars</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="checkbutton_x_error">
+ <property name="label" translatable="yes">X Error Bars</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">5</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="comboboxtext_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <items>
+ <item translatable="yes">Above</item>
+ <item translatable="yes">Below</item>
+ <item translatable="yes">Center</item>
+ <item translatable="yes">Outside</item>
+ <item translatable="yes">Inside</item>
+ <item translatable="yes">Near origin</item>
+ </items>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ </object>
+</interface>
commit 5d6d11a6d21e81feb0ba3422a3a3cad9d96ec3b6
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Thu Jul 16 18:42:55 2015 +0200
add more chart sidebar contexts
Change-Id: Icce69a0f5662ba06a3b57da089889aac5028de30
diff --git a/include/sfx2/sidebar/EnumContext.hxx b/include/sfx2/sidebar/EnumContext.hxx
index b77c977..785e6eff 100644
--- a/include/sfx2/sidebar/EnumContext.hxx
+++ b/include/sfx2/sidebar/EnumContext.hxx
@@ -74,6 +74,7 @@ public:
Context_DrawPage,
Context_DrawText,
Context_EditCell,
+ Context_ErrorBar,
Context_Form,
Context_Frame,
Context_Graphic,
@@ -85,10 +86,12 @@ public:
Context_OLE,
Context_OutlineText,
Context_Pivot,
+ Context_Series,
Context_SlidesorterPage,
Context_Table,
Context_Text,
Context_TextObject,
+ Context_Trendline,
// Default context of an application. Do we need this?
Context_Default,
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
index a6ce71c..da8c01f 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu
@@ -1162,69 +1162,69 @@
</prop>
</node>
- <node oor:name="ChartAreaPanel" oor:op="replace">
+ <node oor:name="ChartSeriesPanel" oor:op="replace">
<prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Area</value>
+ <value xml:lang="en-US">Data Series</value>
</prop>
<prop oor:name="Id" oor:type="xs:string">
- <value>ChartAreaPanel</value>
+ <value>SeriesPanel</value>
</prop>
<prop oor:name="DeckId" oor:type="xs:string">
<value>ChartDeck</value>
</prop>
<prop oor:name="ContextList">
<value oor:separator=";">
- Chart, any, visible ;
+ Chart, Series, visible ;
</value>
</prop>
<prop oor:name="ImplementationURL" oor:type="xs:string">
- <value>private:resource/toolpanel/ChartPanelFactory/AreaPanel</value>
+ <value>private:resource/toolpanel/ChartPanelFactory/SeriesPanel</value>
</prop>
<prop oor:name="OrderIndex" oor:type="xs:int">
<value>2</value>
</prop>
</node>
- <node oor:name="ChartLinePanel" oor:op="replace">
+ <node oor:name="ChartTrendlinePanel" oor:op="replace">
<prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Line</value>
+ <value xml:lang="en-US">Trnedline</value>
</prop>
<prop oor:name="Id" oor:type="xs:string">
- <value>ChartLinePanel</value>
+ <value>ChartTrendlinePanel</value>
</prop>
<prop oor:name="DeckId" oor:type="xs:string">
<value>ChartDeck</value>
</prop>
<prop oor:name="ContextList">
<value oor:separator=";">
- Chart, any, visible ;
+ Chart, Trendline, visible ;
</value>
</prop>
<prop oor:name="ImplementationURL" oor:type="xs:string">
- <value>private:resource/toolpanel/ChartPanelFactory/LinePanel</value>
+ <value>private:resource/toolpanel/ChartPanelFactory/TrendlinePanel</value>
</prop>
<prop oor:name="OrderIndex" oor:type="xs:int">
<value>3</value>
</prop>
</node>
- <node oor:name="ChartCharacterPanel" oor:op="replace">
+ <node oor:name="ChartErrorBarPanel" oor:op="replace">
<prop oor:name="Title" oor:type="xs:string">
- <value xml:lang="en-US">Character</value>
+ <value xml:lang="en-US">Error Bar</value>
</prop>
<prop oor:name="Id" oor:type="xs:string">
- <value>ChartCharacterPanel</value>
+ <value>ChartErrorBarPanel</value>
</prop>
<prop oor:name="DeckId" oor:type="xs:string">
<value>ChartDeck</value>
</prop>
<prop oor:name="ContextList">
<value oor:separator=";">
- Chart, any, visible ;
+ Chart, ErrorBar, visible ;
</value>
</prop>
<prop oor:name="ImplementationURL" oor:type="xs:string">
- <value>private:resource/toolpanel/ChartPanelFactory/CharacterPanel</value>
+ <value>private:resource/toolpanel/ChartPanelFactory/ErrorBarPanel</value>
</prop>
<prop oor:name="OrderIndex" oor:type="xs:int">
<value>4</value>
@@ -1243,7 +1243,7 @@
</prop>
<prop oor:name="ContextList">
<value oor:separator=";">
- Chart, any, visible ;
+ Chart, Axis, visible ;
</value>
</prop>
<prop oor:name="ImplementationURL" oor:type="xs:string">
@@ -1254,6 +1254,75 @@
</prop>
</node>
+ <node oor:name="ChartAreaPanel" oor:op="replace">
+ <prop oor:name="Title" oor:type="xs:string">
+ <value xml:lang="en-US">Area</value>
+ </prop>
+ <prop oor:name="Id" oor:type="xs:string">
+ <value>ChartAreaPanel</value>
+ </prop>
+ <prop oor:name="DeckId" oor:type="xs:string">
+ <value>ChartDeck</value>
+ </prop>
+ <prop oor:name="ContextList">
+ <value oor:separator=";">
+ Chart, any, visible ;
+ </value>
+ </prop>
+ <prop oor:name="ImplementationURL" oor:type="xs:string">
+ <value>private:resource/toolpanel/ChartPanelFactory/AreaPanel</value>
+ </prop>
+ <prop oor:name="OrderIndex" oor:type="xs:int">
+ <value>6</value>
+ </prop>
+ </node>
+
+ <node oor:name="ChartLinePanel" oor:op="replace">
+ <prop oor:name="Title" oor:type="xs:string">
+ <value xml:lang="en-US">Line</value>
+ </prop>
+ <prop oor:name="Id" oor:type="xs:string">
+ <value>ChartLinePanel</value>
+ </prop>
+ <prop oor:name="DeckId" oor:type="xs:string">
+ <value>ChartDeck</value>
+ </prop>
+ <prop oor:name="ContextList">
+ <value oor:separator=";">
+ Chart, any, visible ;
+ </value>
+ </prop>
+ <prop oor:name="ImplementationURL" oor:type="xs:string">
+ <value>private:resource/toolpanel/ChartPanelFactory/LinePanel</value>
+ </prop>
+ <prop oor:name="OrderIndex" oor:type="xs:int">
+ <value>7</value>
+ </prop>
+ </node>
+
+ <node oor:name="ChartCharacterPanel" oor:op="replace">
+ <prop oor:name="Title" oor:type="xs:string">
+ <value xml:lang="en-US">Character</value>
+ </prop>
+ <prop oor:name="Id" oor:type="xs:string">
+ <value>ChartCharacterPanel</value>
+ </prop>
+ <prop oor:name="DeckId" oor:type="xs:string">
+ <value>ChartDeck</value>
+ </prop>
+ <prop oor:name="ContextList">
+ <value oor:separator=";">
+ Chart, any, visible ;
+ </value>
+ </prop>
+ <prop oor:name="ImplementationURL" oor:type="xs:string">
+ <value>private:resource/toolpanel/ChartPanelFactory/CharacterPanel</value>
+ </prop>
+ <prop oor:name="OrderIndex" oor:type="xs:int">
+ <value>8</value>
+ </prop>
+ </node>
+
</node>
</node>
</oor:component-data>
diff --git a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
index 1e6234a..8177251 100644
--- a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
@@ -107,9 +107,9 @@
none
2 Context name
- Know context names are 3DObject, Annotation, Auditing, Cell, Chart, Draw, DrawPage, DrawText,
- EditCell, Form, Frame, Graphic, HandoutPage, MasterPage, Media, Multiobj, OLE, OutlineText,
- Pivot, SlidesorterPage, Table, Text, TextObject,
+ Know context names are 3DObject, Annotation, Auditing, Axis, Cell, Chart, Draw, DrawPage, DrawText,
+ EditCell, ErrorBar, Form, Frame, Graphic, HandoutPage, MasterPage, Media, Multiobj, OLE, OutlineText,
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list