diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-04-07 11:45:13 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-04-07 14:13:18 +0200 |
commit | d36f7c5bd2115fcdd26ba8ff7b6a0446dea70bd4 (patch) | |
tree | 5ae4b15f3302a538ac55d714ba0529ca4c1de87a /cui | |
parent | 61d57bcebd1a246603cbcd9ad5e0a7df1a8d66cd (diff) |
Revert "long->sal_Int32 in tools/gen.hxx"
This reverts commit 8bc951daf79decbd8a599a409c6d33c5456710e0.
As discussed at
<https://lists.freedesktop.org/archives/libreoffice/2018-April/079955.html>
"long->sal_Int32 in tools/gen.hxx", that commit caused lots of problems with
signed integer overflow, and the original plan was to redo it to consistently
use sal_Int64 instead of sal_Int32. <https://gerrit.libreoffice.org/#/c/52471/>
"sal_Int32->sal_Int64 in tools/gen.hxx" tried that. However, it failed
miserably on Windows, causing odd failures like not writing out Pictures/*.svm
streams out into .odp during CppunitTest_sd_export_ooxml2. So the next best
approach is to just revert the original commit, at least for now.
Includes revert of follow-up 8c50aff2175e85c54957d98ce32af40a3a87e168 "Fix
Library_vclplug_qt5".
Change-Id: Ia8bf34272d1ed38aac00e5d07a9d13fb03f439ae
Reviewed-on: https://gerrit.libreoffice.org/52532
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optcolor.cxx | 2 | ||||
-rw-r--r-- | cui/source/options/optjava.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/tpbitmap.cxx | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx index ca131aec41d8..a273888772c6 100644 --- a/cui/source/options/optcolor.cxx +++ b/cui/source/options/optcolor.cxx @@ -508,7 +508,7 @@ void ColorConfigWindow_Impl::CreateEntries() ScopedVclPtrInstance< FixedText > aFixedText(this); aCheckBox->SetText(sSampleText); aFixedText->SetText(sSampleText); - Size aCheckSize(aCheckBox->CalcMinimumSize(RECT_MAX)); + Size aCheckSize(aCheckBox->CalcMinimumSize(0x7fffffff)); Size aFixedSize(aFixedText->CalcMinimumSize()); nCheckBoxLabelOffset = aCheckSize.Width() - aFixedSize.Width(); } diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index 2d9618f7f128..2534247494aa 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -82,7 +82,7 @@ public: HeaderBar &rBar = GetTheHeaderBar(); if (rBar.GetItemCount() < 4) return; - long nCheckWidth = std::max<sal_Int32>(GetControlColumnWidth() + 12, + long nCheckWidth = std::max(GetControlColumnWidth() + 12, rBar.LogicToPixel(Size(15, 0), MapMode(MapUnit::MapAppFont)).Width()); long nVersionWidth = 12 + std::max(rBar.GetTextWidth(rBar.GetItemText(3)), diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 4d4093f210a8..b2ced9344e0b 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -316,8 +316,8 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs ) { BitmapEx aBmpEx(pGraphicObject->GetGraphic().GetBitmapEx()); Size aTempBitmapSize = aBmpEx.GetSizePixel(); - rBitmapSize.setWidth( (OutputDevice::LogicToLogic(aTempBitmapSize.Width(),MapUnit::MapPixel, MapUnit::Map100thMM )) / fUIScale ); - rBitmapSize.setHeight( (OutputDevice::LogicToLogic(aTempBitmapSize.Height(),MapUnit::MapPixel, MapUnit::Map100thMM )) / fUIScale ); + rBitmapSize.setWidth( (OutputDevice::LogicToLogic(static_cast<sal_Int32>(aTempBitmapSize.Width()),MapUnit::MapPixel, MapUnit::Map100thMM )) / fUIScale ); + rBitmapSize.setHeight( (OutputDevice::LogicToLogic(static_cast<sal_Int32>(aTempBitmapSize.Height()),MapUnit::MapPixel, MapUnit::Map100thMM )) / fUIScale ); CalculateBitmapPresetSize(); } @@ -531,8 +531,8 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyBitmapHdl, ValueSet*, void) Size aTempBitmapSize = aBmpEx.GetSizePixel(); const double fUIScale = ( (mpView && mpView->GetModel()) ? double(mpView->GetModel()->GetUIScale()) : 1.0); - rBitmapSize.setWidth( (OutputDevice::LogicToLogic(aTempBitmapSize.Width(),MapUnit::MapPixel, MapUnit::Map100thMM )) / fUIScale ); - rBitmapSize.setHeight( (OutputDevice::LogicToLogic(aTempBitmapSize.Height(),MapUnit::MapPixel, MapUnit::Map100thMM )) / fUIScale ); + rBitmapSize.setWidth( (OutputDevice::LogicToLogic(static_cast<sal_Int32>(aTempBitmapSize.Width()),MapUnit::MapPixel, MapUnit::Map100thMM )) / fUIScale ); + rBitmapSize.setHeight( (OutputDevice::LogicToLogic(static_cast<sal_Int32>(aTempBitmapSize.Height()),MapUnit::MapPixel, MapUnit::Map100thMM )) / fUIScale ); CalculateBitmapPresetSize(); ModifyBitmapStyleHdl( *m_pBitmapStyleLB ); ModifyBitmapPositionHdl( *m_pPositionLB ); |