[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - svx/source vcl/source
svx/source/tbxctrls/tbxcolorupdate.cxx | 16 ++-- vcl/source/window/toolbox.cxx |3 +++ 2 files changed, 17 insertions(+), 2 deletions(-) New commits: commit 3eb2a9081c50d1634602609c4585fffcec4ff9c4 Author: Marco Cecchetti AuthorDate: Tue Sep 24 16:37:46 2019 +0200 Commit: Noel Grandin CommitDate: Wed Oct 30 19:28:09 2019 +0100 tdf#126966: Use larger buttons for the colours in the sidebar on iOS - 2 Attempt to merge this with Noel's re-work of the color picker. Change-Id: I9687546889bc20ef95a50aeafbc6f40e939d57a9 Reviewed-on: https://gerrit.libreoffice.org/81755 Reviewed-by: Noel Grandin Tested-by: Noel Grandin diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx index 45558e51b533..77385d58e400 100644 --- a/svx/source/tbxctrls/tbxcolorupdate.cxx +++ b/svx/source/tbxctrls/tbxcolorupdate.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include #include #include @@ -89,7 +88,19 @@ namespace svx { Image aImage(mpTbx->GetItemImage(mnBtnId)); Size aItemSize(mbWideButton ? mpTbx->GetItemContentSize(mnBtnId) : aImage.GetSizePixel()); - +#ifdef IOS // tdf#126966 +// Oddly enough, it is in the "not wide button" case that we want the larger ones, hmm. +if (!mbWideButton) +{ +// usually the normal size is 16 +const long nIOSSize = 40; +if (aItemSize.getWidth() < nIOSSize) +{ +aItemSize.setWidth(nIOSSize); +aItemSize.setHeight(nIOSSize); +} +} +#endif const bool bSizeChanged = (maBmpSize != aItemSize); const bool bDisplayModeChanged = (mbWasHiContrastMode != mpTbx->GetSettings().GetStyleSettings().GetHighContrastMode()); Color aColor(rColor); @@ -100,6 +111,7 @@ namespace svx if ((maCurColor == aColor) && !bSizeChanged && !bDisplayModeChanged && !bForceUpdate) return; + if (!aItemSize.Width() || !aItemSize.Height()) return; diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 9ba57c20ad08..9fce6175fead 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -1413,6 +1413,9 @@ bool ToolBox::ImplCalcItem() longnMinWidth = 6; longnMinHeight = 6; longnDropDownArrowWidth = TB_DROPDOWNARROWWIDTH; +#ifdef IOS +nDropDownArrowWidth *= 3; +#endif // set defaults if image or text is needed but empty nDefWidth = GetDefaultImageSize().Width(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - svx/source vcl/source
svx/source/tbxctrls/tbcontrl.cxx| 32 svx/source/tbxctrls/tbunocontroller.cxx | 32 vcl/source/window/toolbox2.cxx | 26 +++--- 3 files changed, 79 insertions(+), 11 deletions(-) New commits: commit 37d2b00dfd5cbbda3492b00a06201879b629f1af Author: Szymon Kłos AuthorDate: Wed Oct 23 13:29:37 2019 +0200 Commit: Szymon Kłos CommitDate: Wed Oct 23 17:12:16 2019 +0200 jsdilogs: send data for font name & size toolitems Change-Id: Ia5ea058ba44b3a511a0bdbfc132a7de2d68f2e6b Reviewed-on: https://gerrit.libreoffice.org/81380 Tested-by: Jenkins Reviewed-by: Szymon Kłos (cherry picked from commit c7b97f2e4b8f47107bc91ded0295dcfffd0c71b6) Reviewed-on: https://gerrit.libreoffice.org/81395 Tested-by: Jenkins CollaboraOffice diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index c748507a1fc8..deecd6b37353 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -235,6 +235,7 @@ public: virtual boolEventNotify( NotifyEvent& rNEvt ) override; virtual Reference< css::accessibility::XAccessible > CreateAccessible() override; void SetOwnFontList(::std::unique_ptr && _aOwnFontList) { m_aOwnFontList = std::move(_aOwnFontList); } +virtual boost::property_tree::ptree DumpAsPropertyTree() override; }; // SelectHdl needs the Modifiers, get them in MouseButtonUp @@ -987,6 +988,7 @@ SvxFontNameBox_Impl::SvxFontNameBox_Impl( vcl::Window* pParent, const Reference< SetOptimalSize(); EnableControls_Impl(); GetSubEdit()->AddEventListener( LINK( this, SvxFontNameBox_Impl, CheckAndMarkUnknownFont )); +set_id("fontnamecombobox"); } SvxFontNameBox_Impl::~SvxFontNameBox_Impl() @@ -1260,6 +1262,36 @@ void SvxFontNameBox_Impl::Select() } } +boost::property_tree::ptree SvxFontNameBox_Impl::DumpAsPropertyTree() +{ +boost::property_tree::ptree aTree(FontNameBox::DumpAsPropertyTree()); + +boost::property_tree::ptree aEntries; + +for (int i = 0; i < GetEntryCount(); ++i) +{ +boost::property_tree::ptree aEntry; +aEntry.put("", GetEntry(i)); +aEntries.push_back(std::make_pair("", aEntry)); +} + +aTree.add_child("entries", aEntries); + +boost::property_tree::ptree aSelected; + +for (int i = 0; i < GetSelectedEntryCount(); ++i) +{ +boost::property_tree::ptree aEntry; +aEntry.put("", GetSelectedEntryPos(i)); +aSelected.push_back(std::make_pair("", aEntry)); +} + +aTree.put("selectedCount", GetSelectedEntryCount()); +aTree.add_child("selectedEntries", aSelected); + +return aTree; +} + SvxColorWindow::SvxColorWindow(const OUString&rCommand, std::shared_ptr const & rPaletteManager, ColorStatus& rColorStatus, diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index 18b22663e2c0..917d87b462ca 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -91,6 +91,7 @@ public: voidSetOptimalSize(); virtual boolEventNotify( NotifyEvent& rNEvt ) override; +virtual boost::property_tree::ptree DumpAsPropertyTree() override; protected: virtual voidSelect() override; @@ -120,6 +121,7 @@ SvxFontSizeBox_Impl::SvxFontSizeBox_Impl( { SetValue( 0 ); SetText( "" ); +set_id("fontsizecombobox"); } void SvxFontSizeBox_Impl::ReleaseFocus_Impl() @@ -260,6 +262,36 @@ void SvxFontSizeBox_Impl::DataChanged( const DataChangedEvent& rDCEvt ) FontSizeBox::DataChanged( rDCEvt ); } +boost::property_tree::ptree SvxFontSizeBox_Impl::DumpAsPropertyTree() +{ +boost::property_tree::ptree aTree(FontSizeBox::DumpAsPropertyTree()); + +boost::property_tree::ptree aEntries; + +for (int i = 0; i < GetEntryCount(); ++i) +{ +boost::property_tree::ptree aEntry; +aEntry.put("", GetEntry(i)); +aEntries.push_back(std::make_pair("", aEntry)); +} + +aTree.add_child("entries", aEntries); + +boost::property_tree::ptree aSelected; + +for (int i = 0; i < GetSelectedEntryCount(); ++i) +{ +boost::property_tree::ptree aEntry; +aEntry.put("", GetSelectedEntryPos(i)); +aSelected.push_back(std::make_pair("", aEntry)); +} + +aTree.put("selectedCount", GetSelectedEntryCount()); +aTree.add_child("selectedEntries", aSelected); + +return aTree; +} + FontHeightToolBoxControl::FontHeightToolBoxControl( const uno::Reference< uno::XComponentContext >& rxContext ) : svt::ToolboxController( rxContext, uno::Reference< frame::XFrame >(), diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 5e5de5430d22..9a618a0b07eb 100644 --- a/v
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - svx/source vcl/source
svx/source/sdr/contact/viewcontactofgroup.cxx |6 ++ svx/source/sdr/contact/viewcontactofsdrrectobj.cxx |5 ++--- vcl/source/helper/canvastools.cxx |6 +++--- 3 files changed, 7 insertions(+), 10 deletions(-) New commits: commit b6d2d10b8b2de89b1a856b8e164c0defcb2119ff Author: Noel Grandin AuthorDate: Fri May 3 16:19:51 2019 +0200 Commit: Andras Timar CommitDate: Thu Sep 5 09:08:21 2019 +0200 tdf#81134 Chart size not retained Change-Id: I39019e29a988b7b9e12505537fdb69d83223600d Reviewed-on: https://gerrit.libreoffice.org/75329 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks Reviewed-on: https://gerrit.libreoffice.org/78422 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/svx/source/sdr/contact/viewcontactofgroup.cxx b/svx/source/sdr/contact/viewcontactofgroup.cxx index d6a0e98dfcfe..cc82432aaea6 100644 --- a/svx/source/sdr/contact/viewcontactofgroup.cxx +++ b/svx/source/sdr/contact/viewcontactofgroup.cxx @@ -27,6 +27,7 @@ #include #include #include +#include namespace sdr @@ -76,10 +77,7 @@ namespace sdr // to current zoom so as objects relative position to grid // appears stable aCurrentBoundRect += GetSdrObjGroup().GetGridOffset(); -const basegfx::B2DRange aCurrentRange( -aCurrentBoundRect.Left(), aCurrentBoundRect.Top(), -aCurrentBoundRect.Right(), aCurrentBoundRect.Bottom()); - +const basegfx::B2DRange aCurrentRange = vcl::unotools::b2DRectangleFromRectangle(aCurrentBoundRect); const drawinglayer::primitive2d::Primitive2DReference xReference( drawinglayer::primitive2d::createHiddenGeometryPrimitives2D( false, aCurrentRange)); diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx index f02ba917280c..0ada135b8766 100644 --- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx @@ -25,6 +25,7 @@ #include #include #include +#include namespace sdr { namespace contact { @@ -52,9 +53,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrRectObj::createV // to current zoom so as objects relative position to grid // appears stable rRectangle += GetRectObj().GetGridOffset(); -const ::basegfx::B2DRange aObjectRange( -rRectangle.Left(), rRectangle.Top(), -rRectangle.Right(), rRectangle.Bottom() ); +const ::basegfx::B2DRange aObjectRange = vcl::unotools::b2DRectangleFromRectangle(rRectangle); const GeoStat& rGeoStat(GetRectObj().GetGeoStat()); diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx index b78625fb54ad..40502932864c 100644 --- a/vcl/source/helper/canvastools.cxx +++ b/vcl/source/helper/canvastools.cxx @@ -394,9 +394,9 @@ namespace vcl basegfx::B2DRange b2DRectangleFromRectangle( const ::tools::Rectangle& rRect ) { return basegfx::B2DRange( rRect.Left(), -rRect.Top(), -rRect.Right(), -rRect.Bottom() ); + rRect.Top(), + rRect.IsWidthEmpty() ? rRect.Left() :rRect.Right(), + rRect.IsHeightEmpty() ? rRect.Top() : rRect.Bottom() ); } geometry::IntegerSize2D integerSize2DFromSize( const Size& rSize ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits