i18nlangtag/source/languagetag/languagetag.cxx | 8 ++ i18npool/source/collator/collator_unicode.cxx | 26 +++++++- include/basegfx/matrix/b2dhommatrix.hxx | 27 +++++++++ sfx2/source/dialog/tabdlg.cxx | 5 + svtools/source/control/valueset.cxx | 35 +++++++++++ sw/source/uibase/shells/drwbassh.cxx | 53 ++++++++++++++---- vcl/source/filter/graphicfilter.cxx | 4 - vcl/source/window/builder.cxx | 30 +++++++--- writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 1 9 files changed, 165 insertions(+), 24 deletions(-)
New commits: commit 0442381173c5345f0809e6fdedc1b81fd3a6f1aa Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Wed Mar 11 22:44:25 2020 +0100 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Thu May 14 18:18:25 2020 +0100 Blind fix for Android Tinderbox build ... which failed as follows, which looks related to commit 6d9a31a58c2b55c0caef10c8bbb3d75147c2476f ("android: Use the best speed compression as on iOS"), s. [1] for full log: 12883 [build CXX] vcl/source/pdf/XmpMetadata.cxx 12884 In file included from /home/android/lo/master-android-arm/vcl/source/filter/graphicfilter.cxx:24: 12885 In file included from /home/android/lo/master-android-arm/include/comphelper/processfactory.hxx:23: 12886 In file included from /home/android/lo/master-android-arm/include/com/sun/star/uno/Reference.hxx:28: 12887 In file included from /home/android/lo/master-android-arm/workdir/UnoApiHeadersTarget/udkapi/comprehensive/com/sun/star/uno/RuntimeException.hpp:8: 12888 In file included from /home/android/lo/master-android-arm/workdir/UnoApiHeadersTarget/udkapi/comprehensive/com/sun/star/uno/Exception.hpp:8: 12889 In file included from /home/android/lo/master-android-arm/workdir/UnoApiHeadersTarget/udkapi/comprehensive/com/sun/star/uno/XInterface.hpp:6: 12890 In file included from /home/android/lo/master-android-arm/workdir/UnoApiHeadersTarget/udkapi/comprehensive/com/sun/star/uno/XInterface.hdl:6: 12891 In file included from /home/android/lo/master-android-arm/include/com/sun/star/uno/Any.h:29: 12892 NEXT /home/android/lo/master-android-arm/include/cppu/unotype.hxx:296:16: error: no matching function for call to ´cppu_detail_getUnoType´ 12893 return cppu_detail_getUnoType(static_cast< T1 * >(0)); 12894 ^~~~~~~~~~~~~~~~~~~~~~ 12895 /home/android/lo/master-android-arm/include/cppu/unotype.hxx:321:34: note: in instantiation of member function ´cppu::UnoType<int>::get´ requested here 12896 return ::cppu::UnoType< T >::get(); 12897 ^ 12898 /home/android/lo/master-android-arm/include/com/sun/star/uno/Any.hxx:276:34: note: in instantiation of function template specialization ´cppu::getTypeFavourUnsigned<int>´ requested here 12899 const Type & rType = ::cppu::getTypeFavourUnsigned(&value); 12900 ^ 12901 /home/android/lo/master-android-arm/vcl/source/filter/graphicfilter.cxx:2216:60: note: in instantiation of function template specialization ´com::sun::star::uno::operator<<=<int>´ requested here 12902 aFilterData[aFilterData.getLength() - 1].Value <<= 1; 12903 ^ 12904 /home/android/lo/master-android-arm/include/cppu/unotype.hxx:120:1: note: candidate function not viable: no known conversion from ´T1 *´ (aka ´int *´) to ´const ::cppu::UnoVoidType *´ for 1st argument 12905 cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::cppu::UnoVoidType const *) { 12906 ^ 12907 /home/android/lo/master-android-arm/include/cppu/unotype.hxx:125:1: note: candidate function not viable: no known conversion from ´T1 *´ (aka ´int *´) to ´const bool *´ for 1st argument 12908 cppu_detail_getUnoType(SAL_UNUSED_PARAMETER bool const *) { 12909 ^ 12910 /home/android/lo/master-android-arm/include/cppu/unotype.hxx:130:1: note: candidate function not viable: no known conversion from ´T1 *´ (aka ´int *´) to ´const sal_Bool *´ (aka ´const unsigned char *´) for 1st argument 12911 cppu_detail_getUnoType(SAL_UNUSED_PARAMETER sal_Bool const *) { 12912 ^ 12913 /home/android/lo/master-android-arm/include/cppu/unotype.hxx:135:1: note: candidate function not viable: no known conversion from ´T1 *´ (aka ´int *´) to ´const ::sal_Int8 *´ (aka ´const signed char *´) for 1st argument 12914 cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::sal_Int8 const *) { 12915 ^ 12916 /home/android/lo/master-android-arm/include/cppu/unotype.hxx:140:1: note: candidate function not viable: no known conversion from ´T1 *´ (aka ´int *´) to ´const ::sal_Int16 *´ (aka ´const short *´) for 1st argument 12917 cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::sal_Int16 const *) { 12918 ^ 12919 /home/android/lo/master-android-arm/include/cppu/unotype.hxx:145:1: note: candidate function not viable: no known conversion from ´T1 *´ (aka ´int *´) to ´const ::cppu::UnoUnsignedShortType *´ for 1st argument 12920 cppu_detail_getUnoType( 12921 ^ 12922 /home/android/lo/master-android-arm/include/cppu/unotype.hxx:155:1: note: candidate function not viable: no known conversion from ´T1 *´ (aka ´int *´) to ´const sal_uInt16 *´ (aka ´const unsigned short *´) for 1st argument 12923 cppu_detail_getUnoType(SAL_UNUSED_PARAMETER sal_uInt16 const *) { 12924 ^ 12925 /home/android/lo/master-android-arm/include/cppu/unotype.hxx:161:1: note: candidate function not viable: no known conversion from ´T1 *´ (aka ´int *´) to ´const ::sal_Int32 *´ (aka ´const long *´) for 1st argument 12926 cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::sal_Int32 const *) { 12927 ^ 12928 /home/android/lo/master-android-arm/include/cppu/unotype.hxx:166:1: note: candidate function not viable: no known conversion from ´T1 *´ (aka ´int *´) to ´const ::sal_uInt32 *´ (aka ´const unsigned long *´) for 1st argument 12929 cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::sal_uInt32 const *) { 12930 ^ 12931 /home/android/lo/master-android-arm/include/cppu/unotype.hxx:172:1: note: candidate function not viable: no known conversion from ´T1 *´ (aka ´int *´) to ´const ::sal_Int64 *´ (aka ´const long long *´) for 1st argument 12932 cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::sal_Int64 const *) { 12933 ^ 12934 /home/android/lo/master-android-arm/include/cppu/unotype.hxx:177:1: note: candidate function not viable: no known conversion from ´T1 *´ (aka ´int *´) to ´const ::sal_uInt64 *´ (aka ´const unsigned long long *´) for 1st argument 12935 cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::sal_uInt64 const *) { 12936 ^ 12937 /home/android/lo/master-android-arm/include/cppu/unotype.hxx:183:1: note: candidate function not viable: no known conversion from ´T1 *´ (aka ´int *´) to ´const float *´ for 1st argument 12938 cppu_detail_getUnoType(SAL_UNUSED_PARAMETER float const *) { 12939 ^ 12940 /home/android/lo/master-android-arm/include/cppu/unotype.hxx:188:1: note: candidate function not viable: no known conversion from ´T1 *´ (aka ´int *´) to ´const double *´ for 1st argument 12941 cppu_detail_getUnoType(SAL_UNUSED_PARAMETER double const *) { 12942 ^ 12943 /home/android/lo/master-android-arm/include/cppu/unotype.hxx:193:1: note: candidate function not viable: no known conversion from ´T1 *´ (aka ´int *´) to ´const ::cppu::UnoCharType *´ for 1st argument 12944 cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::cppu::UnoCharType const *) { 12945 ^ 12946 /home/android/lo/master-android-arm/include/cppu/unotype.hxx:200:1: note: candidate function not viable: no known conversion from ´T1 *´ (aka ´int *´) to ´const sal_Unicode *´ (aka ´const char16_t *´) for 1st argument 12947 cppu_detail_getUnoType(SAL_UNUSED_PARAMETER sal_Unicode const *) { 12948 ^ 12949 /home/android/lo/master-android-arm/include/cppu/unotype.hxx:206:1: note: candidate function not viable: no known conversion from ´T1 *´ (aka ´int *´) to ´const ::rtl::OUString *´ for 1st argument 12950 cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::rtl::OUString const *) { 12951 ^ 12952 /home/android/lo/master-android-arm/include/cppu/unotype.hxx:211:1: note: candidate function not viable: no known conversion from ´T1 *´ (aka ´int *´) to ´const css::uno::Type *´ for 1st argument 12953 cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::uno::Type const *) 12954 ^ 12955 /home/android/lo/master-android-arm/include/cppu/unotype.hxx:217:1: note: candidate function not viable: no known conversion from ´T1 *´ (aka ´int *´) to ´const css::uno::Any *´ for 1st argument 12956 cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::uno::Any const *) 12957 ^ 12958 NEXT /home/android/lo/master-android-arm/include/cppu/unotype.hxx:243:31: note: candidate function not viable: no known conversion from ´T1 *´ (aka ´int *´) to ´const css::uno::Exception *´ for 1st argument 12959 inline css::uno::Type const & cppu_detail_getUnoType( 12960 ^ 12961 /home/android/lo/master-android-arm/include/cppu/unotype.hxx:249:31: note: candidate function not viable: no known conversion from ´T1 *´ (aka ´int *´) to ´const css::uno::XInterface *´ for 1st argument 12962 inline css::uno::Type const & cppu_detail_getUnoType( 12963 ^ 12964 NEXT /home/android/lo/master-android-arm/include/cppu/unotype.hxx:223:1: note: candidate template ignored: could not match ´UnoSequenceType<type-parameter-0-0>´ against ´int´ 12965 cppu_detail_getUnoType( 12966 ^ 12967 NEXT /home/android/lo/master-android-arm/include/cppu/unotype.hxx:236:1: note: candidate template ignored: could not match ´Sequence<type-parameter-0-0>´ against ´int´ 12968 cppu_detail_getUnoType( 12969 ^ 12970 NEXT /home/android/lo/master-android-arm/include/cppu/unotype.hxx:256:1: note: candidate template ignored: could not match ´Reference<type-parameter-0-0>´ against ´int´ 12971 cppu_detail_getUnoType( 12972 ^ 12973 NEXT 1 error generated. 12974 [build CXX] vcl/source/uitest/logger.cxx [1] https://tinderbox.libreoffice.org/cgi-bin/gunzip.cgi?tree=MASTER&full-log=1583961601.24939 Change-Id: I098c21bc492f734115ae0e91f095ef542851c2ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90352 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 4a5963f8d377..d1bd6cff4508 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -2281,7 +2281,7 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData&, rData, bool ) aFilterData.realloc(aFilterData.getLength() + 1); aFilterData[aFilterData.getLength() - 1].Name = "Compression"; // We "know" that this gets passed to zlib's deflateInit2_(). 1 means best speed. - aFilterData[aFilterData.getLength() - 1].Value <<= 1; + aFilterData[aFilterData.getLength() - 1].Value <<= sal_uInt32(1); } #endif nFormat = GetExportFormatNumberForShortName( OStringToOUString(aShortName, RTL_TEXTENCODING_UTF8) ); commit b5bb57f8bd94636fe078125b3cd14130f7a7b05f Author: Jan Holesovsky <ke...@collabora.com> AuthorDate: Tue Mar 10 15:04:43 2020 +0100 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Thu May 14 18:17:49 2020 +0100 android: Use the best speed compression as on iOS. Change-Id: Ib2be570a924c6ac6e226f47e6b183975df1fca2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90258 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Jan Holesovsky <ke...@collabora.com> (cherry picked from commit 07fb148971b6853c2020cea6660fa62d6caacb85) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90281 Tested-by: Jenkins diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 468ff983c4f2..4a5963f8d377 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -2275,7 +2275,7 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData&, rData, bool ) else if( !aShortName.isEmpty() ) { // Export -#ifdef IOS +#if defined(IOS) || defined(ANDROID) if (aShortName == PNG_SHORTNAME) { aFilterData.realloc(aFilterData.getLength() + 1); commit bbaaf2aa27b0c59da00dd17a8bf2d67ae1bb4d14 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> AuthorDate: Fri May 24 09:11:11 2019 -0400 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Thu May 14 18:06:53 2020 +0100 sfx2: LOK: disable the Reset button from tabbed dialogs The reset functionality seems to be confusing to more than one user. Their expectation isn't always matching the functionality, perhaps because it has rough edges(?). Disabling for LOK to avoid this; users can Cancel and start over if they wish to do (which is what the Reset button is supposed to do in effect). (cherry picked from commit c3c28235cf1f853e644250ba110b2715a270a8b5) Change-Id: I4a744dd0263ab72a5858746c1f3572e62990a13b Reviewed-on: https://gerrit.libreoffice.org/83630 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index a85f4ea1368e..273eaaf03917 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -38,6 +38,7 @@ #include <vcl/virdev.hxx> #include <sal/log.hxx> #include <osl/diagnose.h> +#include <comphelper/lok.hxx> #include <sfx2/strings.hrc> #include <helpids.h> @@ -349,6 +350,10 @@ SfxTabDialogController::SfxTabDialogController m_xExampleSet.reset(new SfxItemSet(*m_pSet)); m_pOutSet.reset(new SfxItemSet(*m_pSet->GetPool(), m_pSet->GetRanges())); } + + // The reset functionality seems to be confusing to many; disable in LOK. + if (comphelper::LibreOfficeKit::isActive()) + RemoveResetButton(); } IMPL_LINK_NOARG(SfxTabDialogController, OkHdl, weld::Button&, void) commit d07fd668b70af96eac6bd77054c0b488e2984ee2 Author: Jan Holesovsky <ke...@collabora.com> AuthorDate: Fri Oct 4 11:01:31 2019 +0200 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Thu May 14 18:06:21 2020 +0100 lok preload: Some symbols are in-process when we need them. But OTOH in the preload case, the libraries we'd otherwise load are not there. An example was libcuilo.so where the instantiation of the spell checking dialog was failing, because it was impossible to find the makeSentenceEditWindow symbol. Change-Id: Ifc0bc5d8b295912728505fe3ce11fa4a0d198124 Reviewed-on: https://gerrit.libreoffice.org/80229 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <ke...@collabora.com> diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 0765c7e19292..184313b8c12c 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -67,7 +67,7 @@ #include <comphelper/lok.hxx> #include <jsdialog/jsdialogbuilder.hxx> -#ifdef DISABLE_DYNLOADING +#if defined(DISABLE_DYNLOADING) || defined(LINUX) #include <dlfcn.h> #endif @@ -1666,8 +1666,8 @@ VclBuilder::customMakeWidget GetCustomMakeWidget(const OString& name) VclBuilder::customMakeWidget pFunction = nullptr; if (sal_Int32 nDelim = name.indexOf('-'); nDelim != -1) { - const OUString sFunction("make" - + OStringToOUString(name.copy(nDelim + 1), RTL_TEXTENCODING_UTF8)); + const OString aFunction("make" + name.copy(nDelim + 1)); + const OUString sFunction(OStringToOUString(aFunction, RTL_TEXTENCODING_UTF8)); #ifndef DISABLE_DYNLOADING const OUString sModule = SAL_DLLPREFIX @@ -1688,10 +1688,26 @@ VclBuilder::customMakeWidget GetCustomMakeWidget(const OString& name) { pModule.reset(new NoAutoUnloadModule); bool ok = pModule->loadRelative(&thisModule, sModule); - assert(ok && "bad module name in .ui"); - (void)ok; - pFunction = reinterpret_cast<VclBuilder::customMakeWidget>( - pModule->getFunctionSymbol(sFunction)); + if (!ok) + { +#ifdef LINUX + // in the case of preloading, we don't have eg. the + // libcuilo.so, but still need to dlsym the symbols - + // which are already in-process + if (comphelper::LibreOfficeKit::isActive()) + { + pFunction = reinterpret_cast<VclBuilder::customMakeWidget>(dlsym(RTLD_DEFAULT, aFunction.getStr())); + ok = !!pFunction; + assert(ok && "couldn't even directly dlsym the sFunction (available via preload)"); + } +#endif + assert(ok && "bad module name in .ui"); + } + else + { + pFunction = reinterpret_cast<VclBuilder::customMakeWidget>( + pModule->getFunctionSymbol(sFunction)); + } } g_aModuleMap.insert(std::make_pair(sModule, pModule)); } commit c50754904553471f799bb3902631a89c2c8c666a Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Mon Mar 16 13:45:20 2020 +0100 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Thu May 14 18:04:32 2020 +0100 DOCX import: declare w14 as a supported feature This is needed (but not enough) to support markup like this: <mc:AlternateContent> <mc:Choice Requires="w14"> <w:numFmt w:val="custom" w:format="001, 002, 003, ..."/> </mc:Choice> <mc:Fallback> <w:numFmt w:val="decimal"/> </mc:Fallback> </mc:AlternateContent> Change-Id: I598b0452b5d29624ed0a6795682c29a09fd0dcfe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90564 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 19dc3bb917e0..6359cb3b044d 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -123,6 +123,7 @@ bool OOXMLFastContextHandler::prepareMceContext(Token_t nElement, const uno::Ref static const char* aFeatures[] = { "wps", "wpg", + "w14", }; for (const char *p : aFeatures) { commit e5b4b90efefb479954f0148dd909d753ca1eb499 Author: Jan Holesovsky <ke...@collabora.com> AuthorDate: Fri Jan 31 21:35:30 2020 +0100 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Thu May 14 18:03:45 2020 +0100 android: Set the correct path for the liblangtag data. Change-Id: I8b8bf76f086812c5f995c6ef513f0b7f773475ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87787 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <ke...@collabora.com> diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx index 7f580dfc9dd3..48349ae3fecb 100644 --- a/i18nlangtag/source/languagetag/languagetag.cxx +++ b/i18nlangtag/source/languagetag/languagetag.cxx @@ -31,6 +31,10 @@ #endif #include <liblangtag/langtag.h> +#ifdef ANDROID +#include <osl/detail/android-bootstrap.h> +#endif + using namespace com::sun::star; @@ -198,6 +202,9 @@ void LiblangtagDataRef::teardown() void LiblangtagDataRef::setupDataPath() { +#if defined(ANDROID) + maDataPath = OString(lo_get_app_data_dir()) + "/share/liblangtag"; +#else // maDataPath is assumed to be empty here. OUString aURL("$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/liblangtag"); rtl::Bootstrap::expandMacros(aURL); //TODO: detect failure @@ -212,6 +219,7 @@ void LiblangtagDataRef::setupDataPath() if (osl::FileBase::getSystemPathFromFileURL( aURL, aPath) == osl::FileBase::E_None) maDataPath = OUStringToOString( aPath, RTL_TEXTENCODING_UTF8); } +#endif if (maDataPath.isEmpty()) maDataPath = "|"; // assume system else commit d575a9476fa4ca859604544ce61ad727cef88d3d Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Sat Mar 28 20:15:00 2020 +0100 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Thu May 14 17:41:49 2020 +0100 basegfx: add convenience access. and creator to B2DHomMatrix In SVG, CSS, HTML Canvas it is usual to define a matrix with a,b,c,d,e,f attributes, where the values correcpond to the following: [a,c,e] [b,d,f] [0,0,1] This change adds accessors and creator to B2DHomMatrix, so it is easier to deal with other matrices that are defined like that. Change-Id: I6927513b1a70ad5eb70d7fe14a00de4a767f176a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91310 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/include/basegfx/matrix/b2dhommatrix.hxx b/include/basegfx/matrix/b2dhommatrix.hxx index 9f2c8a338412..0015b2a78fce 100644 --- a/include/basegfx/matrix/b2dhommatrix.hxx +++ b/include/basegfx/matrix/b2dhommatrix.hxx @@ -47,6 +47,33 @@ namespace basegfx B2DHomMatrix(B2DHomMatrix&& rMat); ~B2DHomMatrix(); + /** Convenience creator for declaration of the matrix that is commonly + used by web standards (SVG, CSS, HTML). + + Values a,b,c,d,e,f represent the following values in the matrix: + [a,c,e] [a,c,e] + [b,d,f] or [b,d,f] + [0,0,1] + + */ + static B2DHomMatrix abcdef(double da, double db, double dc, double dd, double de, double df) + { + return B2DHomMatrix(da, dc, de, db, dd, df); + } + + // Convenience accessor for value at 0,0 position in the matrix + double a() { return get(0,0); } + // Convenience accessor for value at 1,0 position in the matrix + double b() { return get(1,0); } + // Convenience accessor for value at 0,1 position in the matrix + double c() { return get(0,1); } + // Convenience accessor for value at 1,1 position in the matrix + double d() { return get(1,1); } + // Convenience accessor for value at 0,2 position in the matrix + double e() { return get(0,2); } + // Convenience accessor for value at 1,2 position in the matrix + double f() { return get(1,2); } + /** constructor to allow setting all needed values for a 3x2 matrix at once. The parameter f_0x1 e.g. is the same as using set(0, 1, f) */ commit b0281ee157cf0fa6532e8f58be126bdc223a16f9 Author: Henry Castro <hcas...@collabora.com> AuthorDate: Fri Nov 22 18:25:00 2019 -0400 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Thu May 14 17:40:51 2020 +0100 svtools: encode Base64 the images of the items of the control "ValueSet" Unfortunately the "Table Design" panel has a "ValueSet" control with images constructed with the function "CreateDesignPreview". I have no other choice to export the images to base64 and send it to client. Perhaps later we can optimize the function "CreateDesignPreview", to accept SVG pattern or something related. Change-Id: I34bc8374ffd2a16fbb8fbc2fcd6a41a96bda57a5 Reviewed-on: https://gerrit.libreoffice.org/83538 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Henry Castro <hcas...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/83687 Tested-by: Jenkins diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 46e1b78b2b05..6b8802ac159a 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -18,11 +18,15 @@ */ #include <tools/debug.hxx> +#include <tools/stream.hxx> +#include <comphelper/base64.hxx> #include <vcl/builderfactory.hxx> #include <vcl/decoview.hxx> #include <vcl/event.hxx> +#include <vcl/graph.hxx> #include <vcl/svapp.hxx> #include <vcl/scrbar.hxx> +#include <vcl/cvtgrf.hxx> #include <vcl/help.hxx> #include <vcl/settings.hxx> #include <vcl/commandevent.hxx> @@ -1440,6 +1444,9 @@ boost::property_tree::ptree ValueSet::DumpAsPropertyTree() boost::property_tree::ptree aTree(Control::DumpAsPropertyTree()); boost::property_tree::ptree aEntries; + ErrCode nErrCode; + OUStringBuffer aBuffer; + SvMemoryStream aStream; const size_t nSize = mItemList.size(); for ( size_t nIt = 0; nIt < nSize; ++nIt ) @@ -1447,8 +1454,32 @@ boost::property_tree::ptree ValueSet::DumpAsPropertyTree() boost::property_tree::ptree aEntry; ValueSetItem* pItem = mItemList[nIt].get(); aEntry.put("id", pItem->mnId); - aEntry.put("image", pItem->maImage.GetStock()); - if (mnSelItemId == pItem->mnId) { + if ( !pItem->maImage.GetStock().isEmpty() ) + { + aEntry.put("image", pItem->maImage.GetStock()); + } + else + { + Graphic aGraphic(pItem->maImage); + + nErrCode = GraphicConverter::Export(aStream, aGraphic, ConvertDataFormat::PNG); + if ( nErrCode ) + { + SAL_WARN("svtools", "GraphicConverter::Export() invalid Graphic? error: " << nErrCode ); + } + else + { + css::uno::Sequence<sal_Int8> aSeq(static_cast<sal_Int8 const *>(aStream.GetData()), aStream.TellEnd()); + aStream.Seek(0); + + aBuffer.append("data:image/png;base64,"); + ::comphelper::Base64::encode(aBuffer, aSeq); + aEntry.put("image64", aBuffer.makeStringAndClear().toUtf8()); + } + } + + if (mnSelItemId == pItem->mnId) + { aEntry.put("selected", true); } commit 445bf37433cb0522ca5d6e18738ed0ce1b2726d7 Author: Dennis Francis <dennis.fran...@collabora.com> AuthorDate: Fri Feb 7 12:49:59 2020 +0530 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Thu May 14 17:40:26 2020 +0100 Get the align states of draw-shapes in... SwDrawBaseShell::GetState() so that the align buttons are informed (in core desktop and online via statechange messages) Change-Id: Ic69fb03bc98f39b1a6a389d50d3d6404fefd7f29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88159 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88453 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index d0d4cba2cba8..277b5e092e04 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -700,18 +700,53 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet) case SID_OBJECT_ALIGN_MIDDLE: case SID_OBJECT_ALIGN_DOWN: case SID_OBJECT_ALIGN: - if ( !rSh.IsAlignPossible() || bProtected ) - rSet.DisableItem( nWhich ); - else if ( rSh.GetAnchorId() == RndStdIds::FLY_AS_CHAR ) { + bool bDisableThis = false; + bool bDisableHoriz = false; + bool bHoriz = (nWhich == SID_OBJECT_ALIGN_LEFT || nWhich == SID_OBJECT_ALIGN_CENTER || + nWhich == SID_OBJECT_ALIGN_RIGHT); const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList(); - //if only one object is selected it can only be vertically - // aligned because it is character bound - if( rMarkList.GetMarkCount() == 1 ) + if ( !rSh.IsAlignPossible() || bProtected ) + { + bDisableThis = true; + rSet.DisableItem( nWhich ); + } + else if ( rSh.GetAnchorId() == RndStdIds::FLY_AS_CHAR ) { - rSet.DisableItem(SID_OBJECT_ALIGN_LEFT); - rSet.DisableItem(SID_OBJECT_ALIGN_CENTER); - rSet.DisableItem(SID_OBJECT_ALIGN_RIGHT); + //if only one object is selected it can only be vertically + // aligned because it is character bound + if( rMarkList.GetMarkCount() == 1 ) + { + bDisableHoriz = true; + rSet.DisableItem(SID_OBJECT_ALIGN_LEFT); + rSet.DisableItem(SID_OBJECT_ALIGN_CENTER); + rSet.DisableItem(SID_OBJECT_ALIGN_RIGHT); + } + } + + if (bHoriz && !bDisableThis && !bDisableHoriz && + rMarkList.GetMarkCount() == 1) + { + sal_Int16 nHoriOrient = -1; + switch(nWhich) + { + case SID_OBJECT_ALIGN_LEFT: + nHoriOrient = text::HoriOrientation::LEFT; + break; + case SID_OBJECT_ALIGN_CENTER: + nHoriOrient = text::HoriOrientation::CENTER; + break; + case SID_OBJECT_ALIGN_RIGHT: + nHoriOrient = text::HoriOrientation::RIGHT; + break; + default: + break; + } + + SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); + SwFrameFormat* pFrameFormat = FindFrameFormat(pObj); + SwFormatHoriOrient aHOrient(pFrameFormat->GetFormatAttr(RES_HORI_ORIENT)); + rSet.Put(SfxBoolItem(nWhich, aHOrient.GetHoriOrient() == nHoriOrient)); } } break; commit 846e14e6b520f0b4ed79801f58d7335fe0573558 Author: Tor Lillqvist <t...@collabora.com> AuthorDate: Tue May 5 19:18:56 2020 +0300 Commit: Michael Meeks <michael.me...@collabora.com> CommitDate: Thu May 14 17:39:37 2020 +0100 Throw exceptions with useful messages Change-Id: Ic8e09d31db97c0cf2e1aaf006c96481d12deb2d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93506 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Tor Lillqvist <t...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93592 Tested-by: Jenkins diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx index e2aee8282541..7530e5d2f6f1 100644 --- a/i18npool/source/collator/collator_unicode.cxx +++ b/i18npool/source/collator/collator_unicode.cxx @@ -19,6 +19,8 @@ #include <config_locales.h> +#include <sal/log.hxx> + #include <lrl_include.hxx> #include <rtl/ustrbuf.hxx> @@ -140,7 +142,11 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang:: OUString rule = LocaleDataImpl::get()->getCollatorRuleByAlgorithm(rLocale, rAlgorithm); if (!rule.isEmpty()) { collator.reset( new icu::RuleBasedCollator(reinterpret_cast<const UChar *>(rule.getStr()), status) ); - if (! U_SUCCESS(status)) throw RuntimeException(); + if (! U_SUCCESS(status)) { + OUString message = "icu::RuleBasedCollator ctor failed: " + OUString::createFromAscii(u_errorName(status)); + SAL_WARN("i18npool", message); + throw RuntimeException(message); + } } if (!collator && OUString(LOCAL_RULE_LANGS).indexOf(rLocale.Language) >= 0) { const sal_uInt8* (*func)() = nullptr; @@ -358,10 +364,18 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang:: uca_base.reset( static_cast<icu::RuleBasedCollator*>(icu::Collator::createInstance( icu::Locale::getRoot(), status)) ); #endif - if (! U_SUCCESS(status)) throw RuntimeException(); + if (! U_SUCCESS(status)) { + OUString message = "icu::Collator::createInstance() failed: " + OUString::createFromAscii(u_errorName(status)); + SAL_WARN("i18npool", message); + throw RuntimeException(message); + } collator.reset( new icu::RuleBasedCollator( reinterpret_cast<const uint8_t*>(ruleImage), ruleImageSize, uca_base.get(), status) ); - if (! U_SUCCESS(status)) throw RuntimeException(); + if (! U_SUCCESS(status)) { + OUString message = "icu::RuleBasedCollator ctor failed: " + OUString::createFromAscii(u_errorName(status)); + SAL_WARN("i18npool", message); + throw RuntimeException(message); + } } } if (!collator) { @@ -382,7 +396,11 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang:: // load ICU collator collator.reset( static_cast<icu::RuleBasedCollator*>( icu::Collator::createInstance(icuLocale, status) ) ); - if (! U_SUCCESS(status)) throw RuntimeException(); + if (! U_SUCCESS(status)) { + OUString message = "icu::Collator::createInstance() failed: " + OUString::createFromAscii(u_errorName(status)); + SAL_WARN("i18npool", message); + throw RuntimeException(message); + } } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits