sd/source/ui/view/drviews5.cxx | 8 ++ svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 33 +++++++++- svx/source/sidebar/possize/PosSizePropertyPanel.hxx | 4 + svx/uiconfig/ui/sidebarpossize.ui | 62 +++++++++----------- 4 files changed, 71 insertions(+), 36 deletions(-)
New commits: commit 677f96f7f849f8a098e389a06356eb0c38809fa5 Author: Michael Meeks <michael.me...@collabora.com> AuthorDate: Mon Dec 2 22:10:15 2019 +0000 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Sat May 23 16:55:58 2020 +0100 lok: shape selection: perform the needed unit conversion in a clever way follow-on fixup of: 35d6c6ffc9b3f66e3802d1770c4e87cf843c3a48 which ended up not removing the duplicated conversion logic it should have. Change-Id: I28ef0180749f6356ec456b4f0b1eef1b474fd6c9 Reviewed-on: https://gerrit.libreoffice.org/84284 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.me...@collabora.com> diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index c22ef12cc197..6258eb810f8d 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -55,7 +55,7 @@ using namespace css; using namespace css::uno; -const char USERITEM_NAME[] = "FitItem"; +const char USERITEM_NAME[] = "FitItem"; namespace svx { namespace sidebar { commit 2e98513386edc1a22533fe682c80e0daa7ef0dad Author: Muhammet Kara <muhammet.k...@collabora.com> AuthorDate: Tue Nov 26 14:56:17 2019 +0300 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Sat May 23 16:55:56 2020 +0100 Enable edit chart button on desktop and web Change-Id: Iad98ff3e0b7f3cc6608a119134ce3595dd921e58 Reviewed-on: https://gerrit.libreoffice.org/83755 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Muhammet Kara <muhammet.k...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/85092 Tested-by: Jenkins diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index d631d5e57499..c22ef12cc197 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -277,7 +277,6 @@ void PosSizePropertyPanel::HandleContextChange( bool bShowAngle = false; bool bShowFlip = false; bool bShowEditChart = false; - bool bIsMobile = comphelper::LibreOfficeKit::isActive() && comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()); switch (maContext.GetCombinedContext_DI()) { @@ -304,15 +303,13 @@ void PosSizePropertyPanel::HandleContextChange( break; case CombinedEnumContext(Application::WriterVariants, Context::OLE): - if (bIsMobile) - bShowEditChart = true; + bShowEditChart = true; break; case CombinedEnumContext(Application::Calc, Context::OLE): case CombinedEnumContext(Application::DrawImpress, Context::OLE): bShowPosition = true; - if (bIsMobile) - bShowEditChart = true; + bShowEditChart = true; break; case CombinedEnumContext(Application::Calc, Context::Chart): commit 0a7b6388dfbf4da351e1a52d7f6571b86e10ae99 Author: Muhammet Kara <muhammet.k...@collabora.com> AuthorDate: Wed Nov 20 15:30:01 2019 +0300 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Sat May 23 16:55:55 2020 +0100 Add Edit Chart button for online's mobile view To improve UX by providing mobile viewers a way to enter into edit mode of a chart via single tap Change-Id: I3cfb82df166c571a401f195a7f7c806fd6df604e Reviewed-on: https://gerrit.libreoffice.org/83614 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Muhammet Kara <muhammet.k...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/85091 Tested-by: Jenkins diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 69b4739ede2c..d631d5e57499 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -27,6 +27,7 @@ #include <svx/svxids.hrc> #include <sfx2/dispatch.hxx> #include <sfx2/bindings.hxx> +#include <sfx2/lokhelper.hxx> #include <sfx2/module.hxx> #include <sfx2/viewsh.hxx> #include <sfx2/objsh.hxx> @@ -49,6 +50,7 @@ #include <svx/transfrmhelper.hxx> #include <svtools/unitconv.hxx> +#include <comphelper/lok.hxx> using namespace css; using namespace css::uno; @@ -107,6 +109,7 @@ PosSizePropertyPanel::PosSizePropertyPanel( get( mpDial, "orientationcontrol" ); get( mpFtFlip, "fliplabel" ); get( mpFlipTbx, "selectrotationtype" ); + get( mpBtnEditChart, "btnEditChart" ); Initialize(); mpBindings->Update( SID_ATTR_METRIC ); @@ -136,6 +139,7 @@ void PosSizePropertyPanel::dispose() mpDial.clear(); mpFtFlip.clear(); mpFlipTbx.clear(); + mpBtnEditChart.clear(); maTransfPosXControl.dispose(); maTransfPosYControl.dispose(); @@ -205,6 +209,8 @@ void PosSizePropertyPanel::Initialize() //flip: mpFlipTbx->SetSelectHdl( LINK( this, PosSizePropertyPanel, FlipHdl) ); + mpBtnEditChart->SetClickHdl( LINK( this, PosSizePropertyPanel, ClickChartEditHdl ) ); + mpMtrAngle->InsertValue(0, FieldUnit::CUSTOM); mpMtrAngle->InsertValue(4500, FieldUnit::CUSTOM); mpMtrAngle->InsertValue(9000, FieldUnit::CUSTOM); @@ -270,6 +276,8 @@ void PosSizePropertyPanel::HandleContextChange( bool bShowPosition = false; bool bShowAngle = false; bool bShowFlip = false; + bool bShowEditChart = false; + bool bIsMobile = comphelper::LibreOfficeKit::isActive() && comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()); switch (maContext.GetCombinedContext_DI()) { @@ -295,14 +303,24 @@ void PosSizePropertyPanel::HandleContextChange( bShowFlip = true; break; + case CombinedEnumContext(Application::WriterVariants, Context::OLE): + if (bIsMobile) + bShowEditChart = true; + break; + + case CombinedEnumContext(Application::Calc, Context::OLE): + case CombinedEnumContext(Application::DrawImpress, Context::OLE): + bShowPosition = true; + if (bIsMobile) + bShowEditChart = true; + break; + case CombinedEnumContext(Application::Calc, Context::Chart): case CombinedEnumContext(Application::Calc, Context::Form): case CombinedEnumContext(Application::Calc, Context::Media): - case CombinedEnumContext(Application::Calc, Context::OLE): case CombinedEnumContext(Application::Calc, Context::MultiObject): case CombinedEnumContext(Application::DrawImpress, Context::Media): case CombinedEnumContext(Application::DrawImpress, Context::Form): - case CombinedEnumContext(Application::DrawImpress, Context::OLE): case CombinedEnumContext(Application::DrawImpress, Context::ThreeDObject): case CombinedEnumContext(Application::DrawImpress, Context::MultiObject): bShowPosition = true; @@ -324,6 +342,9 @@ void PosSizePropertyPanel::HandleContextChange( mpFtFlip->Show(bShowFlip); mpFlipTbx->Show(bShowFlip); + // Edit Chart + mpBtnEditChart->Show(bShowEditChart); + if (mxSidebar.is()) mxSidebar->requestLayout(); } @@ -498,6 +519,15 @@ IMPL_LINK( PosSizePropertyPanel, FlipHdl, ToolBox*, pBox, void ) } } +IMPL_STATIC_LINK_NOARG( PosSizePropertyPanel, ClickChartEditHdl, Button*, void ) +{ + SfxViewShell* pCurSh = SfxViewShell::Current(); + if ( pCurSh) + { + pCurSh->DoVerb( -1 ); + } +} + void PosSizePropertyPanel::NotifyItemUpdate( sal_uInt16 nSID, diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx index d73275f2b6d5..f049d5e4ef9e 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx @@ -113,6 +113,9 @@ private: VclPtr<FixedText> mpFtFlip; VclPtr<ToolBox> mpFlipTbx; + //edit charts button for online's mobile view + VclPtr<PushButton> mpBtnEditChart; + // Internal variables basegfx::B2DRange maRect; basegfx::B2DRange maWorkArea; @@ -159,6 +162,7 @@ private: DECL_LINK( AngleModifiedHdl, Edit&, void ); DECL_LINK( RotationHdl, svx::DialControl*, void ); DECL_LINK( FlipHdl, ToolBox *, void ); + DECL_STATIC_LINK( PosSizePropertyPanel, ClickChartEditHdl, Button*, void ); void Initialize(); void executeSize(); diff --git a/svx/uiconfig/ui/sidebarpossize.ui b/svx/uiconfig/ui/sidebarpossize.ui index 3f584ac4d31f..8605a49d387e 100644 --- a/svx/uiconfig/ui/sidebarpossize.ui +++ b/svx/uiconfig/ui/sidebarpossize.ui @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.22.1 --> <interface domain="svx"> <requires lib="gtk+" version="3.18"/> <requires lib="LibreOffice" version="1.0"/> <object class="GtkAdjustment" id="adjustment1"> <property name="lower">-180</property> - <property name="upper">359.99</property> + <property name="upper">359.99000000000001</property> <property name="step_increment">5</property> <property name="page_increment">20</property> </object> @@ -38,15 +39,13 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> - <property name="xalign">0</property> <property name="label" translatable="yes" context="sidebarpossize|horizontallabel">Position _X:</property> <property name="use_underline">True</property> + <property name="xalign">0</property> </object> <packing> <property name="left_attach">0</property> <property name="top_attach">0</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -60,15 +59,13 @@ </accessibility> <child internal-child="accessible"> <object class="AtkObject" id="horizontalpos:0in-atkobject"> - <property name="AtkObject::accessible-name" translatable="yes" context="sidebarpossize|horizontalpos-atkobject">Horizontal</property> + <property name="AtkObject::accessible-name" translatable="yes" context="sidebarpossize|horizontalpos">Horizontal</property> </object> </child> </object> <packing> <property name="left_attach">0</property> <property name="top_attach">1</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -76,15 +73,13 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> - <property name="xalign">0</property> <property name="label" translatable="yes" context="sidebarpossize|verticallabel">Position _Y:</property> <property name="use_underline">True</property> + <property name="xalign">0</property> </object> <packing> <property name="left_attach">1</property> <property name="top_attach">0</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -98,15 +93,13 @@ </accessibility> <child internal-child="accessible"> <object class="AtkObject" id="verticalpos:0in-atkobject"> - <property name="AtkObject::accessible-name" translatable="yes" context="sidebarpossize|verticalpos-atkobject">Vertical</property> + <property name="AtkObject::accessible-name" translatable="yes" context="sidebarpossize|verticalpos">Vertical</property> </object> </child> </object> <packing> <property name="left_attach">1</property> <property name="top_attach">1</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -114,15 +107,13 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> - <property name="xalign">0</property> <property name="label" translatable="yes" context="sidebarpossize|widthlabel">_Width:</property> <property name="use_underline">True</property> + <property name="xalign">0</property> </object> <packing> <property name="left_attach">0</property> <property name="top_attach">2</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -137,15 +128,13 @@ </accessibility> <child internal-child="accessible"> <object class="AtkObject" id="selectwidth:0in-atkobject"> - <property name="AtkObject::accessible-name" translatable="yes" context="sidebarpossize|selectwidth-atkobject">Width</property> + <property name="AtkObject::accessible-name" translatable="yes" context="sidebarpossize|selectwidth">Width</property> </object> </child> </object> <packing> <property name="left_attach">0</property> <property name="top_attach">3</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -153,15 +142,13 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> - <property name="xalign">0</property> <property name="label" translatable="yes" context="sidebarpossize|heightlabel">H_eight:</property> <property name="use_underline">True</property> + <property name="xalign">0</property> </object> <packing> <property name="left_attach">1</property> <property name="top_attach">2</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> <child> @@ -176,15 +163,13 @@ </accessibility> <child internal-child="accessible"> <object class="AtkObject" id="selectheight:0in-atkobject"> - <property name="AtkObject::accessible-name" translatable="yes" context="sidebarpossize|selectheight-atkobject">Height</property> + <property name="AtkObject::accessible-name" translatable="yes" context="sidebarpossize|selectheight">Height</property> </object> </child> </object> <packing> <property name="left_attach">1</property> <property name="top_attach">3</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> </object> @@ -216,9 +201,9 @@ <object class="GtkLabel" id="rotationlabel"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">0</property> <property name="label" translatable="yes" context="sidebarpossize|rotationlabel">_Rotation:</property> <property name="use_underline">True</property> + <property name="xalign">0</property> </object> <packing> <property name="expand">False</property> @@ -243,7 +228,7 @@ </accessibility> <child internal-child="accessible"> <object class="AtkObject" id="orientationcontrol-atkobject"> - <property name="AtkObject::accessible-name" translatable="yes" context="sidebarpossize|orientationcontrol-atkobject">Rotation</property> + <property name="AtkObject::accessible-name" translatable="yes" context="sidebarpossize|orientationcontrol">Rotation</property> </object> </child> </object> @@ -285,10 +270,10 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> - <property name="xalign">0</property> <property name="label" translatable="yes" context="sidebarpossize|fliplabel">_Flip:</property> <property name="use_underline">True</property> <property name="justify">right</property> + <property name="xalign">0</property> </object> <packing> <property name="expand">True</property> @@ -301,9 +286,6 @@ <property name="visible">True</property> <property name="can_focus">True</property> <property name="halign">end</property> - <accessibility> - <relation type="labelled-by" target="fliplabel"/> - </accessibility> <child> <object class="GtkToolButton" id="flipvertical"> <property name="visible">True</property> @@ -332,6 +314,9 @@ <property name="homogeneous">True</property> </packing> </child> + <accessibility> + <relation type="labelled-by" target="fliplabel"/> + </accessibility> </object> <packing> <property name="expand">True</property> @@ -448,6 +433,19 @@ <property name="position">4</property> </packing> </child> + <child> + <object class="GtkButton" id="btnEditChart"> + <property name="label" translatable="yes" context="sidebarpossize|btnEditChart">Edit Chart</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">5</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> @@ -459,8 +457,6 @@ <packing> <property name="left_attach">0</property> <property name="top_attach">0</property> - <property name="width">1</property> - <property name="height">1</property> </packing> </child> </object> commit b5c1d3d62a616d7b8ac5555451c9b3812f2a2620 Author: Mert Tumer <mert.tu...@collabora.com> AuthorDate: Tue Apr 7 15:36:34 2020 +0300 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Sat May 23 16:55:53 2020 +0100 fix ODP roundtripped in online opens with huge zoom in desktop Change-Id: Ia3192cfeaab8ac643bba7b499240882f403b6388 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91822 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx index dab56e56aa6b..1193d9ef2184 100644 --- a/sd/source/ui/view/drviews5.cxx +++ b/sd/source/ui/view/drviews5.cxx @@ -49,11 +49,13 @@ #include <Client.hxx> #include <slideshow.hxx> #include <unokywds.hxx> +#include <sdpage.hxx> #include <SdUnoDrawView.hxx> #include <ViewShellBase.hxx> #include <FormShellManager.hxx> #include <DrawController.hxx> #include <memory> +#include <comphelper/lok.hxx> namespace sd { @@ -336,6 +338,12 @@ void DrawViewShell::WriteFrameViewData() Size aVisSizePixel = GetActiveWindow()->GetOutputSizePixel(); ::tools::Rectangle aVisArea = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0), aVisSizePixel) ); + if (comphelper::LibreOfficeKit::isActive()) + { + // aVisArea is nonsensical in the LOK case, use the slide size + aVisArea = ::tools::Rectangle(Point(), getCurrentPage()->GetSize()); + } + mpFrameView->SetVisArea(aVisArea); if( mePageKind == PageKind::Handout ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits