summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2019-06-01weld SvxThesaurusDialogCaolán McNamara
Change-Id: I09a7b4dcd43af061d0e4be42a7b6a2ebf2331d0d Reviewed-on: https://gerrit.libreoffice.org/73282 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-31tdf#125550 vcl menu bar / floating window: fix text colorMiklos Vajna
Regression from commit e8d5b8beb5958147235ff955ed38c47b51d860ff (tdf#113714 vcl menu bar window: avoid flicker, 2019-05-20), the problem was that a freshly created VirtualDevice doesn't have the default text color, so we need to initialize that explicitly based on the render context text color. Also introduce a BufferDevice to do this initialization, instead of fixing this in MenuBarWindow::Paint(), then copy&pasting the fix to MenuFloatingWindow::Paint(). Change-Id: Ib171cd52e7cabe0bc3c639821f558d8303039fe6 Reviewed-on: https://gerrit.libreoffice.org/73269 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-05-31Fix -fsanitize=shift-exponentStephan Bergmann
...as seen with `--convert-to pdf cdr/fdo55522-1.cdr` with cdr/fdo55522-1.cdr as obtained by bin/get-bugzilla-attachments-by-mimetype (i.e., the attachment at <https://bugs.documentfoundation.org/show_bug.cgi?id=55522#c0>): > vcl/source/fontsubset/cff.cxx:737:35: runtime error: shift exponent 32 is too large for 32-bit type 'unsigned int' > #0 in CffSubsetterContext::convertOneTypeOp() at vcl/source/fontsubset/cff.cxx:737:35 (instdir/program/libvcllo.so +0x9489ce3) > #1 in CffSubsetterContext::convert2Type1Ops(CffLocal*, unsigned char const*, int, unsigned char*) at vcl/source/fontsubset/cff.cxx:1117:9 (instdir/program/libvcllo.so +0x94970d3) > #2 in CffSubsetterContext::emitAsType1(Type1Emitter&, unsigned short const*, unsigned char const*, int*, int, FontSubsetInfo&) at vcl/source/fontsubset/cff.cxx:1969:28 (instdir/program/libvcllo.so +0x94a9ec8) [...] If any of these "overflow" bits of nHintMask should have been set by the preceding for loop, mbIgnoreHints would have been set and this for loop wouldn't be reached. Change-Id: I0fd6de10610b52300e081770e9df1078e7ee5f92 Reviewed-on: https://gerrit.libreoffice.org/73247 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-31Avoid UB shifting a negative intStephan Bergmann
`--convert-to pdf cdr/fdo55522-1.cdr` with cdr/fdo55522-1.cdr as obtained by bin/get-bugzilla-attachments-by-mimetype (i.e., the attachment at <https://bugs.documentfoundation.org/show_bug.cgi?id=55522#c0>) under -fsanitize=undefined causes > vcl/source/fontsubset/sft.cxx:580:34: runtime error: left shift of negative value -16384 > #0 in vcl::GetCompoundTTOutline(vcl::TrueTypeFont*, unsigned int, vcl::ControlPoint**, vcl::TTGlyphMetrics*, std::__debug::vector<unsigned int, std::allocator<unsigned int> >&) at vcl/source/fontsubset/sft.cxx:580:34 (instdir/program/libvcllo.so +0x94a45cd) > #1 in vcl::GetTTGlyphOutline(vcl::TrueTypeFont*, unsigned int, vcl::ControlPoint**, vcl::TTGlyphMetrics*, std::__debug::vector<unsigned int, std::allocator<unsigned int> >*) at vcl/source/fontsubset/sft.cxx:688:15 (instdir/program/libvcllo.so +0x9479a18) > #2 in vcl::GetCompoundTTOutline(vcl::TrueTypeFont*, unsigned int, vcl::ControlPoint**, vcl::TTGlyphMetrics*, std::__debug::vector<unsigned int, std::allocator<unsigned int> >&) at vcl/source/fontsubset/sft.cxx:543:19 (instdir/program/libvcllo.so +0x94a3ec9) > #3 in vcl::GetTTGlyphOutline(vcl::TrueTypeFont*, unsigned int, vcl::ControlPoint**, vcl::TTGlyphMetrics*, std::__debug::vector<unsigned int, std::allocator<unsigned int> >*) at vcl/source/fontsubset/sft.cxx:688:15 (instdir/program/libvcllo.so +0x9479a18) > #4 in vcl::GetTTGlyphPoints(vcl::TrueTypeFont*, unsigned int, vcl::ControlPoint**) at vcl/source/fontsubset/sft.cxx:1707:12 (instdir/program/libvcllo.so +0x9478c66) > #5 in vcl::GetTTRawGlyphData(vcl::TrueTypeFont*, unsigned int) at vcl/source/fontsubset/sft.cxx:2480:9 (instdir/program/libvcllo.so +0x9487c85) > #6 in vcl::CreateTTFromTTGlyphs(vcl::TrueTypeFont*, char const*, unsigned short const*, unsigned char const*, int) at vcl/source/fontsubset/sft.cxx:1955:32 (instdir/program/libvcllo.so +0x94821ce) > #7 in psp::PrintFontManager::createFontSubset(FontSubsetInfo&, int, rtl::OUString const&, unsigned short const*, unsigned char const*, int*, int) at vcl/unx/generic/fontmanager/fontmanager.cxx:1094:41 (instdir/program/libvcllo.so +0x99dee87) > #8 in CairoTextRender::CreateFontSubset(rtl::OUString const&, PhysicalFontFace const*, unsigned short const*, unsigned char const*, int*, int, FontSubsetInfo&) at vcl/unx/generic/gdi/cairotextrender.cxx:494:26 (instdir/program/libvcllo.so +0x98af6bc) > #9 in SvpSalGraphics::CreateFontSubset(rtl::OUString const&, PhysicalFontFace const*, unsigned short const*, unsigned char const*, int*, int, FontSubsetInfo&) at vcl/headless/svptext.cxx:74:30 (instdir/program/libvcllo.so +0x98a10a3) > #10 in vcl::PDFWriterImpl::emitFonts() at vcl/source/gdi/pdfwriter_impl.cxx:2815:28 (instdir/program/libvcllo.so +0x7fdbd2d) > #11 in vcl::PDFWriterImpl::emitResources() at vcl/source/gdi/pdfwriter_impl.cxx:3045:5 (instdir/program/libvcllo.so +0x7fe3188) > #12 in vcl::PDFWriterImpl::emitCatalog() at vcl/source/gdi/pdfwriter_impl.cxx:4528:5 (instdir/program/libvcllo.so +0x8023c46) > #13 in vcl::PDFWriterImpl::emit() at vcl/source/gdi/pdfwriter_impl.cxx:5748:5 (instdir/program/libvcllo.so +0x8044e2d) > #14 in vcl::PDFWriter::Emit() at vcl/source/gdi/pdfwriter.cxx:52:29 (instdir/program/libvcllo.so +0x7f017bc) > #15 in PDFExport::Export(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at filter/source/pdf/pdfexport.cxx:957:40 (instdir/program/../program/libpdffilterlo.so +0x2f1789) > #16 in PDFFilter::implExport(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at filter/source/pdf/pdffilter.cxx:155:24 (instdir/program/../program/libpdffilterlo.so +0x33ac4f) > #17 in PDFFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at filter/source/pdf/pdffilter.cxx:216:23 (instdir/program/../program/libpdffilterlo.so +0x33babf) > #18 in SfxObjectShell::ExportTo(SfxMedium&) at sfx2/source/doc/objstor.cxx:2422:25 (instdir/program/libsfxlo.so +0x4a4e283) > #19 in SfxObjectShell::SaveTo_Impl(SfxMedium&, SfxItemSet const*) at sfx2/source/doc/objstor.cxx:1513:19 (instdir/program/libsfxlo.so +0x4a3e302) > #20 in SfxObjectShell::PreDoSaveAs_Impl(rtl::OUString const&, rtl::OUString const&, SfxItemSet const&) at sfx2/source/doc/objstor.cxx:2828:39 (instdir/program/libsfxlo.so +0x4a6d72c) > #21 in SfxObjectShell::CommonSaveAs_Impl(INetURLObject const&, rtl::OUString const&, SfxItemSet&) at sfx2/source/doc/objstor.cxx:2685:9 (instdir/program/libsfxlo.so +0x4a671c3) > #22 in SfxObjectShell::APISaveAs_Impl(rtl::OUString const&, SfxItemSet&) at sfx2/source/doc/objserv.cxx:326:19 (instdir/program/libsfxlo.so +0x49de0b8) > #23 in SfxBaseModel::impl_store(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, bool) at sfx2/source/doc/sfxbasemodel.cxx:3026:42 (instdir/program/libsfxlo.so +0x4bc9c26) > #24 in SfxBaseModel::storeToURL(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) at sfx2/source/doc/sfxbasemodel.cxx:1697:13 (instdir/program/libsfxlo.so +0x4bd02fb) [...] and then later a similar > vcl/source/fontsubset/sft.cxx:590:34: runtime error: left shift of negative value -16384 [...] Change-Id: I12444a704870d7a03ead6be5c039934e826fda7d Reviewed-on: https://gerrit.libreoffice.org/73184 Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> Tested-by: Jenkins
2019-05-31tdf#125506 tdf#121241: No need to transform to DeviceCoordinatesXisco Fauli
Regression from b9fa01a8d1137a95af9865a3e47995734c40da6e Change-Id: Ie4ab65966e274bff4d699b7cd4dc0fd47d26c558 Reviewed-on: https://gerrit.libreoffice.org/73249 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-05-31tdf#124484: resize slideshow window so it spans all displaysKatarina Behrens
Change-Id: I55b4ab8ec5059110525c5194e1133c65bbd07fec Reviewed-on: https://gerrit.libreoffice.org/73183 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-05-31weld SwMultiTOXTabDialogCaolán McNamara
Change-Id: Ic1ae4cfe43bdf31d511e9ac0f65a821c53ab59eb Reviewed-on: https://gerrit.libreoffice.org/65432 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-30Unconst members of ControlTypeAndPartMike Kaganski
... which need to be assignable in auto-generated operator= in VS2019 toolset v142. Without that, a compile-time error is generated: [CXX] vcl/source/gdi/WidgetDefinitionReader.cxx [CXX] vcl/source/gdi/WidgetDefinition.cxx [CXX] vcl/source/gdi/gdimetafiletools.cxx C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): error C2220: warning treated as error - no 'object' file generated C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): warning C4239: nonstandard extension used: 'argument': conversion from 'const std::pair<const _Kty,_Ty>' to 'volatile const std::pair<_Kty,_Ty> &' with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): note: A non-const reference may only be bound to an lvalue; assignment operator takes a reference to non-const C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(486): note: see reference to function template instantiation 'void std::list<std::pair<const _Kty,_Ty>,std::allocator<std::pair<const _Kty,_Ty>>>::_Assign_cast<std::pair<_Kty,_Ty>&,std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const _Kty,_Ty>>>,std::_Iterator_base0>>(_UIter,const _UIter)' being compiled with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>, _UIter=std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>>>,std::_Iterator_base0> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(485): note: see reference to function template instantiation 'void std::list<std::pair<const _Kty,_Ty>,std::allocator<std::pair<const _Kty,_Ty>>>::_Assign_cast<std::pair<_Kty,_Ty>&,std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const _Kty,_Ty>>>,std::_Iterator_base0>>(_UIter,const _UIter)' being compiled with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>, _UIter=std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>>>,std::_Iterator_base0> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(481): note: while compiling class template member function 'void std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>>::_Copy_assign(const std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>> &,std::false_type)' with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>, _Hasher=std::hash<vcl::ControlTypeAndPart>, _Keyeq=std::equal_to<vcl::ControlTypeAndPart>, _Alloc=std::allocator<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(516): note: see reference to function template instantiation 'void std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>>::_Copy_assign(const std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>> &,std::false_type)' being compiled with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>, _Hasher=std::hash<vcl::ControlTypeAndPart>, _Keyeq=std::equal_to<vcl::ControlTypeAndPart>, _Alloc=std::allocator<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\unordered_map(77): note: see reference to class template instantiation 'std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>>' being compiled with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>, _Hasher=std::hash<vcl::ControlTypeAndPart>, _Keyeq=std::equal_to<vcl::ControlTypeAndPart>, _Alloc=std::allocator<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>> ] C:\cygwin\home\user\lode\dev\core\vcl\inc\widgetdraw/WidgetDefinition.hxx(260): note: see reference to class template instantiation 'std::unordered_map<vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>,std::hash<vcl::ControlTypeAndPart>,std::equal_to<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>' being compiled with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): error C2280: 'std::pair<_Kty,_Ty> &std::pair<_Kty,_Ty>::operator =(volatile const std::pair<_Kty,_Ty> &)': attempting to reference a deleted function with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\utility(177): note: see declaration of 'std::pair<_Kty,_Ty>::operator =' with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\utility(177): note: 'std::pair<_Kty,_Ty> &std::pair<_Kty,_Ty>::operator =(volatile const std::pair<_Kty,_Ty> &)': function was explicitly deleted with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): error C2220: warning treated as error - no 'object' file generated C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): warning C4239: nonstandard extension used: 'argument': conversion from 'const std::pair<const _Kty,_Ty>' to 'volatile const std::pair<_Kty,_Ty> &' with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): note: A non-const reference may only be bound to an lvalue; assignment operator takes a reference to non-const C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(486): note: see reference to function template instantiation 'void std::list<std::pair<const _Kty,_Ty>,std::allocator<std::pair<const _Kty,_Ty>>>::_Assign_cast<std::pair<_Kty,_Ty>&,std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const _Kty,_Ty>>>,std::_Iterator_base0>>(_UIter,const _UIter)' being compiled with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>, _UIter=std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>>>,std::_Iterator_base0> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(485): note: see reference to function template instantiation 'void std::list<std::pair<const _Kty,_Ty>,std::allocator<std::pair<const _Kty,_Ty>>>::_Assign_cast<std::pair<_Kty,_Ty>&,std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const _Kty,_Ty>>>,std::_Iterator_base0>>(_UIter,const _UIter)' being compiled with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>, _UIter=std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>>>,std::_Iterator_base0> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(481): note: while compiling class template member function 'void std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>>::_Copy_assign(const std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>> &,std::false_type)' with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>, _Hasher=std::hash<vcl::ControlTypeAndPart>, _Keyeq=std::equal_to<vcl::ControlTypeAndPart>, _Alloc=std::allocator<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(516): note: see reference to function template instantiation 'void std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>>::_Copy_assign(const std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>> &,std::false_type)' being compiled with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>, _Hasher=std::hash<vcl::ControlTypeAndPart>, _Keyeq=std::equal_to<vcl::ControlTypeAndPart>, _Alloc=std::allocator<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\unordered_map(77): note: see reference to class template instantiation 'std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>>' being compiled with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>, _Hasher=std::hash<vcl::ControlTypeAndPart>, _Keyeq=std::equal_to<vcl::ControlTypeAndPart>, _Alloc=std::allocator<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>> ] C:\cygwin\home\user\lode\dev\core\vcl\inc\widgetdraw/WidgetDefinition.hxx(260): note: see reference to class template instantiation 'std::unordered_map<vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>,std::hash<vcl::ControlTypeAndPart>,std::equal_to<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>' being compiled with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): error C2280: 'std::pair<_Kty,_Ty> &std::pair<_Kty,_Ty>::operator =(volatile const std::pair<_Kty,_Ty> &)': attempting to reference a deleted function with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\utility(177): note: see declaration of 'std::pair<_Kty,_Ty>::operator =' with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\utility(177): note: 'std::pair<_Kty,_Ty> &std::pair<_Kty,_Ty>::operator =(volatile const std::pair<_Kty,_Ty> &)': function was explicitly deleted with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): error C2220: warning treated as error - no 'object' file generated C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): warning C4239: nonstandard extension used: 'argument': conversion from 'const std::pair<const _Kty,_Ty>' to 'volatile const std::pair<_Kty,_Ty> &' with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): note: A non-const reference may only be bound to an lvalue; assignment operator takes a reference to non-const C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(486): note: see reference to function template instantiation 'void std::list<std::pair<const _Kty,_Ty>,std::allocator<std::pair<const _Kty,_Ty>>>::_Assign_cast<std::pair<_Kty,_Ty>&,std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const _Kty,_Ty>>>,std::_Iterator_base0>>(_UIter,const _UIter)' being compiled with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>, _UIter=std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>>>,std::_Iterator_base0> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(485): note: see reference to function template instantiation 'void std::list<std::pair<const _Kty,_Ty>,std::allocator<std::pair<const _Kty,_Ty>>>::_Assign_cast<std::pair<_Kty,_Ty>&,std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const _Kty,_Ty>>>,std::_Iterator_base0>>(_UIter,const _UIter)' being compiled with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>, _UIter=std::_List_unchecked_const_iterator<std::_List_val<std::_List_simple_types<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>>>,std::_Iterator_base0> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(481): note: while compiling class template member function 'void std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>>::_Copy_assign(const std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>> &,std::false_type)' with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>, _Hasher=std::hash<vcl::ControlTypeAndPart>, _Keyeq=std::equal_to<vcl::ControlTypeAndPart>, _Alloc=std::allocator<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\xhash(516): note: see reference to function template instantiation 'void std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>>::_Copy_assign(const std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>> &,std::false_type)' being compiled with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>, _Hasher=std::hash<vcl::ControlTypeAndPart>, _Keyeq=std::equal_to<vcl::ControlTypeAndPart>, _Alloc=std::allocator<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\unordered_map(77): note: see reference to class template instantiation 'std::_Hash<std::_Umap_traits<_Kty,_Ty,std::_Uhash_compare<_Kty,_Hasher,_Keyeq>,_Alloc,false>>' being compiled with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart>, _Hasher=std::hash<vcl::ControlTypeAndPart>, _Keyeq=std::equal_to<vcl::ControlTypeAndPart>, _Alloc=std::allocator<std::pair<const vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>>> ] C:\cygwin\home\user\lode\dev\core\vcl\inc\widgetdraw/WidgetDefinition.hxx(260): note: see reference to class template instantiation 'std::unordered_map<vcl::ControlTypeAndPart,std::shared_ptr<vcl::WidgetDefinitionPart>,std::hash<vcl::ControlTypeAndPart>,std::equal_to<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>' being compiled with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\list(1076): error C2280: 'std::pair<_Kty,_Ty> &std::pair<_Kty,_Ty>::operator =(volatile const std::pair<_Kty,_Ty> &)': attempting to reference a deleted function with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\utility(177): note: see declaration of 'std::pair<_Kty,_Ty>::operator =' with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart> ] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\14.21.27702\Include\utility(177): note: 'std::pair<_Kty,_Ty> &std::pair<_Kty,_Ty>::operator =(volatile const std::pair<_Kty,_Ty> &)': function was explicitly deleted with [ _Kty=vcl::ControlTypeAndPart, _Ty=std::shared_ptr<vcl::WidgetDefinitionPart> ] make[1]: *** [C:/cygwin/home/user/lode/dev/core/solenv/gbuild/LinkTarget.mk:293: C:/cygwin/home/user/lode/dev/core/workdir/CxxObject/vcl/source/gdi/FileDefinitionWidgetDraw.o] Error 2 make[1]: *** Waiting for unfinished jobs.... make[1]: *** [C:/cygwin/home/user/lode/dev/core/solenv/gbuild/LinkTarget.mk:293: C:/cygwin/home/user/lode/dev/core/workdir/CxxObject/vcl/source/gdi/WidgetDefinition.o] Error 2 make[1]: *** [C:/cygwin/home/user/lode/dev/core/solenv/gbuild/LinkTarget.mk:293: C:/cygwin/home/user/lode/dev/core/workdir/CxxObject/vcl/source/gdi/WidgetDefinitionReader.o] Error 2 make: *** [Makefile:282: build] Error 2 Change-Id: I9273bf7bfd78848918c783b8237e76b59e2043cf Reviewed-on: https://gerrit.libreoffice.org/73196 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-05-30Resolves; ofz#14803 build failureCaolán McNamara
Change-Id: If94f77e8414ee83f49ae4dc05d26d7670524b75a Reviewed-on: https://gerrit.libreoffice.org/73197 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-30tdf#125548 Qt5 no focus for the menu bar buttonJan-Marek Glogowski
You can't tab into the menu bar, but if you add a corner widget, it will be enlisted in the parent's focus chain! Interestingly the menu bar even is considered to have the focus, if the widget is focused, and will handle key events, but this can probably be considered consistent. So this just denies the button any focus, as this is a mouse-only widget, and clicking it will close the document window. Change-Id: I3c48d85ca56b6a54daf01f444dddc736e7ebb8e7 Reviewed-on: https://gerrit.libreoffice.org/73186 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-05-29tdf#124694 gtk2 GtkFixed takes the max size of all its children...Caolán McNamara
as its preferred size, causing it to not clip its child, but try and grow instead to match Change-Id: Ibea269d475a4b35a43b6cab2ab432a830d8ff1ff Reviewed-on: https://gerrit.libreoffice.org/73168 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-29missing includeStephan Bergmann
Change-Id: I3357679d99a4ac2dab21867890140ab5ef2290ad Reviewed-on: https://gerrit.libreoffice.org/73177 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-29tdf#124694 gtk3 GtkFixed takes the max size of all its children...Caolán McNamara
as its preferred size, causing it to not clip its child, but grow instead to match Change-Id: I57f740177aae619d11966f5382a6cc5f7a964be3 Reviewed-on: https://gerrit.libreoffice.org/73167 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-29The iOS DataFlavorMapper::getAllSupportedPboardTypes() is unusedTor Lillqvist
Change-Id: Icc72fca62e189559956abc0ebbca9ce196a02073
2019-05-29tdf#124752: We do need to accept text/html from the system clipboardTor Lillqvist
Sadly we can't accept public.utf8-plain-text, i.e. text/plain;charset=utf-8, as the code does not know of such a SotClipboardFormatId. The only text/plain is UTF-16. And it probably is a good idea to accept HTML anyway. We have to continue to (I think) not offer text/html because of the assertion failure issue, see comment in DataFlavorMapper::openOfficeToSystemFlavor(). Change-Id: If5d77b97649424e347c50af10475c2be997c8632
2019-05-29Add a couple of SAL_INFOs about types available on the system clipboardTor Lillqvist
Change-Id: I821a699ee4f44881aadac89f265974a10095b544
2019-05-28tdf#124752: Simplify the iOS DataFlavorMapping thing a lotTor Lillqvist
Now it works to copy and paste images (PNG ones at least) between the iOS Collabora Office app and other apps. We don't seem to need the PNGDataProvider after all, as we use it only for data that is already in PNG format. Possibly I am missing somethin, though. Change-Id: Ia6bcc8aefbe1a6687f13e28454b96658fc66c856
2019-05-28tdf#124752: Use best speed for PNG encoding on iOSTor Lillqvist
Still awfully slow for "realistic" images as taken by modern digital cameras, though. It would be much better to not encode the PNG to put on the clipboard from the internal bitmap representation, but use the ooriginal PNG or JPEG data. Change-Id: Ib72a573bd31d4ae7380dacccb4287e19afabb0d4
2019-05-28Avoid -fsanitize=signed-integer-overflowStephan Bergmann
...with e.g. `--convert-to pdf abw/abi10006-1.abw` as obtained by bin/get-bugzilla-attachments-by-mimetype, reporting > vcl/source/fontsubset/cff.cxx:1697:63: runtime error: signed integer overflow: 55810 * 52845 cannot be represented in type 'int' and > vcl/source/fontsubset/cff.cxx:1137:38: runtime error: signed integer overflow: 233492066 * 52845 cannot be represented in type 'int' Using unsigned here is faithful to the algorithm presented in Chapter 7 Encryption of "Adobe Type 1 Font Format" (<http://wwwimages.adobe.com/ www.adobe.com/content/dam/acom/en/devnet/font/pdfs/T1_SPEC.pdf>). Change-Id: Ic27a5ebbe5f766fef425d241e14487ea4ae81da4 Reviewed-on: https://gerrit.libreoffice.org/73104 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-28Qt5 implement SalSurface support for cairoJan-Marek Glogowski
Current qt5+cairo uses the plain VCL canvas. This patch is just a copy of Gtk3Surface (minus comments) with a different update call. This way the Cairo path now uses the Cairo canvas instead. It fixes at least tdf#122668 for me, but other Impress bugs might be fixed this way too. Change-Id: Iba511c851001753328293c28e53eaa4acc4315d0 Reviewed-on: https://gerrit.libreoffice.org/72921 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins Reviewed-by: Aleksei Nikiforov <darktemplar@basealt.ru>
2019-05-28use after free in GtkInstanceWidget::signal_focus_inCaolán McNamara
https://gerrit.libreoffice.org/#/c/71829/ Change-Id: Ia98de7da7182ae35cbd83fdede89f3955ca45ece Reviewed-on: https://gerrit.libreoffice.org/73092 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-28tdf#124752: Add system clipboard interface for iOSTor Lillqvist
Based on the corresponding macOS code. Work in progress. The image support ifdeffed out still (because it uses some macOS specific APIs for which I couldn't right away find the equivalent iOS ones). I made it much simpler than the macOS code. I dropped the keeping of a local in-process clipboard completely. Firstly, as far as I see, the iOS clipboard API (UIPasteboard etc) does not even offer the possibility to separately offer some formats and actually provide the data on request. Secondly, we must be prepared anyway that the system can kill an iOS app at any stage while the user is using some other app, so we need to make sure everything that is copied goes onto the system clipboard right away anyway. I had to disable the copying of HTML to the clipboard as that lead to a mysterious assertion failure. See comment in DataFlavorMapper::openOfficeToSystemFlavor(). But RTF seems to work well, too. I assume RTF is what gets used for cross-application copy/paste (and cross-device, even, through Apple's Universal Clipboard thing, where you can copy/paste between your Macs and iOS devices on the same network). I am not sure how relevant the various application/x-openoffice-foo formats are. Change-Id: I174495e33d86fc3990996c229243c05d6cbfcda7
2019-05-27tdf#125271 under wayland without gtksink, try waylandsinkCaolán McNamara
and if there is no videosink then give up Change-Id: I6b60e7be1e77dbf5c4c277ccf47a4d121f3cd6a5 Reviewed-on: https://gerrit.libreoffice.org/72871 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-27Resolves: tdf#125490 use a single get_text impl for treeviewCaolán McNamara
Change-Id: Id9f74d8660fbd706251c9ea759b27a873b9113c6 Reviewed-on: https://gerrit.libreoffice.org/72988 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-26Related: tdf#125479 menu item might be emptyCaolán McNamara
Change-Id: I1b82e6495dcc64fde58498036f02f779a657301b Reviewed-on: https://gerrit.libreoffice.org/72981 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-24tdf#125472: fix RemoveTransparenciesFromMetaFile(vcl/gdi)Julien Nabet
Regression from: https://cgit.freedesktop.org/libreoffice/core/commit/?id=3ff0c23b54ba4e7a534693ba25a3ffb27d1c18e1 + some slight simplification Change-Id: Ifa9d4d7d27e80217f778f3625ef4437828600dd3 Reviewed-on: https://gerrit.libreoffice.org/72922 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-05-24tdf#101443 Calc multiline input bar reworkedThorsten Wagner
Change-Id: Ic35c9898624f0c13b6d64725808e765a64c17081 Reviewed-on: https://gerrit.libreoffice.org/71937 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2019-05-24cannot create a shared_ptr from an existing objectNoel Grandin
so pass in the shared_ptr we already have (and enforce that we pass in the right one) Change-Id: Ic481b5ec17c34ed9cba50586dedb6184505dee24 Reviewed-on: https://gerrit.libreoffice.org/72908 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-24A CALCINPUTLINE is not an EditStephan Bergmann
Under ASan, clicking into the Calc "input line" control (in the toolbars) caused > ==26138==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x616000107a4c at pc 0x7fc890d792cb bp 0x7fff4cab6d90 sp 0x7fff4cab6d88 > READ of size 1 at 0x616000107a4c thread T0 > #0 in Edit::IsPassword() const at include/vcl/edit.hxx:285:38 > #1 in vcl::Window::getDefaultAccessibleRole() const at vcl/source/window/accessibility.cxx:327:73 [...] > 0x616000107a4c is located 116 bytes to the right of 600-byte region [0x616000107780,0x6160001079d8) > allocated by thread T0 here: > #0 in operator new(unsigned long) at /data/sbergman/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cc:105:3 > #1 in VclPtr<ScInputBarGroup> VclPtr<ScInputBarGroup>::Create<vcl::Window*&, ScTabViewShell*&>(vcl::Window*&, ScTabViewShell*&) at include/vcl/vclptr.hxx:129:42 > #2 in lcl_chooseRuntimeImpl(vcl::Window*, SfxBindings const*) at sc/source/ui/app/inputwin.cxx:157:12 This looks like it got broken with cca4d9ab39499562614f0f778a2fffe5a40fde88 "convert WB_PASSWORD to a bool field on Edit" assuming that a Window of type CALCINPUTLINE derives from Edit, even though ScInputBarGroup does not. Change-Id: I1457c6cd07477ee0fa868c3949105aa96116a366 Reviewed-on: https://gerrit.libreoffice.org/72893 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-24tdf#125160: honour keyboard modifiers if used during DnDKatarina Behrens
e.g. copy-DnD with Ctrl held down. This is qt5 remix of tdf#109227 Change-Id: Ib0794c7468cc04d3d50686952305717e10c90c9a Reviewed-on: https://gerrit.libreoffice.org/72878 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-05-23Drop default values for parameters that are defaulted only onceTor Lillqvist
Seriously, such default values only serve to confuse the code reader. Change-Id: I478442514baac3159ea0ae20132222ae58b38b8c
2019-05-23add comment to document upstream bugCaolán McNamara
Change-Id: I2814c6b0ccb1198bc83f79e63a8a1713d8df32cd Reviewed-on: https://gerrit.libreoffice.org/72834 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-23weld FloatingContourCaolán McNamara
Change-Id: I055f01d2ce462009986801d4a603b0b72b1a621c Reviewed-on: https://gerrit.libreoffice.org/72787 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-23MouseRelease is expected to have n-clicks of last MousePressCaolán McNamara
otherwise the IMapWnd and CountourWindow don't accept the double-click release as finishing polygon editing Change-Id: Iaab7a46cad2c5c92fdc2f8ff61135792fae67be8 Reviewed-on: https://gerrit.libreoffice.org/72830 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-23tdf#125388 disable gtk callback that makes long combobox menus unusableCaolán McNamara
Change-Id: Ic5cb575189984246365d8a1067e61ea84eaa5dce Reviewed-on: https://gerrit.libreoffice.org/72768 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-23Fix moving / orientation-changing ScrollBarJan-Marek Glogowski
Just implements Move the same way then Resize. More importantly the patch correctly resets the Thumb and Page rectangles to position (0,0) instead of just Empty, which ImplCalc is based on. Otherwise this results in broken scroll bars, when the StarMath elements window is docked in in the bottom or top area and switches the scrolling orientation on undock. Change-Id: I32b0507cdd6551cc7f42655a730faf8ef25b747b Reviewed-on: https://gerrit.libreoffice.org/72794 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-05-22VCL refactor duplicate code in ToolboxJan-Marek Glogowski
Moves duplicate code from ImplInitSettings and ApplySettings into their own functions. Change-Id: I65b5a052b171a661ee22762e373745c28779a9e9 Reviewed-on: https://gerrit.libreoffice.org/72790 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-05-22VCL replace some code with common function callsJan-Marek Glogowski
Replaces some code with calls to ApplyControlForeground and ApplyControlFont. Change-Id: I16837ad7c48ed46fa48b1f2a33a84c7e94f63482 Reviewed-on: https://gerrit.libreoffice.org/72789 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-05-22VCL keep / return the original set TextEngine fontJan-Marek Glogowski
TextEngine::SetFont copies the font parameter and then modifies its color, transparency, fill color and alignment, so passing the same font again will not be detected as the same font. Therefore this patch stores the original font in addition to the modified one and also returns that one on the GetFont call. This allows us to merge the font setup in VclMultiLineEdit's ImplInitSettings and ApplySettings into a common function. Change-Id: I618d283ecd0ae14faf9b87a3aceec6ca1c37b526 Reviewed-on: https://gerrit.libreoffice.org/72788 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-05-22tdf#108909 vcl menu bar window: fix missing highlight on mouse overMiklos Vajna
Regression from commit 458a827e96523ac52d021f1fd3653b5a734940c0 (further refactor Menu to use RenderContext, 2015-05-15), the problem was that this highlight on the menu bar on mouse move was only part of the incremental paint, never the full paint. So when that commit removed incremental paint, we lost highlight on mouse move (move only, click is there). Later commit 843b9d5dba5098c2676491dda66bed31e57f4329 (VCL add support for rollover menubars, 2016-09-22) added this code back, conditionally for the case when there is not enough space for the menu bar horizontally. So fix the lack of highlight on plain mouse move by unconditionally highlighting the rolled over item, even if there is enough horizontal space. Change-Id: I357001f2e65f843444ed0ffbe470667dfc5d5aa3 Reviewed-on: https://gerrit.libreoffice.org/72774 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-05-22New loplugin:dataStephan Bergmann
...following up on 1453c2c8f13bac64ecd1981af7cebf1c421808ac "prefer vector::data to &vector[0]" Change-Id: I7c113747d92d144a521d49b89384dd8bf1215c01 Reviewed-on: https://gerrit.libreoffice.org/72765 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-22tdf#120837 File saving at least 5 times slowerNoel Grandin
The problem here is that we never actually hit the maExportGraphics cache in SvXMLGraphicHelper, even though we are passing the same image down repeatedly. There are two bugs here: (1) BitmapEx::operator== does not return true if we instantiate 2 Graphic objects from the same XGraphic, so change it to use the more expensive operator==. To mitigate the cost, move the expensive checks to the bottom of the method. (2) in order to use an object in std::unordered_map, the object must implement an equality function and a hash function. If two objects are equal THEY MUST have the same hash value. Using the Impl* as the hash value does not satisfy that condition, so rather use the checksum, which does. After these fixes, the save time drops to less than a second. Also make the checksum method look more like the operator== method, and add a checksum calculation method for SVG data that more accurately reflects the underlying SVG data. Change-Id: I4ca0c7bee60b2efa6fe42301e582c7b278022b46 Reviewed-on: https://gerrit.libreoffice.org/72615 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-22tdf#124271 use the bitmap context, handle scalingTomaž Vajngerl
The problem with latest macOS versions is that creating a graphic context with window (NSGraphicsContext graphicsContextWithWindow:) only works when actually drawing and otherwise it returns null. This caused problems before in AquaVrtualDevice, but we also use this when creating a device backing storage. This interestingly caused slowdowns and eventual crash, but the backtrace looked very misterious as it didn't crash because of a nullptr, but it halted all drawing commands and it crashed because of that. This changes the graphic context with a bitmap context, as it was already done in VirtualDevice and use that instead. The problem with a bitmap context is that we need to handle HiDPI scaling by ourselves now. LayerHolder was extended to store the scaling information of the layer (and its underlaying bitmap context) and provides methods that get the size of the layer in pixels or in scaling independent points (which is just size in pixels multiplied by the scaling factor). An known issue is that VirtualDevice also needs to take scaling into account, which it currently doesn't, so the text is still blurry on a HiDPI screen, but that was already true previously and is something that will be done in a different change. Change-Id: I8e10c518ecba285125746bd20525c4cb5ca67279 Reviewed-on: https://gerrit.libreoffice.org/72663 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-05-22widgettheme: support multiple spinbox orientationsTomaž Vajngerl
This adds the ability to define the spinbox orientation that has decrease and increase buttons on the right side and can be changed by adding "orientation="edit-decrease-increase" to the Spinbox "Entire" part in the widget definition. Change-Id: I3601a987a4abb8d998e9cd2d8973d794d3d66f9b Reviewed-on: https://gerrit.libreoffice.org/72662 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-05-21tdf#125415 vcl menu floating window: avoid flickerMiklos Vajna
This is similar to e8d5b8beb5958147235ff955ed38c47b51d860ff (tdf#113714 vcl menu bar window: avoid flicker, 2019-05-20), except that was for the menu bar window, and this is for the floating window opening from that one. Change-Id: Ib24f4999ad3e8cbbecc058368e9d112e106e9178 Reviewed-on: https://gerrit.libreoffice.org/72688 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-05-21tdf#109158 short-circuit text width measuring with fixed width columnsCaolán McNamara
Change-Id: Id050bfa8b4dae70e2a3a45b2501bb071d82d14e5 Reviewed-on: https://gerrit.libreoffice.org/72601 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-21tdf#125413 vcl menu bar window: fix non-NWF backgroundMiklos Vajna
Windows (by default) and gtk3 paints its own background, but e.g. the Linux gen backend does not; so make sure that we not only copy from the buffer, but also initialize it. This restores the gradient background of the main menu with the Linux gen backend. Change-Id: I5ce8cc734f64bc1d57d343caf22071e6aa63a69f Reviewed-on: https://gerrit.libreoffice.org/72676 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-05-21tdf#124027: use ID of the embedded window and fix position of overlayKatarina Behrens
1) after many trials and errors what LibO apparently expects here is the ID of QWindow parent of [embedded] system child window 2) the position of the embedded window for video overlay has already been translated relative to the top-left corner of the slide (see bugfix of tdf#42873 how) in gen, gtk and kde5 vclplugs. So let's limit translating it 2nd time only to gtk3 vclplug which for some reason behaves differently (regression from 18138417485aeba6c52d935c616dba829b24ffd8) Change-Id: Ie4c6d14a50959c0fdd04e745918d4889c9da45ec Reviewed-on: https://gerrit.libreoffice.org/72458 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-05-21route delete-event through cancel handler if availableCaolán McNamara
for sync gtk dialogs too Change-Id: Iad40c539a663504d72f372a0d3b4427a23e717c4 Reviewed-on: https://gerrit.libreoffice.org/72626 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-21Resolves: tdf#125394 consider unwelded dialogsCaolán McNamara
Change-Id: Ic66a622bb8b5481656ffe8e29a345a435042402e Reviewed-on: https://gerrit.libreoffice.org/72625 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>