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 /vcl/source/control/edit.cxx | |
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 'vcl/source/control/edit.cxx')
-rw-r--r-- | vcl/source/control/edit.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index e6c8e07bb824..42dd22296585 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -743,7 +743,7 @@ void Edit::ImplDelete( const Selection& rSelection, sal_uInt8 nDirection, sal_uI } } - maText.remove( aSelection.Min(), aSelection.Len() ); + maText.remove( static_cast<sal_Int32>(aSelection.Min()), static_cast<sal_Int32>(aSelection.Len()) ); maSelection.Min() = aSelection.Min(); maSelection.Max() = aSelection.Min(); ImplAlignAndPaint(); @@ -807,9 +807,9 @@ void Edit::ImplInsertText( const OUString& rStr, const Selection* pNewSel, bool ImplClearLayoutData(); if ( aSelection.Len() ) - maText.remove( aSelection.Min(), aSelection.Len() ); + maText.remove( static_cast<sal_Int32>(aSelection.Min()), static_cast<sal_Int32>(aSelection.Len()) ); else if ( !mbInsertMode && (aSelection.Max() < maText.getLength()) ) - maText.remove( aSelection.Max(), 1 ); + maText.remove( static_cast<sal_Int32>(aSelection.Max()), 1 ); // take care of input-sequence-checking now if (bIsUserInput && !rStr.isEmpty()) @@ -829,7 +829,7 @@ void Edit::ImplInsertText( const OUString& rStr, const Selection* pNewSel, bool if (bIsInputSequenceChecking && (xISC = ImplGetInputSequenceChecker()).is()) { sal_Unicode cChar = rStr[0]; - sal_Int32 nTmpPos = aSelection.Min(); + sal_Int32 nTmpPos = static_cast< sal_Int32 >( aSelection.Min() ); sal_Int16 nCheckMode = officecfg::Office::Common::I18N::CTL::CTLSequenceCheckingRestricted::get()? i18n::InputSequenceCheckMode::STRICT : i18n::InputSequenceCheckMode::BASIC; @@ -876,7 +876,7 @@ void Edit::ImplInsertText( const OUString& rStr, const Selection* pNewSel, bool } if ( !aNewText.isEmpty() ) - maText.insert( aSelection.Min(), aNewText ); + maText.insert( static_cast<sal_Int32>(aSelection.Min()), aNewText ); if ( !pNewSel ) { @@ -2036,7 +2036,7 @@ void Edit::Command( const CommandEvent& rCEvt ) { DeleteSelected(); delete mpIMEInfos; - sal_Int32 nPos = maSelection.Max(); + sal_Int32 nPos = static_cast<sal_Int32>(maSelection.Max()); mpIMEInfos = new Impl_IMEInfos( nPos, OUString(maText.getStr() + nPos ) ); mpIMEInfos->bWasCursorOverwrite = !IsInsertMode(); } |