[Libreoffice-commits] core.git: compilerplugins/clang include/editeng include/sot include/svl include/svx include/vbahelper sd/source sw/inc sw/source
compilerplugins/clang/dyncastvisibility.cxx | 161 include/editeng/langitem.hxx|2 include/sot/stg.hxx |2 include/svl/aeitem.hxx |2 include/svl/eitem.hxx |2 include/svx/dlgctrl.hxx |2 include/svx/sdgmoitm.hxx|2 include/vbahelper/vbacollectionimpl.hxx |4 sd/source/ui/inc/View.hxx |2 sd/source/ui/inc/sdxfer.hxx |2 sw/inc/fmtcol.hxx |2 sw/inc/node.hxx |2 sw/inc/txatbase.hxx |6 - sw/source/core/inc/cntfrm.hxx |2 sw/source/uibase/inc/basesh.hxx |2 15 files changed, 178 insertions(+), 17 deletions(-) New commits: commit 595371e520ce4f64ad9d99a7866bdb8404271b6e Author: Stephan Bergmann Date: Fri Sep 1 20:14:25 2017 +0200 New loplugin:dyncastvisibility ...to find uses of dynamic_cast where the static (base) type has hidden visibility while the dynamic (derived) one has default visibility, and which may thus fail at least on macOS like happened in d5ed3cd6dbd22bb18542778f1c48f4d5b3ae0f95 "Make WinMtfFontStyle's base class EMFIO_DLLPUBLIC, too". libcxxabi's __dynamic_cast takes static_type and dst_type arguments. Now, if dst_type (the derived type, with default visibility) is taken from .so A (and thus references the version of the base type info hidden in .so A) but the __dynamic_cast call is made from .so B, it passes for static_type the base type information hidden in .so B, and __dynamic_cast will consider the cast to fail. I'm not sure whether hidden intermediary types (in the hierarchy between the dynamic_cast's base and derived types) acutally cause a problem too, but lets flag them with the plugin anyway. The fixes use SAL_DLLPUBLIC_RTTI. For one, there appear to be no other reasons than type visibility to make those classes SAL_DLLPUBLIC. For another, this nicely avoids any actual changes on Windows (where SAL_DLLPUBLIC expands to nothing, and many of the affected classes were explicityl introduced into class hierarchies as "MSVC hacks"). Change-Id: Ia85a9635cebffb1009a9efc1484b8bd4025585d4 Reviewed-on: https://gerrit.libreoffice.org/41802 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/compilerplugins/clang/dyncastvisibility.cxx b/compilerplugins/clang/dyncastvisibility.cxx new file mode 100644 index ..e212d7f2254d --- /dev/null +++ b/compilerplugins/clang/dyncastvisibility.cxx @@ -0,0 +1,161 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include +#include + +#include "plugin.hxx" + +namespace { + +using Bases = std::set; + +Visibility getTypeVisibility(CXXRecordDecl const * decl) { +assert(decl->isThisDeclarationADefinition()); +if (auto const opt = decl->getExplicitVisibility( +NamedDecl::VisibilityForType)) +{ +return *opt; +} +if (auto const opt = decl->getExplicitVisibility( +NamedDecl::VisibilityForValue)) +{ +return *opt; +} +auto const vis = decl->getVisibility(); +return vis == DefaultVisibility && decl->isInAnonymousNamespace() +? HiddenVisibility : vis; +} + +// Check whether 'decl' is derived from 'base', gathering any 'bases' between +// 'decl' and 'base', and whether any of those 'bases' or 'base' are 'hidden' +// (i.e., have non-default visibility): +bool isDerivedFrom( +CXXRecordDecl const * decl, CXXRecordDecl const * base, Bases * bases, +bool * hidden) +{ +bool derived = false; +for (auto const i: decl->bases()) { +auto const bd += (cast(i.getType()->getAs()->getDecl()) + ->getDefinition()); +assert(bd != nullptr); +if (bd == base) { +*hidden |= getTypeVisibility(base) != DefaultVisibility; +derived = true; +} +else if (bd->isDerivedFrom(base)) { +if (bases->insert(bd).second) { +auto const d = isDerivedFrom(bd, base, bases, hidden); +assert(d); +*hidden |= getTypeVisibility(bd) != DefaultVisibility; +} +derived = true; +} +} +return derived; +} + +StringRef vis(Visibility v) { +switch (v) { +case HiddenVisibility: +return "hidden"; +case ProtectedVisibility: +return "protected"; +case DefaultVisibility: +return "d
[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - desktop/win32
desktop/win32/source/guiloader/genericloader.cxx |2 desktop/win32/source/loader.cxx| 53 + desktop/win32/source/loader.hxx|4 + desktop/win32/source/officeloader/officeloader.cxx |2 4 files changed, 50 insertions(+), 11 deletions(-) New commits: commit 4ce1f36e6f4fd7ea923cf2ae81895f6e45919ba6 Author: Michael Stahl Date: Fri Sep 1 23:12:05 2017 +0200 tdf#109241 desktop: Win32: prepend "program" dir to $PATH The problem is that python modules (*.pyd) find DLLs in the wrong places. This is because sal_detail_initialize() calls SetDllDirectoryW(""), which removes (sometimes?) the "current directory" from the DLL search order, which is deliberately initialized to the "program" dir by CreateProcess() calls in officewrapper.cxx. Loading DLLs still works for LO's own DLLs since they are all in the "program" directory, which is the same directory where all the executables are, so it is searched first. But CPython loads its modules with LOAD_WITH_ALTERED_SEARCH_PATH, which doesn't search the directory of the executable but the directory of the immediately loaded DLL i.e. the *.pyd file instead, i.e. python-core-X.Y.Z/lib. It would be possible to call SetDllDirectory(".../program") instead but probably that would require patching python since it needs to be done in the real exectuable, not in the wrapper executable. So overwrite the $PATH again (like was done in the days of the office of the holy trinity) in the officewrapper.cxx and genericloader.cxx to prepend "program" and get priority over the rest of $PATH. This still doesn't protect against C:/Windows/System32/LIBEAY32.DLL since that has higher priority than $PATH but hopefully nobody is *that* stupid. This patch fixes soffice.exe, swriter.exe etc., and unopkg.exe. The python.exe wrapper already prepends "program" to $PATH. Change-Id: If03f07eba9a2c7fc6cf44f82f639b5d0b4c62e20 (cherry picked from commit 9990e98d67bf14003cde8f0138d2dcfa804406ac) Reviewed-on: https://gerrit.libreoffice.org/41817 Tested-by: Jenkins Reviewed-by: Noel Grandin Reviewed-by: Stephan Bergmann diff --git a/desktop/win32/source/guiloader/genericloader.cxx b/desktop/win32/source/guiloader/genericloader.cxx index 5398610d396e..4e4c522a02a9 100644 --- a/desktop/win32/source/guiloader/genericloader.cxx +++ b/desktop/win32/source/guiloader/genericloader.cxx @@ -47,7 +47,7 @@ static int GenericMain() TCHAR szIniDirectory[MAX_PATH]; STARTUPINFO aStartupInfo; -desktop_win32::getPaths(szTargetFileName, szIniDirectory); +desktop_win32::extendLoaderEnvironment(szTargetFileName, szIniDirectory); ZeroMemory( &aStartupInfo, sizeof(aStartupInfo) ); aStartupInfo.cb = sizeof(aStartupInfo); diff --git a/desktop/win32/source/loader.cxx b/desktop/win32/source/loader.cxx index 948d370987b5..9cb133d1d573 100644 --- a/desktop/win32/source/loader.cxx +++ b/desktop/win32/source/loader.cxx @@ -33,17 +33,28 @@ #include "loader.hxx" +#include + +namespace { + +void fail() +{ +LPWSTR buf = nullptr; +FormatMessageW( +FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, nullptr, +GetLastError(), 0, reinterpret_cast< LPWSTR >(&buf), 0, nullptr); +MessageBoxW(nullptr, buf, nullptr, MB_OK | MB_ICONERROR); +LocalFree(buf); +TerminateProcess(GetCurrentProcess(), 255); +} + +} + namespace desktop_win32 { -void getPaths(WCHAR * binPath, WCHAR * iniDirectory) { +void extendLoaderEnvironment(WCHAR * binPath, WCHAR * iniDirectory) { if (!GetModuleFileNameW(nullptr, iniDirectory, MAX_PATH)) { -LPWSTR buf = nullptr; -FormatMessageW( -FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, nullptr, -GetLastError(), 0, reinterpret_cast< LPWSTR >(&buf), 0, nullptr); -MessageBoxW(nullptr, buf, nullptr, MB_OK | MB_ICONERROR); -LocalFree(buf); -TerminateProcess(GetCurrentProcess(), 255); +fail(); } WCHAR * iniDirEnd = tools::filename(iniDirectory); WCHAR name[MAX_PATH + MY_LENGTH(L".bin")]; @@ -65,6 +76,32 @@ void getPaths(WCHAR * binPath, WCHAR * iniDirectory) { nameEnd[-1] = 'n'; tools::buildPath(binPath, iniDirectory, iniDirEnd, name, nameEnd - name); *iniDirEnd = L'\0'; +std::size_t const maxEnv = 32767; +WCHAR env[maxEnv]; +DWORD n = GetEnvironmentVariableW(L"PATH", env, maxEnv); +if ((n >= maxEnv || n == 0) && GetLastError() != ERROR_ENVVAR_NOT_FOUND) { +fail(); +} +// must be first in PATH to override other entries +assert(*(iniDirEnd - 1) == L'\\'); // hence -1 below +if (wcsncmp(env, iniDirectory, iniDirEnd - iniDirectory - 1) != 0 +|| env[iniDirEnd - iniDirectory - 1] != L';') +{ +WCHA
[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - desktop/win32
desktop/win32/source/guiloader/genericloader.cxx |2 desktop/win32/source/loader.cxx| 53 + desktop/win32/source/loader.hxx|4 + desktop/win32/source/officeloader/officeloader.cxx |2 4 files changed, 50 insertions(+), 11 deletions(-) New commits: commit e510fbc21f6dec877cda04e17f1433f09fa00066 Author: Michael Stahl Date: Fri Sep 1 23:12:05 2017 +0200 tdf#109241 desktop: Win32: prepend "program" dir to $PATH The problem is that python modules (*.pyd) find DLLs in the wrong places. This is because sal_detail_initialize() calls SetDllDirectoryW(""), which removes (sometimes?) the "current directory" from the DLL search order, which is deliberately initialized to the "program" dir by CreateProcess() calls in officewrapper.cxx. Loading DLLs still works for LO's own DLLs since they are all in the "program" directory, which is the same directory where all the executables are, so it is searched first. But CPython loads its modules with LOAD_WITH_ALTERED_SEARCH_PATH, which doesn't search the directory of the executable but the directory of the immediately loaded DLL i.e. the *.pyd file instead, i.e. python-core-X.Y.Z/lib. It would be possible to call SetDllDirectory(".../program") instead but probably that would require patching python since it needs to be done in the real exectuable, not in the wrapper executable. So overwrite the $PATH again (like was done in the days of the office of the holy trinity) in the officewrapper.cxx and genericloader.cxx to prepend "program" and get priority over the rest of $PATH. This still doesn't protect against C:/Windows/System32/LIBEAY32.DLL since that has higher priority than $PATH but hopefully nobody is *that* stupid. This patch fixes soffice.exe, swriter.exe etc., and unopkg.exe. The python.exe wrapper already prepends "program" to $PATH. Change-Id: If03f07eba9a2c7fc6cf44f82f639b5d0b4c62e20 (cherry picked from commit 9990e98d67bf14003cde8f0138d2dcfa804406ac) Reviewed-on: https://gerrit.libreoffice.org/41816 Tested-by: Jenkins Reviewed-by: Noel Grandin Reviewed-by: Stephan Bergmann diff --git a/desktop/win32/source/guiloader/genericloader.cxx b/desktop/win32/source/guiloader/genericloader.cxx index cdad10687b0e..db66ee39445b 100644 --- a/desktop/win32/source/guiloader/genericloader.cxx +++ b/desktop/win32/source/guiloader/genericloader.cxx @@ -47,7 +47,7 @@ static int GenericMain() TCHAR szIniDirectory[MAX_PATH]; STARTUPINFO aStartupInfo; -desktop_win32::getPaths(szTargetFileName, szIniDirectory); +desktop_win32::extendLoaderEnvironment(szTargetFileName, szIniDirectory); ZeroMemory( &aStartupInfo, sizeof(aStartupInfo) ); aStartupInfo.cb = sizeof(aStartupInfo); diff --git a/desktop/win32/source/loader.cxx b/desktop/win32/source/loader.cxx index 948d370987b5..9cb133d1d573 100644 --- a/desktop/win32/source/loader.cxx +++ b/desktop/win32/source/loader.cxx @@ -33,17 +33,28 @@ #include "loader.hxx" +#include + +namespace { + +void fail() +{ +LPWSTR buf = nullptr; +FormatMessageW( +FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, nullptr, +GetLastError(), 0, reinterpret_cast< LPWSTR >(&buf), 0, nullptr); +MessageBoxW(nullptr, buf, nullptr, MB_OK | MB_ICONERROR); +LocalFree(buf); +TerminateProcess(GetCurrentProcess(), 255); +} + +} + namespace desktop_win32 { -void getPaths(WCHAR * binPath, WCHAR * iniDirectory) { +void extendLoaderEnvironment(WCHAR * binPath, WCHAR * iniDirectory) { if (!GetModuleFileNameW(nullptr, iniDirectory, MAX_PATH)) { -LPWSTR buf = nullptr; -FormatMessageW( -FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, nullptr, -GetLastError(), 0, reinterpret_cast< LPWSTR >(&buf), 0, nullptr); -MessageBoxW(nullptr, buf, nullptr, MB_OK | MB_ICONERROR); -LocalFree(buf); -TerminateProcess(GetCurrentProcess(), 255); +fail(); } WCHAR * iniDirEnd = tools::filename(iniDirectory); WCHAR name[MAX_PATH + MY_LENGTH(L".bin")]; @@ -65,6 +76,32 @@ void getPaths(WCHAR * binPath, WCHAR * iniDirectory) { nameEnd[-1] = 'n'; tools::buildPath(binPath, iniDirectory, iniDirEnd, name, nameEnd - name); *iniDirEnd = L'\0'; +std::size_t const maxEnv = 32767; +WCHAR env[maxEnv]; +DWORD n = GetEnvironmentVariableW(L"PATH", env, maxEnv); +if ((n >= maxEnv || n == 0) && GetLastError() != ERROR_ENVVAR_NOT_FOUND) { +fail(); +} +// must be first in PATH to override other entries +assert(*(iniDirEnd - 1) == L'\\'); // hence -1 below +if (wcsncmp(env, iniDirectory, iniDirEnd - iniDirectory - 1) != 0 +|| env[iniDirEnd - iniDirectory - 1] != L';') +{ +WCHA
[Libreoffice-commits] core.git: emfio/source
emfio/source/reader/mtftools.cxx | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) New commits: commit c8a3f0fe63e38a1b597327d1145568dc9ae7a84a Author: Caolán McNamara Date: Sun Sep 3 20:37:55 2017 +0100 crashtesting: uninherited GDIObj is also possible here e.g. kde239472-4.doc and W_META_CREATEPALETTE etc create objects that can be selected but are just a base GDIObj Change-Id: I4b99978c49f5abb7fb1c616d044ba25c793577be Reviewed-on: https://gerrit.libreoffice.org/41869 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx index 4edfeb4817cd..ce2b8ab1b395 100644 --- a/emfio/source/reader/mtftools.cxx +++ b/emfio/source/reader/mtftools.cxx @@ -546,7 +546,7 @@ namespace emfio { if ( nIndex & ENHMETA_STOCK_OBJECT ) { - sal_uInt16 nStockId = (sal_uInt8)nIndex; +sal_uInt16 nStockId = (sal_uInt8)nIndex; switch( nStockId ) { case WHITE_BRUSH : @@ -608,6 +608,8 @@ namespace emfio if ( (sal_uInt32)nIndex < mvGDIObj.size() ) pGDIObj = mvGDIObj[ nIndex ].get(); +fprintf(stderr, "index %d is %p\n", nIndex, pGDIObj); + if ( pGDIObj ) { if (const auto pen = dynamic_cast(pGDIObj)) @@ -620,9 +622,9 @@ namespace emfio } else if (const auto font = dynamic_cast( pGDIObj)) +{ maFont = font->aFont; -else -assert(false); +} } } } @@ -715,6 +717,7 @@ namespace emfio if ( nIndex == mvGDIObj.size() ) ImplResizeObjectArry( mvGDIObj.size() + 16 ); +fprintf(stderr, "index %ld set to %p\n", nIndex, pObject.get()); mvGDIObj[ nIndex ] = std::move(pObject); } @@ -751,6 +754,8 @@ namespace emfio if ( (sal_uInt32)nIndex >= mvGDIObj.size() ) ImplResizeObjectArry( nIndex + 16 ); +fprintf(stderr, "22 index %d set to %p\n", nIndex, pObject.get()); + mvGDIObj[ nIndex ] = std::move(pObject); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: emfio/source
emfio/source/reader/mtftools.cxx |5 - 1 file changed, 5 deletions(-) New commits: commit 21d64a76ec128ae5787b24dc444a2f51ed8acf5d Author: Caolán McNamara Date: Mon Sep 4 08:54:50 2017 +0100 stray debugging Change-Id: Iabe56218f8914d8d858446eb177cb89dc1cd8601 diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx index ce2b8ab1b395..9fec82543f2a 100644 --- a/emfio/source/reader/mtftools.cxx +++ b/emfio/source/reader/mtftools.cxx @@ -608,8 +608,6 @@ namespace emfio if ( (sal_uInt32)nIndex < mvGDIObj.size() ) pGDIObj = mvGDIObj[ nIndex ].get(); -fprintf(stderr, "index %d is %p\n", nIndex, pGDIObj); - if ( pGDIObj ) { if (const auto pen = dynamic_cast(pGDIObj)) @@ -717,7 +715,6 @@ namespace emfio if ( nIndex == mvGDIObj.size() ) ImplResizeObjectArry( mvGDIObj.size() + 16 ); -fprintf(stderr, "index %ld set to %p\n", nIndex, pObject.get()); mvGDIObj[ nIndex ] = std::move(pObject); } @@ -754,8 +751,6 @@ namespace emfio if ( (sal_uInt32)nIndex >= mvGDIObj.size() ) ImplResizeObjectArry( nIndex + 16 ); -fprintf(stderr, "22 index %d set to %p\n", nIndex, pObject.get()); - mvGDIObj[ nIndex ] = std::move(pObject); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - ec/558d297c084ee453741b7658d0eb87dec009e1
ec/558d297c084ee453741b7658d0eb87dec009e1 |1 + 1 file changed, 1 insertion(+) New commits: commit 20f663b4326862fe56b352e6dcd3cf7eb88b936f Author: Caolán McNamara Date: Mon Sep 4 08:57:23 2017 +0100 Notes added by 'git notes add' diff --git a/ec/558d297c084ee453741b7658d0eb87dec009e1 b/ec/558d297c084ee453741b7658d0eb87dec009e1 new file mode 100644 index ..8e5c182e7789 --- /dev/null +++ b/ec/558d297c084ee453741b7658d0eb87dec009e1 @@ -0,0 +1 @@ +ignore: aoo ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 43/479366f74c78f5dcd1e875854340da2c1b856f
43/479366f74c78f5dcd1e875854340da2c1b856f |1 + 1 file changed, 1 insertion(+) New commits: commit 67c2fe7c6be7089a6f04c400e25dffae9a18e515 Author: Caolán McNamara Date: Mon Sep 4 08:57:07 2017 +0100 Notes added by 'git notes add' diff --git a/43/479366f74c78f5dcd1e875854340da2c1b856f b/43/479366f74c78f5dcd1e875854340da2c1b856f new file mode 100644 index ..8e5c182e7789 --- /dev/null +++ b/43/479366f74c78f5dcd1e875854340da2c1b856f @@ -0,0 +1 @@ +ignore: aoo ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'refs/notes/commits' - 2 commits - 1b/8f4144d6f880bcee8b9cdc795b7110b5034a78 51/fa5a1e26e35efc67651411a92128249edc5783
1b/8f4144d6f880bcee8b9cdc795b7110b5034a78 |1 + 51/fa5a1e26e35efc67651411a92128249edc5783 |1 + 2 files changed, 2 insertions(+) New commits: commit 38a92c9b7dd1c2319dbb4abc222f0d6b767c73d0 Author: Caolán McNamara Date: Mon Sep 4 08:58:43 2017 +0100 Notes added by 'git notes add' diff --git a/51/fa5a1e26e35efc67651411a92128249edc5783 b/51/fa5a1e26e35efc67651411a92128249edc5783 new file mode 100644 index ..8e5c182e7789 --- /dev/null +++ b/51/fa5a1e26e35efc67651411a92128249edc5783 @@ -0,0 +1 @@ +ignore: aoo commit b0f0604bb87556a9308a51706a1cba624abd6d0f Author: Caolán McNamara Date: Mon Sep 4 08:58:30 2017 +0100 Notes added by 'git notes add' diff --git a/1b/8f4144d6f880bcee8b9cdc795b7110b5034a78 b/1b/8f4144d6f880bcee8b9cdc795b7110b5034a78 new file mode 100644 index ..8e5c182e7789 --- /dev/null +++ b/1b/8f4144d6f880bcee8b9cdc795b7110b5034a78 @@ -0,0 +1 @@ +ignore: aoo ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: filter/source
filter/source/msfilter/eschesdo.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6f511a5de909b2fb6cb42b851e0cc90f54fbdd59 Author: Caolán McNamara Date: Mon Sep 4 09:01:32 2017 +0100 coverity#1417293 'Constant' variable guards dead code Change-Id: I7ac4d61acf84f6e93138f6df50e8b9a71d939de8 diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index c84f80485857..fa10575b506c 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -610,7 +610,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, else { //2do: could be made an option in HostAppData whether OLE object should be written or not -bool bAppOLE = true; +const bool bAppOLE = true; addShape( ESCHER_ShpInst_PictureFrame, ShapeFlag::HaveShapeProperty | ShapeFlag::HaveAnchor | (bAppOLE ? ShapeFlag::OLEShape : ShapeFlag::NONE) ); if ( aPropOpt.CreateOLEGraphicProperties( rObj.GetShapeRef() ) ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: bundled/include
bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h | 20 ++- 1 file changed, 19 insertions(+), 1 deletion(-) New commits: commit 124cf6a7b99643bea527993ac9d418d7fe9fecd2 Author: Marco Cecchetti Date: Sun Sep 3 23:05:04 2017 +0200 ruler: added the ruler callback enum to the bundled include Change-Id: Ie8100b08897ce7f49b5108cea147bf9bfe6060ed diff --git a/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h b/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h index 0bf35024..477b6f4d 100644 --- a/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h +++ b/bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h @@ -505,7 +505,25 @@ typedef enum /** * The text content of the address field in Calc. */ -LOK_CALLBACK_CELL_ADDRESS = 34 +LOK_CALLBACK_CELL_ADDRESS = 34, + +/** + * The key ruler related properties on change are reported by this. + * + * The payload format is: + * + * { + * "margin1": "...", + * "margin2": "...", + * "leftOffset": "...", + * "pageOffset": "...", + * "pageWidth": "...", + * "unit": "..." + * } + * + * Here all aproperties are same as described in svxruler. + */ +LOK_CALLBACK_RULER_UPDATE = 35 } LibreOfficeKitCallbackType; ___ 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-5.3' - canvas/source vcl/win
canvas/source/directx/dx_textlayout_drawhelper.cxx |5 - vcl/win/gdi/salvd.cxx |4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) New commits: commit e53c0f102cc4f0ef31a9fffb5b78fd158cf68738 Author: Szymon KÅos Date: Tue Aug 1 12:34:02 2017 +0200 tdf#104252 EMF rendering, set correct VirtualDevice size ClipRegion is bounded to device size. That resulted in missing text in case of PDF export with EMF+ images under Windows (with hardware acceleration). VirtualDevice size was always equal to the screen resolution what is not enough to draw complete PDF. This patch modifies VirtualDevice size to match target size. Change-Id: I762be6a6ca6fab3897b57f370fecc3f3568a58cb Reviewed-on: https://gerrit.libreoffice.org/41390 Reviewed-by: Tomaž Vajngerl Tested-by: Tomaž Vajngerl diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx index fb8e184f9cc6..7a602742b1ba 100644 --- a/canvas/source/directx/dx_textlayout_drawhelper.cxx +++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx @@ -80,7 +80,10 @@ namespace dxcanvas SystemGraphicsData aSystemGraphicsData; aSystemGraphicsData.nSize = sizeof(SystemGraphicsData); aSystemGraphicsData.hDC = reinterpret_cast< ::HDC >(hdc); -ScopedVclPtrInstance xVirtualDevice(&aSystemGraphicsData, Size(1, 1), DeviceFormat::DEFAULT); + +Size aTargetSize(rViewState.AffineTransform.m00, rViewState.AffineTransform.m11); + +ScopedVclPtrInstance xVirtualDevice(&aSystemGraphicsData, aTargetSize, DeviceFormat::DEFAULT); // disable font antialiasing - GDI does not handle alpha // surfaces properly. diff --git a/vcl/win/gdi/salvd.cxx b/vcl/win/gdi/salvd.cxx index 65d8600f6934..191c0eb0763c 100644 --- a/vcl/win/gdi/salvd.cxx +++ b/vcl/win/gdi/salvd.cxx @@ -97,12 +97,12 @@ SalVirtualDevice* WinSalInstance::CreateVirtualDevice( SalGraphics* pSGraphics, hDC = (pData->hDC) ? pData->hDC : GetDC(pData->hWnd); hBmp = nullptr; bOk = (hDC != nullptr); -if (bOk) +if ( bOk && nDX <= 1 && nDY <= 1 ) { nDX = GetDeviceCaps( hDC, HORZRES ); nDY = GetDeviceCaps( hDC, VERTRES ); } -else +else if ( !bOk ) { nDX = 0; nDY = 0; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Weekly QA Report (W35-2017)
Hello, What have happened in QA in the last 7 days? * 129 have been created, of which, 35 are still unconfirmed ( Total Unconfirmed bugs: 447 ) Link: http://tinyurl.com/y74b7q6z * 1566 comments have been written. == STATUS CHANGED == * 30 bugs have been changed to 'ASSIGNED'. Link: http://tinyurl.com/y8mpst7o Done by: Julien Nabet ( 10 ), Xisco Faulí ( 6 ), Zolnai Tamás ( 4 ), Dennis Francis ( 3 ), Miklos Vajna ( 2 ), Caolán McNamara ( 2 ), Gabor Kelemen ( 1 ), Eike Rathke ( 1 ), Aron Budea ( 1 ) * 3 bugs have been changed to 'CLOSED'. Link: http://tinyurl.com/yd8mkbod Done by: Heiko Tietze ( 1 ), Julien Nabet ( 1 ), Eike Rathke ( 1 ) * 26 bugs have been changed to 'NEEDINFO'. Link: http://tinyurl.com/yb4cgrct Done by: Xisco Faulí ( 7 ), Buovjaga ( 7 ), Jean-Baptiste Faure ( 3 ), Heiko Tietze ( 2 ), dieterp ( 2 ), V Stuart Foote ( 1 ), Regina Henschel ( 1 ), m.a.riosv ( 1 ), Michael Meeks ( 1 ), Alex Thurgood ( 1 ) * 93 bugs have been changed to 'NEW'. Link: http://tinyurl.com/yak7kqcg Done by: Buovjaga ( 27 ), dieterp ( 8 ), Timur ( 7 ), Xisco Faulí ( 6 ), Jean-Baptiste Faure ( 6 ), Jacques Guilleron ( 6 ), raal ( 5 ), Aron Budea ( 5 ), Heiko Tietze ( 4 ), Yousuf Philips (jay) ( 3 ), m.a.riosv ( 2 ), Zineta ( 1 ), V Stuart Foote ( 1 ), thomas.beck ( 1 ), Thorsten Behrens (CIB) ( 1 ), robert ( 1 ), Regina Henschel ( 1 ), Mihkel Tõnnov ( 1 ), Michael Meeks ( 1 ), andreas_k ( 1 ), Alex Thurgood ( 1 ), Bartosz ( 1 ), Frederic Parrenin ( 1 ), Cor Nouws ( 1 ), admin ( 1 ) * 5 bugs have been changed to 'REOPENED'. Link: http://tinyurl.com/y6vb5t4p Done by: Papamatti ( 1 ), Lynne Connolly ( 1 ), Kruno ( 1 ), Jean-Baptiste Faure ( 1 ), Lenge ( 1 ) * 40 bugs have been changed to 'RESOLVED DUPLICATE'. Link: http://tinyurl.com/yacgwgxp Done by: Xisco Faulí ( 4 ), Christian Lohmaier ( 4 ), Aron Budea ( 4 ), Telesto ( 3 ), Adolfo Jayme ( 3 ), V Stuart Foote ( 2 ), Buovjaga ( 2 ), Heiko Tietze ( 2 ), Thomas Lendo ( 2 ), Julien Nabet ( 2 ), Yousuf Philips (jay) ( 2 ), Justin L ( 2 ), Andras Timar ( 1 ), raal ( 1 ), Gabor Kelemen ( 1 ), Jean-Baptiste Faure ( 1 ), Alex Thurgood ( 1 ), Timur ( 1 ), Bartosz ( 1 ), eisa01 ( 1 ) * 35 bugs have been changed to 'RESOLVED FIXED'. Link: http://tinyurl.com/y9ouuldg Done by: Caolán McNamara ( 9 ), Eike Rathke ( 3 ), Zolnai Tamás ( 2 ), Gabor Kelemen ( 2 ), Justin L ( 2 ), Dennis Francis ( 2 ), Christian Lohmaier ( 2 ), admin ( 2 ), yossizahn ( 1 ), V Stuart Foote ( 1 ), Miklos Vajna ( 1 ), Stephan Bergmann ( 1 ), qa-admin ( 1 ), Michael Stahl ( 1 ), Mike Kaganski ( 1 ), Laurent BP ( 1 ), Timur ( 1 ), Adolfo Jayme ( 1 ), kompilainenn ( 1 ) * 43 bugs have been changed to 'RESOLVED INSUFFICIENTDATA'. Link: http://tinyurl.com/y92l9dg9 Done by: qa-admin ( 43 ) * 3 bugs have been changed to 'RESOLVED INVALID'. Link: http://tinyurl.com/y8pbowml Done by: Buovjaga ( 1 ), Yousuf Philips (jay) ( 1 ), m.a.riosv ( 1 ) * 12 bugs have been changed to 'RESOLVED NOTABUG'. Link: http://tinyurl.com/ybfhavbg Done by: m.a.riosv ( 3 ), V Stuart Foote ( 2 ), Buovjaga ( 2 ), Regina Henschel ( 1 ), oleyansen ( 1 ), Ulrich Gemkow ( 1 ), Justin L ( 1 ), Jean-Baptiste Faure ( 1 ) * 3 bugs have been changed to 'RESOLVED NOTOURBUG'. Link: http://tinyurl.com/ybtt8eso Done by: Buovjaga ( 1 ), Mike Kaganski ( 1 ), John R Mead ( 1 ) * 10 bugs have been changed to 'RESOLVED WONTFIX'. Link: http://tinyurl.com/y9kecnkd Done by: Buovjaga ( 3 ), Timur ( 3 ), Heiko Tietze ( 2 ), V Stuart Foote ( 1 ), Jean-Baptiste Faure ( 1 ) * 30 bugs have been changed to 'RESOLVED WORKSFORME'. Link: http://tinyurl.com/y77zb5p6 Done by: Jean-Baptiste Faure ( 5 ), Buovjaga ( 4 ), Timur ( 4 ), Samson ( 3 ), Xisco Faulí ( 2 ), Regina Henschel ( 2 ), Heiko Tietze ( 1 ), Julien Nabet ( 1 ), Roeland ( 1 ), Yousuf Philips (jay) ( 1 ), cianoz ( 1 ), Hermann Rochholz ( 1 ), Adolfo Jayme ( 1 ), eisa01 ( 1 ), Aron Budea ( 1 ), Nick Levinson ( 1 ) * 18 bugs have been changed to 'UNCONFIRMED'. Link: http://tinyurl.com/ya9oxvhk Done by: wolterh6 ( 2 ), Yotam Benshalom ( 2 ), Xisco Faulí ( 1 ), Julien Nabet ( 1 ), Chris Bird ( 1 ), Elmar ( 1 ), rairose.cornell ( 1 ), Petr Vones ( 1 ), m.a.riosv ( 1 ), Martin ( 1 ), jhertel ( 1 ), hugot...@free.fr ( 1 ), Timur ( 1 ), fhmbl ( 1 ), Bastien Nocera ( 1 ), lukash256 ( 1 ) * 1 bug has been changed to 'VERIFIED DUPLICATE'. Link: http://tinyurl.com/yagjczoc Done by: Terrence Enger ( 1 ) * 32 bugs have been changed to 'VERIFIED FIXED'. Link: http://tinyurl.com/yb7jk6vh Done by: Xisco Faulí ( 23 ), Timur ( 3 ), Thomas Lendo ( 2 ), Terrence Enger ( 2 ), Jean-Baptiste Faure ( 1 ), Cor Nouws ( 1 ) == KEYWORDS ADDED == * 'accessibility' has been added to 2 bugs. Link: http://tinyurl.com/ya69s4uo Done by: Alex Thurgood ( 1 ), Adolfo Jayme ( 1 ) * 'bibisectRequest' has been added to 5 bugs. Link: http://tinyurl.com/y8
[Libreoffice-commits] core.git: sw/inc sw/source
sw/inc/fchrfmt.hxx |2 +- sw/source/core/txtnode/fmtatr2.cxx | 10 +- sw/source/core/txtnode/txtatr2.cxx |2 +- 3 files changed, 7 insertions(+), 7 deletions(-) New commits: commit 0a05919fa3b8a63d74abb13cc1ee25656cb659f0 Author: Miklos Vajna Date: Mon Sep 4 10:11:59 2017 +0200 sw: prefix members of SwFormatCharFormat Change-Id: Id1f860b1355ad835fd2ab991c4bbb7db49dbda69 Reviewed-on: https://gerrit.libreoffice.org/41875 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/sw/inc/fchrfmt.hxx b/sw/inc/fchrfmt.hxx index 982346afd9c5..03d1692115c1 100644 --- a/sw/inc/fchrfmt.hxx +++ b/sw/inc/fchrfmt.hxx @@ -30,7 +30,7 @@ class IntlWrapper; class SW_DLLPUBLIC SwFormatCharFormat: public SfxPoolItem, public SwClient { friend class SwTextCharFormat; -SwTextCharFormat* pTextAttr; ///< My text attribute. +SwTextCharFormat* m_pTextAttribute; ///< My text attribute. public: /// single argument ctors shall be explicit. diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index b2721257dd6c..c402166fee3d 100644 --- a/sw/source/core/txtnode/fmtatr2.cxx +++ b/sw/source/core/txtnode/fmtatr2.cxx @@ -61,14 +61,14 @@ SfxPoolItem* SwFormatINetFormat::CreateDefault() { return new SwFormatINetFormat SwFormatCharFormat::SwFormatCharFormat( SwCharFormat *pFormat ) : SfxPoolItem( RES_TXTATR_CHARFMT ), SwClient(pFormat), -pTextAttr( nullptr ) +m_pTextAttribute( nullptr ) { } SwFormatCharFormat::SwFormatCharFormat( const SwFormatCharFormat& rAttr ) : SfxPoolItem( RES_TXTATR_CHARFMT ), SwClient( rAttr.GetCharFormat() ), -pTextAttr( nullptr ) +m_pTextAttribute( nullptr ) { } @@ -88,14 +88,14 @@ SfxPoolItem* SwFormatCharFormat::Clone( SfxItemPool* ) const // forward to the TextAttribute void SwFormatCharFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) { -if( pTextAttr ) -pTextAttr->ModifyNotification( pOld, pNew ); +if( m_pTextAttribute ) +m_pTextAttribute->ModifyNotification( pOld, pNew ); } // forward to the TextAttribute bool SwFormatCharFormat::GetInfo( SfxPoolItem& rInfo ) const { -return pTextAttr && pTextAttr->GetInfo( rInfo ); +return m_pTextAttribute && m_pTextAttribute->GetInfo( rInfo ); } bool SwFormatCharFormat::QueryValue( uno::Any& rVal, sal_uInt8 ) const { diff --git a/sw/source/core/txtnode/txtatr2.cxx b/sw/source/core/txtnode/txtatr2.cxx index 7efab4b169c5..69189e11f1f9 100644 --- a/sw/source/core/txtnode/txtatr2.cxx +++ b/sw/source/core/txtnode/txtatr2.cxx @@ -43,7 +43,7 @@ SwTextCharFormat::SwTextCharFormat( SwFormatCharFormat& rAttr, , m_pTextNode( nullptr ) , m_nSortNumber( 0 ) { -rAttr.pTextAttr = this; +rAttr.m_pTextAttribute = this; SetCharFormatAttr( true ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sw/source test/source toolkit/source tools/source ucb/qa udkapi/com unotools/source uui/source
sw/source/core/layout/paintfrm.cxx|5 ++--- test/source/sheet/xnamedranges.cxx|2 +- toolkit/source/awt/vclxtoolkit.cxx|4 ++-- toolkit/source/awt/vclxwindow.cxx |2 +- toolkit/source/controls/stdtabcontroller.cxx |2 +- toolkit/source/controls/unocontrolmodel.cxx |2 +- toolkit/source/helper/property.cxx|2 +- toolkit/source/helper/unowrapper.cxx |2 +- tools/source/generic/poly.cxx |2 +- tools/source/stream/stream.cxx|2 +- tools/source/string/tenccvt.cxx |2 +- ucb/qa/complex/tdoc/_XServiceInfo.java|2 +- udkapi/com/sun/star/script/XLibraryAccess.idl |2 +- unotools/source/config/dynamicmenuoptions.cxx |6 +++--- unotools/source/streaming/streamwrap.cxx |2 +- uui/source/secmacrowarnings.hxx |2 +- 16 files changed, 20 insertions(+), 21 deletions(-) New commits: commit de0993097cad2fd5819f8bea5ff53cddce7cde41 Author: Justin Luth Date: Wed Aug 30 18:08:15 2017 -0400 tdf#104602: don't re-draw page background when bOnlyTextBackground In 2014 Writer gained support for Paragraph and PageStyle DrawingLayer FillAttributes, it changed some behaviour with PaintBackground, so that compat setting BACKGROUND_PARA_OVER_DRAWINGS now overwrote the entire "hell" layer as the page background was re-applied. Only DOCX uses this 2012 compatibility setting. Change-Id: I69517efb7d82acd719d6a27a09ba61554dbf1ec9 Reviewed-on: https://gerrit.libreoffice.org/41744 Reviewed-by: Justin Luth Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index b78c230137de..f88d84a6a6f0 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -6510,7 +6510,7 @@ void SwFrame::PaintBackground( const SwRect &rRect, const SwPageFrame *pPage, if( IsTextFrame() || IsSctFrame() ) aPaintRect = UnionFrame( true ); -if ( aPaintRect.IsOver( rRect ) ) +if ( (!bOnlyTextBackground || IsTextFrame()) && aPaintRect.IsOver( rRect ) ) { if ( bBack || bPageFrame || !bLowerMode ) { @@ -6604,7 +6604,6 @@ void SwFrame::PaintBackground( const SwRect &rRect, const SwPageFrame *pPage, // background transparency have to be considered // Set missing 5th parameter to the default value GRFNUM_NO // - see declaration in /core/inc/frmtool.hxx. -if (IsTextFrame() || !bOnlyTextBackground) ::DrawGraphic( pItem, pOut, @@ -6649,7 +6648,7 @@ void SwFrame::PaintBackground( const SwRect &rRect, const SwPageFrame *pPage, if ( ( pFrame->IsLayoutFrame() && bLowerBorder ) || aFrameRect.IsOver( aRect ) ) pFrame->PaintBackground( aRect, pPage, rTmpAttrs, bLowMode, - bLowerBorder ); + bLowerBorder, bOnlyTextBackground ); if ( bLowerBorder ) pFrame->PaintBorder( aBorderRect, pPage, rTmpAttrs ); } commit 75a96e22fd162a9410333698f57e4302ae190e66 Author: Johnny_M Date: Sat Sep 2 13:06:09 2017 +0200 Translate German comments/debug strings (leftovers in dirs test to uui) Translates leftovers found using a custom regex. Additionally: - A few spelling fixes Change-Id: I3772e1b914acc487d80ab14efb815cb178ca3dcb Reviewed-on: https://gerrit.libreoffice.org/41831 Reviewed-by: Michael Stahl Tested-by: Michael Stahl diff --git a/test/source/sheet/xnamedranges.cxx b/test/source/sheet/xnamedranges.cxx index 6983ead594d1..0b288dcab3c6 100644 --- a/test/source/sheet/xnamedranges.cxx +++ b/test/source/sheet/xnamedranges.cxx @@ -160,7 +160,7 @@ void XNamedRanges::testRemoveByName() uno::Reference< container::XIndexAccess > xIndex(xNamedRanges, UNO_QUERY_THROW); bool bHasIt = xNamedRanges->hasByName(maNameToRemove); -CPPUNIT_ASSERT_MESSAGE("NamedRange initial1 des not exits, can't remove it", bHasIt); +CPPUNIT_ASSERT_MESSAGE("NamedRange initial1 does not exist, can't remove it", bHasIt); if (bHasIt) { diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index 9076ae37f259..8cc6e382c35f 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -811,8 +811,8 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, } if ( !pParent ) { -// Wenn die Component einen Parent braucht, dann NULL zurueckgeben, -// spaeter mal css::uno::Exception... +// If the component needs a parent, then ret
[Libreoffice-commits] core.git: svl/source
svl/source/numbers/zformat.cxx | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) New commits: commit 8cb3faca4b1d1d9c68faba103c6c6117853e639e Author: Eike Rathke Date: Mon Sep 4 11:18:49 2017 +0200 Resolves: tdf#52510 handle trailing ';' specifying empty following subformat Change-Id: Ic84065f11619542fe735f45e72c9303897ea5755 diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 65f06418d1df..d40c7d977f17 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -1175,8 +1175,26 @@ SvNumberformat::SvNumberformat(OUString& rString, } if (sBuff.getLength() == nPos) { -if ( nIndex == 2 && eSymbolType == BRACKET_SYMBOLTYPE_FORMAT && - sBuff[nPos - 1] == ';' ) +if (nIndex < 3 && rString[rString.getLength()-1] == ';') +{ +// A trailing ';' is significant and specifies the following +// subformat to be empty. We don't enter the scanning loop +// above again though. +// Note that the operators apply to the current last scanned +// subformat. +if (nIndex == 0 && eOp1 == NUMBERFORMAT_OP_NO) +{ +eOp1 = NUMBERFORMAT_OP_GT; // undefined condition, default: > 0 +} +else if (nIndex == 1 && eOp2 == NUMBERFORMAT_OP_NO) +{ +eOp2 = NUMBERFORMAT_OP_LT; // undefined condition, default: < 0 +} +NumFor[nIndex+1].Info().eScannedType = css::util::NumberFormat::EMPTY; +if (sBuff[nPos-1] != ';') +sBuff.insert( nPos++, ';'); +} +if (nIndex == 2 && eSymbolType == BRACKET_SYMBOLTYPE_FORMAT && sBuff[nPos-1] == ';') { // #83510# A 4th subformat explicitly specified to be empty // hides any text. Need the type here for HasTextFormat() ___ 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-5.3' - sc/source
sc/source/ui/vba/vbarange.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 9d7a81991e350e5eb3216299eec13d23fab86fce Author: Dennis Francis Date: Tue Aug 29 15:32:14 2017 +0530 tdf#111939: Fallback to getting view data from best view shell... ...when ScDocShell::GetViewData() returns nullptr. This is needed when a macro is run from the macro editor window instead of running the macro from Tools menu in the Calc window. Change-Id: I89c23c2ec08e8e9907f02eb1389236111530058b Reviewed-on: https://gerrit.libreoffice.org/41733 Tested-by: Jenkins Reviewed-by: Dennis Francis (cherry picked from commit c864fc9eab79d0b24036588cf8fc37ef51bd1907) Reviewed-on: https://gerrit.libreoffice.org/41757 Reviewed-by: Eike Rathke (cherry picked from commit 980fbcaf9de67013b1e72806de7746543040d48e) Signed-off-by: Andras Timar diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 744473c80c70..c3cee2c3549c 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -4249,6 +4249,12 @@ static void lcl_SelectAll( ScDocShell* pDocShell, ScQueryParam& aParam ) if ( pDocShell ) { ScViewData* pViewData = ScDocShell::GetViewData(); +if ( !pViewData ) +{ +ScTabViewShell* pViewSh = pDocShell->GetBestViewShell( true ); +pViewData = pViewSh ? &pViewSh->GetViewData() : nullptr; +} + if ( pViewData ) { OSL_TRACE("Pushing out SelectAll query"); ___ 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-5.3' - desktop/win32
desktop/win32/source/guiloader/genericloader.cxx |2 desktop/win32/source/loader.cxx| 53 + desktop/win32/source/loader.hxx|4 + desktop/win32/source/officeloader/officeloader.cxx |2 4 files changed, 50 insertions(+), 11 deletions(-) New commits: commit cc47ba8a8ba72acce94ef9c612afd9f16e3e9e86 Author: Michael Stahl Date: Fri Sep 1 23:12:05 2017 +0200 tdf#109241 desktop: Win32: prepend "program" dir to $PATH The problem is that python modules (*.pyd) find DLLs in the wrong places. This is because sal_detail_initialize() calls SetDllDirectoryW(""), which removes (sometimes?) the "current directory" from the DLL search order, which is deliberately initialized to the "program" dir by CreateProcess() calls in officewrapper.cxx. Loading DLLs still works for LO's own DLLs since they are all in the "program" directory, which is the same directory where all the executables are, so it is searched first. But CPython loads its modules with LOAD_WITH_ALTERED_SEARCH_PATH, which doesn't search the directory of the executable but the directory of the immediately loaded DLL i.e. the *.pyd file instead, i.e. python-core-X.Y.Z/lib. It would be possible to call SetDllDirectory(".../program") instead but probably that would require patching python since it needs to be done in the real exectuable, not in the wrapper executable. So overwrite the $PATH again (like was done in the days of the office of the holy trinity) in the officewrapper.cxx and genericloader.cxx to prepend "program" and get priority over the rest of $PATH. This still doesn't protect against C:/Windows/System32/LIBEAY32.DLL since that has higher priority than $PATH but hopefully nobody is *that* stupid. This patch fixes soffice.exe, swriter.exe etc., and unopkg.exe. The python.exe wrapper already prepends "program" to $PATH. Change-Id: If03f07eba9a2c7fc6cf44f82f639b5d0b4c62e20 (cherry picked from commit 9990e98d67bf14003cde8f0138d2dcfa804406ac) Reviewed-on: https://gerrit.libreoffice.org/41817 Tested-by: Jenkins Reviewed-by: Noel Grandin Reviewed-by: Stephan Bergmann (cherry picked from commit 4ce1f36e6f4fd7ea923cf2ae81895f6e45919ba6) diff --git a/desktop/win32/source/guiloader/genericloader.cxx b/desktop/win32/source/guiloader/genericloader.cxx index 5398610d396e..4e4c522a02a9 100644 --- a/desktop/win32/source/guiloader/genericloader.cxx +++ b/desktop/win32/source/guiloader/genericloader.cxx @@ -47,7 +47,7 @@ static int GenericMain() TCHAR szIniDirectory[MAX_PATH]; STARTUPINFO aStartupInfo; -desktop_win32::getPaths(szTargetFileName, szIniDirectory); +desktop_win32::extendLoaderEnvironment(szTargetFileName, szIniDirectory); ZeroMemory( &aStartupInfo, sizeof(aStartupInfo) ); aStartupInfo.cb = sizeof(aStartupInfo); diff --git a/desktop/win32/source/loader.cxx b/desktop/win32/source/loader.cxx index 948d370987b5..9cb133d1d573 100644 --- a/desktop/win32/source/loader.cxx +++ b/desktop/win32/source/loader.cxx @@ -33,17 +33,28 @@ #include "loader.hxx" +#include + +namespace { + +void fail() +{ +LPWSTR buf = nullptr; +FormatMessageW( +FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, nullptr, +GetLastError(), 0, reinterpret_cast< LPWSTR >(&buf), 0, nullptr); +MessageBoxW(nullptr, buf, nullptr, MB_OK | MB_ICONERROR); +LocalFree(buf); +TerminateProcess(GetCurrentProcess(), 255); +} + +} + namespace desktop_win32 { -void getPaths(WCHAR * binPath, WCHAR * iniDirectory) { +void extendLoaderEnvironment(WCHAR * binPath, WCHAR * iniDirectory) { if (!GetModuleFileNameW(nullptr, iniDirectory, MAX_PATH)) { -LPWSTR buf = nullptr; -FormatMessageW( -FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, nullptr, -GetLastError(), 0, reinterpret_cast< LPWSTR >(&buf), 0, nullptr); -MessageBoxW(nullptr, buf, nullptr, MB_OK | MB_ICONERROR); -LocalFree(buf); -TerminateProcess(GetCurrentProcess(), 255); +fail(); } WCHAR * iniDirEnd = tools::filename(iniDirectory); WCHAR name[MAX_PATH + MY_LENGTH(L".bin")]; @@ -65,6 +76,32 @@ void getPaths(WCHAR * binPath, WCHAR * iniDirectory) { nameEnd[-1] = 'n'; tools::buildPath(binPath, iniDirectory, iniDirEnd, name, nameEnd - name); *iniDirEnd = L'\0'; +std::size_t const maxEnv = 32767; +WCHAR env[maxEnv]; +DWORD n = GetEnvironmentVariableW(L"PATH", env, maxEnv); +if ((n >= maxEnv || n == 0) && GetLastError() != ERROR_ENVVAR_NOT_FOUND) { +fail(); +} +// must be first in PATH to override other entries +assert(*(iniDirEnd - 1) == L'\\'); // hence -1 below +if (wcsncmp(env, iniDirectory, iniDirEnd - iniDirectory - 1) != 0 +
[Libreoffice-commits] core.git: connectivity/source
connectivity/source/drivers/firebird/ResultSet.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 621c1201f7346eba62d75cf119ec33e7e5f327f0 Author: Noel Grandin Date: Mon Sep 4 11:57:11 2017 +0200 loplugin:unnecessaryparen in connectivity Change-Id: Iee4b0caa2eb7ad6d335f55adc19e7ed78b34335c diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx index 3923ccedd1d5..859b28f48d0c 100644 --- a/connectivity/source/drivers/firebird/ResultSet.cxx +++ b/connectivity/source/drivers/firebird/ResultSet.cxx @@ -503,7 +503,7 @@ Date OResultSet::retrieveValue(const sal_Int32 nColumnIndex, const ISC_SHORT /*n { if ((m_pSqlda->sqlvar[nColumnIndex-1].sqltype & ~1) == SQL_TYPE_DATE) { -ISC_DATE aISCDate = *(reinterpret_cast(m_pSqlda->sqlvar[nColumnIndex-1].sqldata)); +ISC_DATE aISCDate = *reinterpret_cast(m_pSqlda->sqlvar[nColumnIndex-1].sqldata); struct tm aCTime; isc_decode_sql_date(&aISCDate, &aCTime); @@ -521,7 +521,7 @@ Time OResultSet::retrieveValue(const sal_Int32 nColumnIndex, const ISC_SHORT /*n { if ((m_pSqlda->sqlvar[nColumnIndex-1].sqltype & ~1) == SQL_TYPE_TIME) { -ISC_TIME aISCTime = *(reinterpret_cast(m_pSqlda->sqlvar[nColumnIndex-1].sqldata)); +ISC_TIME aISCTime = *reinterpret_cast(m_pSqlda->sqlvar[nColumnIndex-1].sqldata); struct tm aCTime; isc_decode_sql_time(&aISCTime, &aCTime); @@ -541,7 +541,7 @@ DateTime OResultSet::retrieveValue(const sal_Int32 nColumnIndex, const ISC_SHORT { if ((m_pSqlda->sqlvar[nColumnIndex-1].sqltype & ~1) == SQL_TIMESTAMP) { -ISC_TIMESTAMP aISCTimestamp = *(reinterpret_cast(m_pSqlda->sqlvar[nColumnIndex-1].sqldata)); +ISC_TIMESTAMP aISCTimestamp = *reinterpret_cast(m_pSqlda->sqlvar[nColumnIndex-1].sqldata); struct tm aCTime; isc_decode_timestamp(&aISCTimestamp, &aCTime); @@ -577,7 +577,7 @@ OUString OResultSet::retrieveValue(const sal_Int32 nColumnIndex, const ISC_SHORT { // First 2 bytes are a short containing the length of the string // No idea if sqllen is still valid here? -sal_uInt16 aLength = *(reinterpret_cast(m_pSqlda->sqlvar[nColumnIndex-1].sqldata)); +sal_uInt16 aLength = *reinterpret_cast(m_pSqlda->sqlvar[nColumnIndex-1].sqldata); return OUString(m_pSqlda->sqlvar[nColumnIndex-1].sqldata + 2, aLength, RTL_TEXTENCODING_UTF8); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/README
sw/README | 12 1 file changed, 12 insertions(+) New commits: commit bbcd952c062288d9ee1efe9c786c2146abf457ea Author: Miklos Vajna Date: Mon Sep 4 12:09:42 2017 +0200 sw: document the "leaf" layout concept For some reason this is missing from the usual wiki pages. Change-Id: I2c3dcce983053452dc9fd1e886f8169678d7e6a4 diff --git a/sw/README b/sw/README index 60de27ba4ccd..54feb78fa7d1 100644 --- a/sw/README +++ b/sw/README @@ -197,3 +197,15 @@ There are multiple model classes involved for fields: Note that there is no UNO service to represent a list. +=== Layout === + +The layout is a tree of SwFrame subclasses, the following relationships are +possible between frames: + +- You can visit the tree by following the upper, lower, next and previous pointers. +- The functionality of flowing of a frame across multiple parents (e.g. pages) + is implemented in SwFlowFrame, which is not an SwFrame subclass. The logical + chain of such frames can be visited using the follow and precede pointers. + ("Leaf" is a term that refers to such a relationship.) +- In case a frame is split into multiple parts, then the first one is called + master, while the others are called follows. ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Use HTTPS URLs in announcements and blog posts
Dear LibreOffice, The article *The Document Foundation announces LibreOffice 5.4.1 “fresh” and LibreOffice 5.3.6 “still”* [1] uses insecure HTTP URLs instead of the more secure HTTPS URLs. Could the article and the templates please be updated? If this is the wrong forum, please tell me where to report such issues. Kind regards, Paul [1] https://blog.documentfoundation.org/blog/2017/08/31/document-foundation-announces-libreoffice-5-4-1-fresh-libreoffice-5-3-6-still/ ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: sd/CppunitTest_sd_import_tests_smartart.mk sd/Module_sd.mk sd/qa
sd/CppunitTest_sd_import_tests_smartart.mk | 119 + sd/Module_sd.mk|1 sd/qa/unit/import-tests-smartart.cxx | 192 + sd/qa/unit/import-tests.cxx| 159 4 files changed, 312 insertions(+), 159 deletions(-) New commits: commit 04749a1115a44ce7a2d05c1ea6c23613feded5f9 Author: Grzegorz Araminowicz Date: Sun Sep 3 17:36:50 2017 +0200 SmartArt: separate unit tests Change-Id: I9bf522caae155de354c2d28dd92d85e4c016aa14 Reviewed-on: https://gerrit.libreoffice.org/41877 Tested-by: Jenkins Reviewed-by: Tamás Zolnai diff --git a/sd/CppunitTest_sd_import_tests_smartart.mk b/sd/CppunitTest_sd_import_tests_smartart.mk new file mode 100755 index ..de7c5fae2925 --- /dev/null +++ b/sd/CppunitTest_sd_import_tests_smartart.mk @@ -0,0 +1,119 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +#* +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +#* + +$(eval $(call gb_CppunitTest_CppunitTest,sd_import_tests_smartart)) + +$(eval $(call gb_CppunitTest_use_externals,sd_import_tests_smartart,\ + boost_headers \ + libxml2 \ +)) + +$(eval $(call gb_CppunitTest_add_exception_objects,sd_import_tests_smartart, \ +sd/qa/unit/import-tests-smartart \ +)) + +$(eval $(call gb_CppunitTest_use_libraries,sd_import_tests_smartart, \ + $(call gb_Helper_optional,AVMEDIA,avmedia) \ +basegfx \ +comphelper \ +cppu \ +cppuhelper \ +drawinglayer \ +editeng \ +for \ +forui \ +i18nlangtag \ +msfilter \ +oox \ +sal \ +salhelper \ +sax \ +sd \ +sfx \ +sot \ +svl \ +svt \ +svx \ +svxcore \ +test \ +tl \ +tk \ +ucbhelper \ +unotest \ +utl \ +vcl \ +xo \ +)) + +$(eval $(call gb_CppunitTest_set_include,sd_import_tests_smartart,\ +-I$(SRCDIR)/sd/source/ui/inc \ +-I$(SRCDIR)/sd/inc \ +$$(INCLUDE) \ +)) + +$(eval $(call gb_CppunitTest_use_sdk_api,sd_import_tests_smartart)) + +$(eval $(call gb_CppunitTest_use_ure,sd_import_tests_smartart)) +$(eval $(call gb_CppunitTest_use_vcl,sd_import_tests_smartart)) + +$(eval $(call gb_CppunitTest_use_components,sd_import_tests_smartart,\ +animations/source/animcore/animcore \ +basic/util/sb \ +chart2/source/chartcore \ +chart2/source/controller/chartcontroller \ +comphelper/util/comphelp \ +configmgr/source/configmgr \ +dbaccess/util/dba \ +desktop/source/deployment/deployment \ +embeddedobj/util/embobj \ +emfio/emfio \ +filter/source/config/cache/filterconfig1 \ + filter/source/odfflatxml/odfflatxml \ +filter/source/svg/svgfilter \ +filter/source/xmlfilteradaptor/xmlfa \ + filter/source/xmlfilterdetect/xmlfd \ +forms/util/frm \ +framework/util/fwk \ +i18npool/util/i18npool \ +linguistic/source/lng \ +oox/util/oox \ +package/source/xstor/xstor \ +package/util/package2 \ +sax/source/expatwrap/expwrap \ +sd/util/sd \ +sd/util/sdfilt \ +sd/util/sdd \ +sfx2/util/sfx \ +sot/util/sot \ +svl/source/fsstor/fsstorage \ +svtools/util/svt \ +svx/util/svxcore \ +toolkit/util/tk \ +ucb/source/core/ucb1 \ +ucb/source/ucp/expand/ucpexpand1 \ +ucb/source/ucp/file/ucpfile1 \ +ucb/source/ucp/package/ucppkg1 \ +ucb/source/ucp/tdoc/ucptdoc1 \ +unotools/util/utl \ +unoxml/source/rdf/unordf \ +unoxml/source/service/unoxml \ +uui/util/uui \ +xmloff/util/xo \ +xmlsecurity/util/xmlsecurity \ +)) + +$(eval $(call gb_CppunitTest_use_configuration,sd_import_tests_smartart)) + +$(eval $(call gb_CppunitTest_use_packages,sd_import_tests_smartart,\ + oox_customshapes \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/sd/Module_sd.mk b/sd/Module_sd.mk index c1e67695fe7e..9a35b832a5bf 100644 --- a/sd/Module_sd.mk +++ b/sd/Module_sd.mk @@ -30,6 +30,7 @@ $(eval $(call gb_Module_add_check_targets,sd,\ $(if $(and $(filter $(COM),MSC),$(MERGELIBS)),, \ CppunitTest_sd_uimpress) \ CppunitTest_sd_import_tests \ +CppunitTest_sd_import_tests_smartart \ CppunitTest_sd_export_ooxml1 \ CppunitTest_sd_export_ooxml2 \ CppunitTest_sd_export_tests \ diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx new file mode 100755 index ..e86dab7f4745 --- /dev/null +++ b/sd/qa/unit/import-tests-smartart.cxx @@ -0,0 +1,192 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part
[Libreoffice-commits] core.git: sc/source
sc/source/core/tool/interpr1.cxx |8 ++-- sc/source/core/tool/scmatrix.cxx |8 2 files changed, 14 insertions(+), 2 deletions(-) New commits: commit 9e694c747954078442d47d3d7bd1d4db283b96ff Author: Eike Rathke Date: Mon Sep 4 12:57:16 2017 +0200 Resolves: tdf#103734 propagate error from matrix to MIN()/MAX() Change-Id: I1ebc5baf4957ef9e3d1477b803cf7fee02754360 diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 1b1ba4f703a6..78a7e6311b68 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -3631,7 +3631,9 @@ void ScInterpreter::ScMin( bool bTextAsZero ) } else { -if ( nVal < nMin ) +if (!rtl::math::isFinite(nVal)) +PushError( GetDoubleErrorValue( nVal)); +else if ( nVal < nMin ) PushDouble(0.0);// zero or only empty arguments else PushDouble(nMin); @@ -3786,7 +3788,9 @@ void ScInterpreter::ScMax( bool bTextAsZero ) } else { -if ( nVal > nMax ) +if (!rtl::math::isFinite(nVal)) +PushError( GetDoubleErrorValue( nVal)); +else if ( nVal > nMax ) PushDouble(0.0);// zero or only empty arguments else PushDouble(nMax); diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx index 6e0e9bb7b69b..27836073b491 100644 --- a/sc/source/core/tool/scmatrix.cxx +++ b/sc/source/core/tool/scmatrix.cxx @@ -1390,6 +1390,10 @@ struct MaxOp static double init() { return -std::numeric_limits::max(); } static double compare(double left, double right) { +if (!rtl::math::isFinite(left)) +return left; +if (!rtl::math::isFinite(right)) +return right; return std::max(left, right); } @@ -1408,6 +1412,10 @@ struct MinOp static double init() { return std::numeric_limits::max(); } static double compare(double left, double right) { +if (!rtl::math::isFinite(left)) +return left; +if (!rtl::math::isFinite(right)) +return right; return std::min(left, right); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sw/source vcl/inc vcl/unx
sw/source/core/doc/list.cxx |4 ++-- vcl/inc/unx/gtk/gtkgdi.hxx|1 + vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 16 +++- 3 files changed, 18 insertions(+), 3 deletions(-) New commits: commit 1d094369dced5f84991b95aa965ade12e68f69c5 Author: Caolán McNamara Date: Mon Sep 4 11:19:57 2017 +0100 Resolves: tdf#111864 render progress bar for Ambiance theme properly Change-Id: I8ce43e4516413ea3779a128b374a931b080ae970 Reviewed-on: https://gerrit.libreoffice.org/41879 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/inc/unx/gtk/gtkgdi.hxx b/vcl/inc/unx/gtk/gtkgdi.hxx index 4b0a670763da..345f7282fc1e 100644 --- a/vcl/inc/unx/gtk/gtkgdi.hxx +++ b/vcl/inc/unx/gtk/gtkgdi.hxx @@ -70,6 +70,7 @@ enum class GtkControlPart ScrollbarHorizontalSlider, ScrollbarHorizontalButton, ProgressBar, +ProgressBarTrough, ProgressBarProgress, Notebook, NotebookHeader, diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx index f0d57e34069b..898df4499adc 100644 --- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx @@ -1588,6 +1588,13 @@ GtkStyleContext* GtkSalGraphics::createNewContext(GtkControlPart ePart, gtk_widg gtk_widget_path_iter_add_class(path, -1, GTK_STYLE_CLASS_HORIZONTAL); return makeContext(path, nullptr); } +case GtkControlPart::ProgressBarTrough: +{ +GtkWidgetPath *path = gtk_widget_path_copy(gtk_style_context_get_path(mpProgressBarStyle)); +gtk_widget_path_append_type(path, GTK_TYPE_PROGRESS_BAR); +set_object_name(path, -1, "trough"); +return makeContext(path, mpProgressBarStyle); +} case GtkControlPart::ProgressBarProgress: { GtkWidgetPath *path = gtk_widget_path_copy(gtk_style_context_get_path(mpProgressBarTroughStyle)); @@ -1921,6 +1928,13 @@ GtkStyleContext* GtkSalGraphics::createOldContext(GtkControlPart ePart) gtk_widget_path_iter_add_class(path, -1, GTK_STYLE_CLASS_HORIZONTAL); return makeContext(path, nullptr); } +case GtkControlPart::ProgressBarTrough: +{ +GtkWidgetPath *path = gtk_widget_path_copy(gtk_style_context_get_path(mpProgressBarStyle)); +gtk_widget_path_append_type(path, GTK_TYPE_PROGRESS_BAR); +gtk_widget_path_iter_add_class(path, -1, GTK_STYLE_CLASS_TROUGH); +return makeContext(path, mpProgressBarStyle); +} case GtkControlPart::ProgressBarProgress: { GtkWidgetPath *path = gtk_widget_path_copy(gtk_style_context_get_path(mpProgressBarTroughStyle)); @@ -3496,7 +3510,7 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow ) /* Progress Bar */ mpProgressBarStyle = createStyleContext(set_object_name, GtkControlPart::ProgressBar); -mpProgressBarTroughStyle = createStyleContext(set_object_name, GtkControlPart::ProgressBar); +mpProgressBarTroughStyle = createStyleContext(set_object_name, GtkControlPart::ProgressBarTrough); mpProgressBarProgressStyle = createStyleContext(set_object_name, GtkControlPart::ProgressBarProgress); gtk_widget_show_all(gDumbContainer); commit 96654770b311825226c122cf60a624f0f155a3a2 Author: Caolán McNamara Date: Mon Sep 4 09:08:13 2017 +0100 coverity#1399392 Uncaught exception Change-Id: Ic9eb2233d4e88ed9923bdabcf09b2a92ad24c0bf Reviewed-on: https://gerrit.libreoffice.org/41880 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/core/doc/list.cxx b/sw/source/core/doc/list.cxx index 753965a799ce..711ebbfd1804 100644 --- a/sw/source/core/doc/list.cxx +++ b/sw/source/core/doc/list.cxx @@ -33,7 +33,7 @@ class SwListImpl SwListImpl( const OUString& sListId, SwNumRule& rDefaultListStyle, const SwNodes& rNodes ); -~SwListImpl(); +~SwListImpl() COVERITY_NOEXCEPT_FALSE; const OUString& GetListId() const { return msListId;} @@ -96,7 +96,7 @@ SwListImpl::SwListImpl( const OUString& sListId, while ( pNode != &rNodes.GetEndOfContent() ); } -SwListImpl::~SwListImpl() +SwListImpl::~SwListImpl() COVERITY_NOEXCEPT_FALSE { tListTrees::iterator aNumberTreeIter; for ( aNumberTreeIter = maListTrees.begin(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: filter/source
filter/source/msfilter/msdffimp.cxx | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) New commits: commit f2cffa12672175e69924746c341bbfd93dcce509 Author: Caolán McNamara Date: Mon Sep 4 12:31:59 2017 +0100 fix DEBUG_FILTER_MSDFFIMP code Change-Id: I3463935177166a808c46a5bdffcda02f45f371c5 diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index de7d3272329e..6c749473d1f9 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -6432,19 +6432,19 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, tool { if ( bZCodecCompression ) { -xOut->Seek( STREAM_SEEK_TO_END ); -pDbgOut->Write( xOut->GetData(), xOut->Tell() ); -xOut->Seek( STREAM_SEEK_TO_BEGIN ); +xOut->Seek(STREAM_SEEK_TO_END); +pDbgOut->WriteBytes(xOut->GetData(), xOut->Tell()); +xOut->Seek(STREAM_SEEK_TO_BEGIN); } else { sal_Int32 nDbgLen = nLength - nSkip; if ( nDbgLen ) { -std::unique_ptr xDat(new sal_Char[ nDbgLen ]); -pGrStream->Read( xDat.get(), nDbgLen ); -pDbgOut->Write( xDat.get(), nDbgLen ); -pGrStream->SeekRel( -nDbgLen ); +std::vector aData(nDbgLen); +pGrStream->ReadBytes(aData.data(), nDbgLen); +pDbgOut->WriteBytes(aData.data(), nDbgLen); +pGrStream->SeekRel(-nDbgLen); } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/inc
sc/inc/globstr.hrc |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 62c6e17fc03ae54cf3f6b667cf8ba205b92996a5 Author: Eike Rathke Date: Mon Sep 4 13:35:57 2017 +0200 Apostrophe ' is invalid as first or last character in sheet name, tdf#103027 So hint in dialog. Change-Id: I04c85c9fc8d89ecc1be4d8d7fddc58672314d2dc diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc index 21eb86eb9cc3..644ecae7afe2 100644 --- a/sc/inc/globstr.hrc +++ b/sc/inc/globstr.hrc @@ -174,7 +174,7 @@ #define STR_ERR_NEWSCENARIO NC_("STR_ERR_NEWSCENARIO", "The scenario ranges must be selected in order to be able to create a new scenario.") #define STR_NOAREASELECTED NC_("STR_NOAREASELECTED", "A range has not been selected.") #define STR_NEWTABNAMENOTUNIQUE NC_("STR_NEWTABNAMENOTUNIQUE", "This name already exists.") -#define STR_INVALIDTABNAME NC_("STR_INVALIDTABNAME", "Invalid sheet name.\nThe sheet name must not be a duplicate of an existing name \nand may not contain the characters [ ] * ? : / \\") +#define STR_INVALIDTABNAME NC_("STR_INVALIDTABNAME", "Invalid sheet name.\nThe sheet name must not be a duplicate of an existing name \nand may not contain the characters [ ] * ? : / \\ \nor the character ' (apostrophe) as first or last character.") #define STR_SCENARIONC_("STR_SCENARIO", "Scenario") #define STR_PIVOT_TABLE NC_("STR_PIVOT_TABLE", "Pivot Table") // Text strings for captions of subtotal functions. ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: xmlsecurity/inc
xmlsecurity/inc/framework/securityengine.hxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 10bf5f34a851cd363d36507aedd6423be097fe93 Author: Stephan Bergmann Date: Mon Sep 4 13:42:58 2017 +0200 loplugin:dyncastvisibility Change-Id: I50c89b310da84e3d6a47b18114c20b4c35628a50 diff --git a/xmlsecurity/inc/framework/securityengine.hxx b/xmlsecurity/inc/framework/securityengine.hxx index c359431f66ec..b0cb842d5e56 100644 --- a/xmlsecurity/inc/framework/securityengine.hxx +++ b/xmlsecurity/inc/framework/securityengine.hxx @@ -29,7 +29,7 @@ #include -class SecurityEngine : public cppu::WeakImplHelper +class SAL_DLLPUBLIC_RTTI SecurityEngine : public cppu::WeakImplHelper < css::xml::crypto::sax::XReferenceResolvedListener, css::xml::crypto::sax::XKeyCollector, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/qa sw/source
sw/qa/extras/uiwriter/data/tdf112160.fodt | 125 ++ sw/qa/extras/uiwriter/uiwriter.cxx| 25 ++ sw/source/core/layout/sectfrm.cxx |9 +- 3 files changed, 158 insertions(+), 1 deletion(-) New commits: commit ec262cbc56822d8fffccd6e983848df196cf5c44 Author: Miklos Vajna Date: Mon Sep 4 12:44:15 2017 +0200 tdf#112160 sw: audit GetNextLayoutLeaf() calls in SwFrame::GetNextSctLeaf() GetNextLayoutLeaf() returns the next container, not the follow one, so calls to that without checking first if we are in a table are always suspicious. This leads at the end to strange content move, as described in the bug. There appears to be only a single place in SwFrame::GetNextSctLeaf() which may be executed for split sections and called GetNextLayoutLeaf() unconditionally. Change-Id: I759d9ef63660f3d2ffe006c88b18cba7dba99f33 Reviewed-on: https://gerrit.libreoffice.org/41882 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/sw/qa/extras/uiwriter/data/tdf112160.fodt b/sw/qa/extras/uiwriter/data/tdf112160.fodt new file mode 100644 index ..d02352e4d2a6 --- /dev/null +++ b/sw/qa/extras/uiwriter/data/tdf112160.fodt @@ -0,0 +1,125 @@ + +http://www.w3.org/1999/xlink"; xmlns:dc="http://purl.org/dc/elements/1.1/"; xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML"; xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oas is:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office"; xmlns:ooow="http://openoffice.org/2004/writer"; xmlns:oooc="http://openoffice.org/2004/calc"; xmlns:dom="http://www.w3.org/2001/xml-events"; xmlns:xforms="http://www.w3.org/2002/xforms"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:rpt="http://openoffice.org/2005/report"; xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml"; xmlns:grddl="http://www.w3.org/2003/g/data-view#"; xmlns:officeooo="http://openoffice.org/2009/office"; xmlns:tableooo="http://openoffice.org/2009/table"; xmlns:drawooo="http://openoffice.org/2010/draw"; xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names: experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Table1.A1 + + + + + Table1.B1 + + + + + Table1.C1 + + + + + Table1.D1 + + + + + + + Table1.A2 + + + + + Table1.B2 + + + + + Table1.C2 + + + + + Table1.D2 + + + + + + + + diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index e36ca6eb6da0..dba77fca30f0 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -266,6 +266,7 @@ public: void testTableInNestedSection(); void testTableInSectionInTable(); void testSectionInTableInTable(); +void testTdf112160(); void testLinesMoveBackwardsInSectionInTable(); #endif void testLinesInSectionInTable(); @@ -419,6 +420,7 @@ public: CPPUNIT_TEST(testTableInNestedSection); CPPUNIT_TEST(testTableInSectionInTable); CPPUNIT_TEST(testSectionInTableInTable); +CPPUNIT_TEST(testTdf112160); CPPUNIT_TEST(testLinesMoveBackwardsInSection
[Libreoffice-commits] core.git: android/source
android/source/AndroidManifest.xml |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1470aaec9efe698e8ce6b654663fb9683746812d Author: Christian Lohmaier Date: Mon Sep 4 14:24:12 2017 +0200 tdf#112190 installLocation should be specified in toplevel manifest Thanks to Petr Vorel for catching this. Fixes portion of 66518ead516e90d606e87c6ce58ec11fea6d172e that added back the android:installLocation placeholder Change-Id: Ibddfafb65fabcb5df3f7a6626a00f5d71bc9 diff --git a/android/source/AndroidManifest.xml b/android/source/AndroidManifest.xml index 54ab1d4ba7c0..97db04865f1e 100644 --- a/android/source/AndroidManifest.xml +++ b/android/source/AndroidManifest.xml @@ -1,5 +1,6 @@ http://schemas.android.com/apk/res/android"; +android:installLocation="${installLocation}" package="org.libreoffice"> @@ -14,7 +15,6 @@ android:allowBackup="true" android:extractNativeLibs="${extractNativeLibs}" android:icon="@mipmap/ic_launcher" -android:installLocation="${installLocation}" android:label="@string/app_name" android:theme="@style/LibreOfficeTheme" android:debuggable="true" ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/inc vcl/unx
vcl/inc/unx/gtk/gtkframe.hxx |2 +- vcl/unx/gtk/gtksalframe.cxx |4 +++- vcl/unx/gtk3/gtk3gtkframe.cxx | 38 +- 3 files changed, 25 insertions(+), 19 deletions(-) New commits: commit 3266c3bf545cc3045f843f764b4c420241d9e4da Author: Caolán McNamara Date: Mon Sep 4 12:05:04 2017 +0100 Resolves: tdf#110452 stop menubar processing Alt+foo if handled by core widget Change-Id: I69f975d0f7a753e55f72fcd63f6580e958a80f38 Reviewed-on: https://gerrit.libreoffice.org/41884 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx index 772033b49b76..0d40659e49f9 100644 --- a/vcl/inc/unx/gtk/gtkframe.hxx +++ b/vcl/inc/unx/gtk/gtkframe.hxx @@ -288,7 +288,7 @@ class GtkSalFrame : public SalFrame voidCenter(); voidSetDefaultSize(); -voiddoKeyCallback( guint state, +booldoKeyCallback( guint state, guint keyval, guint16 hardware_keycode, guint8 group, diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index b8cac669deb4..8bd532eea78c 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -363,7 +363,7 @@ GetAlternateKeyCode( const sal_uInt16 nKeyCode ) return aAlternate; } -void GtkSalFrame::doKeyCallback( guint state, +bool GtkSalFrame::doKeyCallback( guint state, guint keyval, guint16 hardware_keycode, guint8 group, @@ -445,6 +445,8 @@ void GtkSalFrame::doKeyCallback( guint state, } else CallCallback( SalEvent::KeyUp, &aEvent ); + +return false; } GtkSalFrame::GtkSalFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index 1d43d1999811..c9c0eb50c7c9 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -363,7 +363,7 @@ GetAlternateKeyCode( const sal_uInt16 nKeyCode ) static bool dumpframes = false; -void GtkSalFrame::doKeyCallback( guint state, +bool GtkSalFrame::doKeyCallback( guint state, guint keyval, guint16 hardware_keycode, guint8 group, @@ -387,19 +387,19 @@ void GtkSalFrame::doKeyCallback( guint state, { fprintf( stderr, "force widget_queue_draw\n"); gtk_widget_queue_draw(GTK_WIDGET(m_pFixedContainer)); -return; +return false; } else if (keyval == GDK_KEY_1) { fprintf( stderr, "force repaint all\n"); TriggerPaintEvent(); -return; +return false; } else if (keyval == GDK_KEY_2) { dumpframes = !dumpframes; fprintf(stderr, "toggle dump frames to %d\n", dumpframes); -return; +return false; } } #endif @@ -448,11 +448,12 @@ void GtkSalFrame::doKeyCallback( guint state, aEvent.mnCode |= GetKeyModCode( state ); +bool bStopProcessingKey; if (bDown) { -bool bHandled = CallCallbackExc( SalEvent::KeyInput, &aEvent ); +bStopProcessingKey = CallCallbackExc(SalEvent::KeyInput, &aEvent); // #i46889# copy AlternateKeyCode handling from generic plugin -if( ! bHandled ) +if (!bStopProcessingKey) { KeyAlternate aAlternate = GetAlternateKeyCode( aEvent.mnCode ); if( aAlternate.nKeyCode ) @@ -460,16 +461,17 @@ void GtkSalFrame::doKeyCallback( guint state, aEvent.mnCode = aAlternate.nKeyCode; if( aAlternate.nCharCode ) aEvent.mnCharCode = aAlternate.nCharCode; -CallCallbackExc( SalEvent::KeyInput, &aEvent ); +bStopProcessingKey = CallCallbackExc(SalEvent::KeyInput, &aEvent); } } if( bSendRelease && ! aDel.isDeleted() ) { -CallCallbackExc( SalEvent::KeyUp, &aEvent ); +CallCallbackExc(SalEvent::KeyUp, &aEvent); } } else -CallCallbackExc( SalEvent::KeyUp, &aEvent ); +bStopProcessingKey = CallCallbackExc(SalEvent::KeyUp, &aEvent); +return bStopProcessingKey; } GtkSalFrame::GtkSalFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) @@ -3073,6 +3075,8 @@ gboolean GtkSalFrame::signalKey(GtkWidget* pWidget, GdkEventKey* pEvent, gpointe return true; } +bool bStopProcessingKey = false; + // handle modifiers if( pEvent->keyval == GDK_KEY_Shift_L || pEvent->keyval == GDK_KEY_Shift_R || pEvent->keyval == GDK_KEY_Control_L || pEvent->keyval == GDK_KEY_Cont
[Libreoffice-commits] core.git: compilerplugins/clang
compilerplugins/clang/redundantpointerops.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a40d37b4d61f70a51a739732bcf7ad94c2ca4f0a Author: Andrea Gelmini Date: Mon Sep 4 13:33:36 2017 +0200 Fix typo Change-Id: Iab1878108420c2437f9d7e36696a68b1cfb024f9 Reviewed-on: https://gerrit.libreoffice.org/41890 Reviewed-by: Julien Nabet Tested-by: Julien Nabet diff --git a/compilerplugins/clang/redundantpointerops.cxx b/compilerplugins/clang/redundantpointerops.cxx index 6a88cdb13d70..3a971b24d804 100644 --- a/compilerplugins/clang/redundantpointerops.cxx +++ b/compilerplugins/clang/redundantpointerops.cxx @@ -20,7 +20,7 @@ /** * Look for: * (&x)->y - * which can be tranformed to: + * which can be transformed to: * x.y * And *&*x ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/qa
sw/qa/extras/ooxmlimport/ooxmlimport.cxx |4 ++-- sw/qa/extras/uiwriter/uiwriter.cxx |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) New commits: commit 1620a97e1d5d6d8cec2c9ff12918a9ddaa9fd27f Author: Caolán McNamara Date: Mon Sep 4 12:21:55 2017 +0100 just blow through the hierarchy to find the polylines Change-Id: I080243911e07d46a1ecc3f935df8ec86b54931e9 Reviewed-on: https://gerrit.libreoffice.org/41889 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 475f29017104..d6c55f7d5ca1 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1281,10 +1281,10 @@ DECLARE_OOXMLIMPORT_TEST(testTdf100072, "tdf100072.docx") xmlDocPtr pXmlDoc = dumper.dumpAndParse(rMetaFile); // Get first polyline rightside x coordinate -sal_Int32 nFirstEnd = getXPath(pXmlDoc, "/metafile/push[1]/polyline[1]/point[2]", "x").toInt32(); +sal_Int32 nFirstEnd = getXPath(pXmlDoc, "(//polyline)[1]/point[2]", "x").toInt32(); // Get last stroke x coordinate -sal_Int32 nSecondEnd = getXPath(pXmlDoc, "/metafile/push[last()]/polyline[last()]/point[2]", "x").toInt32(); +sal_Int32 nSecondEnd = getXPath(pXmlDoc, "(//polyline)[last()]/point[2]", "x").toInt32(); // Assert that the difference is less than half point. CPPUNIT_ASSERT_MESSAGE("Shape line width does not match", abs(nFirstEnd - nSecondEnd) < 10); diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index dba77fca30f0..c3ef16b82558 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -1494,10 +1494,10 @@ void SwUiWriterTest::testFdo87448() // The first polyline in the document has a number of points to draw arcs, // the last one jumps back to the start, so we call "end" the last but one. -sal_Int32 nFirstEnd = getXPath(pXmlDoc, "/metafile/push[2]/polyline[1]/point[last()-1]", "x").toInt32(); +sal_Int32 nFirstEnd = getXPath(pXmlDoc, "(//polyline)[1]/point[last()-1]", "x").toInt32(); // The second polyline has a different start point, but the arc it draws // should end at the ~same position as the first polyline. -sal_Int32 nSecondEnd = getXPath(pXmlDoc, "/metafile/push[5]/polyline[1]/point[last()]", "x").toInt32(); +sal_Int32 nSecondEnd = getXPath(pXmlDoc, "(//polyline)[2]/point[last()]", "x").toInt32(); // nFirstEnd was 6023 and nSecondEnd was 6648, now they should be much closer, e.g. nFirstEnd = 6550, nSecondEnd = 6548 OString aMsg = "nFirstEnd is " + OString::number(nFirstEnd) + ", nSecondEnd is " + OString::number(nSecondEnd); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sc/source
sc/source/core/data/formulacell.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 5f847b3d197a96e5c2bab3d9129d3dd9d5b75873 Author: Tor Lillqvist Date: Wed Aug 16 12:43:37 2017 +0300 Make two slightly mysterious static local variables thread_local IRC discussion about them: tml_: erAck: any idea why in ScFormulaCell::GetMatrixEdge those nC and nR are static? tml_: seems to have been since initial import in 2000 (then in a different file, and of type USHORT) tml_: let's assume it is just random insanity tml_: hmm, no, making them non-static actually breaks a unit test. wow erAck: tml_: they are reused when the call is for the same matrix origin as the last one to not have to recalculate the same thing tml_: erAck: ah ok Change-Id: Ib0fe322492917b5224937ec6ef527707ca2e07f7 Reviewed-on: https://gerrit.libreoffice.org/41658 Tested-by: Jenkins Reviewed-by: Eike Rathke diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 82c5f970e911..22ef81ca2495 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -2658,8 +2658,8 @@ sc::MatrixEdge ScFormulaCell::GetMatrixEdge( ScAddress& rOrgPos ) const case ScMatrixMode::Formula : case ScMatrixMode::Reference : { -static SCCOL nC; -static SCROW nR; +static thread_local SCCOL nC; +static thread_local SCROW nR; ScAddress aOrg; if ( !GetMatrixOrigin( aOrg ) ) return sc::MatrixEdge::Nothing; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
git-hook: Catch tab indentation also for makefiles
Hi there, I just noticed that for makefiles (*.mk) git does not check whether the commit contains tab indentation. As I know we use spaces also for makefiles for indentation, right? So I added a patch changing pre-commit hook to check tab also for makfiles: https://gerrit.libreoffice.org/#/c/41897/ I hope it's ok. I don't know who used to care of git stuff. Thanks, Tamás ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: git-hook: Catch tab indentation also for makefiles
On 09/04/2017 03:30 PM, Tamas Zolnai wrote: I just noticed that for makefiles (*.mk) git does not check whether the commit contains tab indentation. As I know we use spaces also for makefiles for indentation, right? So I added a patch changing pre-commit hook to check tab also for makfiles: https://gerrit.libreoffice.org/#/c/41897/ I hope it's ok. I don't know who used to care of git stuff. I think temporary GNU make still needs recipe lines to start with tab characters? And in any case, our makefiles are apparently written with lots of tab characters all over the place. I'd suggest to revert (at least for now). ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: git-hook: Catch tab indentation also for makefiles
2017-09-04 15:43 GMT+02:00 Stephan Bergmann : > On 09/04/2017 03:30 PM, Tamas Zolnai wrote: > >> I just noticed that for makefiles (*.mk) git does not check whether the >> commit contains tab indentation. As I know we use spaces also for makefiles >> for indentation, right? So I added a patch changing pre-commit hook to >> check tab also for makfiles: >> https://gerrit.libreoffice.org/#/c/41897/ >> I hope it's ok. I don't know who used to care of git stuff. >> > > I think temporary GNU make still needs recipe lines to start with tab > characters? And in any case, our makefiles are apparently written with > lots of tab characters all over the place. I'd suggest to revert (at least > for now). Yeah, I see that tabs and spaces are mixed in makefiles. That's why I thought it would be good to make it consistent similar to other source files. I did not push it yet. It's on gerrit. So I can abandon it. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: Branch 'distro/escriba/escriba-5.2.1' - sw/qa sw/source
sw/qa/extras/uiwriter/data/tdf112160.fodt | 125 ++ sw/qa/extras/uiwriter/uiwriter.cxx| 25 ++ sw/source/core/layout/sectfrm.cxx |9 +- 3 files changed, 158 insertions(+), 1 deletion(-) New commits: commit 5e394dce3482951adc1eefce3014565da0920055 Author: Miklos Vajna Date: Mon Sep 4 12:44:15 2017 +0200 tdf#112160 sw: audit GetNextLayoutLeaf() calls in SwFrame::GetNextSctLeaf() GetNextLayoutLeaf() returns the next container, not the follow one, so calls to that without checking first if we are in a table are always suspicious. This leads at the end to strange content move, as described in the bug. There appears to be only a single place in SwFrame::GetNextSctLeaf() which may be executed for split sections and called GetNextLayoutLeaf() unconditionally. Reviewed-on: https://gerrit.libreoffice.org/41882 Reviewed-by: Miklos Vajna Tested-by: Jenkins (cherry picked from commit ec262cbc56822d8fffccd6e983848df196cf5c44) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: I759d9ef63660f3d2ffe006c88b18cba7dba99f33 diff --git a/sw/qa/extras/uiwriter/data/tdf112160.fodt b/sw/qa/extras/uiwriter/data/tdf112160.fodt new file mode 100644 index ..d02352e4d2a6 --- /dev/null +++ b/sw/qa/extras/uiwriter/data/tdf112160.fodt @@ -0,0 +1,125 @@ + +http://www.w3.org/1999/xlink"; xmlns:dc="http://purl.org/dc/elements/1.1/"; xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML"; xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oas is:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office"; xmlns:ooow="http://openoffice.org/2004/writer"; xmlns:oooc="http://openoffice.org/2004/calc"; xmlns:dom="http://www.w3.org/2001/xml-events"; xmlns:xforms="http://www.w3.org/2002/xforms"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:rpt="http://openoffice.org/2005/report"; xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml"; xmlns:grddl="http://www.w3.org/2003/g/data-view#"; xmlns:officeooo="http://openoffice.org/2009/office"; xmlns:tableooo="http://openoffice.org/2009/table"; xmlns:drawooo="http://openoffice.org/2010/draw"; xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names: experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Table1.A1 + + + + + Table1.B1 + + + + + Table1.C1 + + + + + Table1.D1 + + + + + + + Table1.A2 + + + + + Table1.B2 + + + + + Table1.C2 + + + + + Table1.D2 + + + + + + + + diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index c9753a8f712c..3f998534ff59 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -205,6 +205,7 @@ public: void testTableInNestedSection(); void testTableInSectionInTable(); void testSectionInTableInTable(); +void testTdf112160(); void testLinesInSectionInTable(); void testLinesMoveBackwardsInSectionInTable(); @@ -316,6 +317,7 @@ public: CPPUNIT_TEST(testLinesInSectionInTable); CPPUNIT_TEST(testTableInSectio
[Libreoffice-commits] core.git: Branch 'distro/escriba/escriba-5.2' - sw/qa sw/source
sw/qa/extras/uiwriter/data/tdf112160.fodt | 125 ++ sw/qa/extras/uiwriter/uiwriter.cxx| 25 ++ sw/source/core/layout/sectfrm.cxx |9 +- 3 files changed, 158 insertions(+), 1 deletion(-) New commits: commit b877f024bcbb6fb3e51adff929617343e2673492 Author: Miklos Vajna Date: Mon Sep 4 12:44:15 2017 +0200 tdf#112160 sw: audit GetNextLayoutLeaf() calls in SwFrame::GetNextSctLeaf() GetNextLayoutLeaf() returns the next container, not the follow one, so calls to that without checking first if we are in a table are always suspicious. This leads at the end to strange content move, as described in the bug. There appears to be only a single place in SwFrame::GetNextSctLeaf() which may be executed for split sections and called GetNextLayoutLeaf() unconditionally. Reviewed-on: https://gerrit.libreoffice.org/41882 Reviewed-by: Miklos Vajna Tested-by: Jenkins (cherry picked from commit ec262cbc56822d8fffccd6e983848df196cf5c44) Conflicts: sw/qa/extras/uiwriter/uiwriter.cxx Change-Id: I759d9ef63660f3d2ffe006c88b18cba7dba99f33 diff --git a/sw/qa/extras/uiwriter/data/tdf112160.fodt b/sw/qa/extras/uiwriter/data/tdf112160.fodt new file mode 100644 index ..d02352e4d2a6 --- /dev/null +++ b/sw/qa/extras/uiwriter/data/tdf112160.fodt @@ -0,0 +1,125 @@ + +http://www.w3.org/1999/xlink"; xmlns:dc="http://purl.org/dc/elements/1.1/"; xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML"; xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oas is:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office"; xmlns:ooow="http://openoffice.org/2004/writer"; xmlns:oooc="http://openoffice.org/2004/calc"; xmlns:dom="http://www.w3.org/2001/xml-events"; xmlns:xforms="http://www.w3.org/2002/xforms"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:rpt="http://openoffice.org/2005/report"; xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml"; xmlns:grddl="http://www.w3.org/2003/g/data-view#"; xmlns:officeooo="http://openoffice.org/2009/office"; xmlns:tableooo="http://openoffice.org/2009/table"; xmlns:drawooo="http://openoffice.org/2010/draw"; xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names: experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Table1.A1 + + + + + Table1.B1 + + + + + Table1.C1 + + + + + Table1.D1 + + + + + + + Table1.A2 + + + + + Table1.B2 + + + + + Table1.C2 + + + + + Table1.D2 + + + + + + + + diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 9c5cb389a27a..8a7d5a7e7b91 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -207,6 +207,7 @@ public: void testTableInNestedSection(); void testTableInSectionInTable(); void testSectionInTableInTable(); +void testTdf112160(); void testLinesInSectionInTable(); void testLinesMoveBackwardsInSectionInTable(); @@ -320,6 +321,7 @@ public: CPPUNIT_TEST(testLinesInSectionInTable); CPPUNIT_TEST(testTableInSectio
Re: git-hook: Catch tab indentation also for makefiles
>> I think temporary GNU make still needs recipe lines to start with tab >> characters? And in any case, our makefiles are apparently written with lots >> of tab characters all over the place. I'd suggest to revert (at least for >> now). > > Yeah, I see that tabs and spaces are mixed in makefiles. That's why I thought > it would be good to make it consistent similar to other source files. > I did not push it yet. It's on gerrit. So I can abandon it. build breaks on my mac when I replace tab with spaces, so please do not make this a demand. rgds jan o ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: vcl/headless
vcl/headless/svpgdi.cxx | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) New commits: commit 3cb59bff332b02f607d15b5ed41b4438e8102980 Author: Caolán McNamara Date: Mon Sep 4 13:34:09 2017 +0100 Resolves: tdf#111483 1 bit bitmaps with non-standard black/white indexes can be left "untoggled" when converted to cairo A1 Change-Id: I18f3e2109cd4b57bce584545090e26c931de1200 Reviewed-on: https://gerrit.libreoffice.org/41895 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index ce01c4e89230..170d6c6087e6 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -113,6 +113,7 @@ namespace void Toggle1BitTransparency(const BitmapBuffer& rBuf) { +assert(rBuf.maPalette.GetBestIndex(BitmapColor(Color(COL_BLACK))) == 0); // TODO: make upper layers use standard alpha if (getCairoFormat(rBuf) == CAIRO_FORMAT_A1) { @@ -216,10 +217,14 @@ namespace pAlphaBits.reset( new unsigned char[nImageSize] ); memcpy(pAlphaBits.get(), pMaskBuf->mpBits, nImageSize); -// TODO: make upper layers use standard alpha -unsigned char* pDst = pAlphaBits.get(); -for (int i = nImageSize; --i >= 0; ++pDst) -*pDst = ~*pDst; +const sal_Int32 nBlackIndex = pMaskBuf->maPalette.GetBestIndex(BitmapColor(Color(COL_BLACK))); +if (nBlackIndex == 0) +{ +// TODO: make upper layers use standard alpha +unsigned char* pDst = pAlphaBits.get(); +for (int i = nImageSize; --i >= 0; ++pDst) +*pDst = ~*pDst; +} mask = cairo_image_surface_create_for_data(pAlphaBits.get(), CAIRO_FORMAT_A1, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sw/qa sw/source
sw/qa/extras/ooxmlexport/data/tdf37153_considerWrapOnObjPos.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport9.cxx| 18 ++ sw/source/core/layout/tabfrm.cxx |4 +- 3 files changed, 20 insertions(+), 2 deletions(-) New commits: commit e56f61c4637c09afbf125fa02f131b0c49e36351 Author: Justin Luth Date: Fri Sep 1 22:37:13 2017 -0400 tdf#37153 ConsiderWrapOnObjPos: always affect anchoring cell MSO doesn't make a distinction where the object is located - whether it is contained within the boundaries of the anchoring cell or not. It always affects the anchoring cell's vertical orientation. Both DOC and DOCX enable this compatibility setting. Change-Id: Ifa066d3549b1a6183360b5b01c659e41c681d492 Reviewed-on: https://gerrit.libreoffice.org/41821 Tested-by: Jenkins Reviewed-by: Justin Luth diff --git a/sw/qa/extras/ooxmlexport/data/tdf37153_considerWrapOnObjPos.docx b/sw/qa/extras/ooxmlexport/data/tdf37153_considerWrapOnObjPos.docx new file mode 100644 index ..d89baaf084a2 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf37153_considerWrapOnObjPos.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx index 7dbd94bb910f..43639f622cac 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -568,6 +569,23 @@ DECLARE_OOXMLEXPORT_TEST(testTdf99227, "tdf99227.docx") assertXPath(pXmlDoc, "//w:footnote/w:p/w:r/w:drawing", 1); } +DECLARE_OOXMLEXPORT_TEST(testTdf37153, "tdf37153_considerWrapOnObjPos.docx") +{ +CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_THROUGH, getProperty(getShape(1), "Surround")); + +uno::Reference xTablesSupplier(mxComponent, uno::UNO_QUERY); +uno::Reference xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY); +uno::Reference xTable(xTables->getByIndex(0), uno::UNO_QUERY); +CPPUNIT_ASSERT_EQUAL(text::VertOrientation::BOTTOM, getProperty(xTable->getCellByName("A1"), "VertOrient")); + +//For MSO compatibility, the textbox should be at the top of the cell, not at the bottom - despite VertOrientation::BOTTOM +xmlDocPtr pXmlDoc = parseLayoutDump(); +sal_Int32 nFlyTop = getXPath(pXmlDoc, "/root/page/body/tab/row/cell[1]/txt/anchored/fly/infos/bounds", "top").toInt32(); +CPPUNIT_ASSERT_MESSAGE("FlyTop should be 2865, not 5649", nFlyTop < sal_Int32(3000)); +sal_Int32 nTextTop = getXPath(pXmlDoc, "/root/page/body/tab/row/cell[2]/txt[1]/infos/bounds", "top").toInt32(); +CPPUNIT_ASSERT_MESSAGE("TextTop should be 3856", nTextTop > 3000); +} + DECLARE_OOXMLEXPORT_TEST(testTdf82173_footnoteStyle, "tdf82173_footnoteStyle.docx") { uno::Reference xFootnotesSupplier(mxComponent, uno::UNO_QUERY); diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 34420867ca42..efcc0df63223 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -4974,7 +4974,8 @@ void SwCellFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder for (SwAnchoredObject* pAnchoredObj : *pPg->GetSortedObjs()) { SwRect aTmp( pAnchoredObj->GetObjRect() ); -if ( aTmp.IsOver( aRect ) ) +const SwFrame* pAnch = pAnchoredObj->GetAnchorFrame(); +if ( (bConsiderWrapOnObjPos && IsAnLower( pAnch )) || (!bConsiderWrapOnObjPos && aTmp.IsOver( aRect )) ) { const SwFrameFormat& rAnchoredObjFrameFormat = pAnchoredObj->GetFrameFormat(); const SwFormatSurround &rSur = rAnchoredObjFrameFormat.GetSurround(); @@ -4990,7 +4991,6 @@ void SwCellFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder continue; } -const SwFrame* pAnch = pAnchoredObj->GetAnchorFrame(); // #i43913# // #i52904# - no vertical alignment, // if object, anchored inside cell, has temporarily ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'private/jmux/scheduler-fixes' - 248 commits - android/Bootstrap android/source avmedia/source basctl/source basic/source canvas/Library_canvastools.mk canvas/so
Rebased ref, commits from common ancestor: commit 969e9337f010ac567ec50d138990e7644fdbf4cd Author: Jan-Marek Glogowski Date: Mon Sep 4 17:40:13 2017 +0200 fixup Change-Id: I67957742ab7795856e2b028ee214febe965a5ed2 diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx index 8a805ea345b1..5fcb7c57d602 100644 --- a/vcl/headless/svpinst.cxx +++ b/vcl/headless/svpinst.cxx @@ -306,29 +306,27 @@ SalBitmap* SvpSalInstance::CreateSalBitmap() bool SvpSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) { -// first, check for already queued events. -std::list< SalUserEvent > aEvents; +bool bEvent = false; + +// first, process current user events +std::list< SalUserEvent > aCurrentEvents; { osl::MutexGuard g(m_aEventGuard); if( ! m_aUserEvents.empty() ) { if( bHandleAllCurrentEvents ) -{ -aEvents = m_aUserEvents; -m_aUserEvents.clear(); -} +aCurrentEvents.swap( m_aUserEvents ); else { -aEvents.push_back( m_aUserEvents.front() ); +aCurrentEvents.push_back( m_aUserEvents.front() ); m_aUserEvents.pop_front(); } +bEvent = true; } } - -bool bEvent = !aEvents.empty(); if( bEvent ) { -for( std::list::const_iterator it = aEvents.begin(); it != aEvents.end(); ++it ) +for( auto it = aCurrentEvents.begin(); it != aCurrentEvents.end(); ++it ) { if ( isFrameAlive( it->m_pFrame ) ) { @@ -340,6 +338,9 @@ bool SvpSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) pSvpFrame->PostPaint(); } } + +if ( !bHandleAllCurrentEvents ) +return true; } } diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h index 207f6cce7b3c..028b02afe630 100644 --- a/vcl/inc/osx/salinst.h +++ b/vcl/inc/osx/salinst.h @@ -143,9 +143,7 @@ public: // this is needed to avoid duplicate open events through a) command line and b) NSApp's openFile static bool isOnCommandLine( const OUString& ); -void wakeupYield(); - - public: +public: friend class AquaSalFrame; void PostUserEvent( AquaSalFrame* pFrame, SalEvent nType, void* pData ); @@ -163,7 +161,6 @@ public: static const short AppStartTimerEvent = 10; static const short YieldWakeupEvent = 20; static const short DispatchTimerEvent = 30; -static const short PostedUserEvent= 40; static NSMenu* GetDynamicDockMenu(); }; diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index b663227cf244..c037c9cf5ddf 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -392,21 +392,16 @@ AquaSalInstance::~AquaSalInstance() delete mpSalYieldMutex; } -void AquaSalInstance::wakeupYield() -{ -// wakeup :Yield -if( mbWaitingYield ) -ImplNSAppPostEvent( AquaSalInstance::YieldWakeupEvent, YES ); -} - void AquaSalInstance::PostUserEvent( AquaSalFrame* pFrame, SalEvent nType, void* pData ) { { osl::MutexGuard g( maUserEventListMutex ); maUserEvents.push_back( SalUserEvent( pFrame, pData, nType ) ); } -// notify main loop that an event has arrived -wakeupYield(); +if( mbWaitingYield ) +dispatch_async(dispatch_get_main_queue(),^{ +ImplNSAppPostEvent( AquaSalInstance::YieldWakeupEvent, NO ); +}); } comphelper::SolarMutex* AquaSalInstance::GetYieldMutex() @@ -457,9 +452,6 @@ void AquaSalInstance::handleAppDefinedEvent( NSEvent* pEvent ) case DispatchTimerEvent: AquaSalTimer::handleDispatchTimerEvent(); break; -case YieldWakeupEvent: -// do nothing -break; #if !HAVE_FEATURE_MACOSX_SANDBOX case AppleRemoteControlEvent: // Defined in { @@ -545,8 +537,6 @@ bool AquaSalInstance::RunInMainYield( bool bHandleAllCurrentEvents ) bool AquaSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) { -bool bHadEvent = false; - // ensure that the per thread autorelease pool is top level and // will therefore not be destroyed by cocoa implicitly SalData::ensureThreadAutoreleasePool(); @@ -555,35 +545,39 @@ bool AquaSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) // an own pool for each yield level ReleasePoolHolder aReleasePool; -// Release all locks so that we don't deadlock when we pull pending -// events from the event queue -bool bDispatchUser = true; -while( bDispatchUser ) +bool bHadEvent = false; + +// first, process current user events +std::list< SalUserEvent > aCurrentEvents; { -// get one user event -SalUserEvent aEvent( nullptr, nullptr, SalEvent::NONE ); +osl::MutexGuard g(m_aEventGuard); +if( ! m_aUserEvents.empty() ) { -
[Libreoffice-commits] core.git: sw/qa writerfilter/source
dev/null |binary sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 16 writerfilter/source/dmapper/DomainMapper.cxx |5 - writerfilter/source/dmapper/DomainMapper.hxx |1 - writerfilter/source/dmapper/GraphicImport.cxx | 16 +--- 5 files changed, 1 insertion(+), 37 deletions(-) New commits: commit 24e453e6018af2e71af784dc9364b5ea70112f29 Author: Justin Luth Date: Mon Sep 4 18:04:29 2017 +0200 Revert "tdf#111895 writerfilter: avoid hiding shapes behind background" This reverts commit d21f67fa7fd0360688e083eeb2bbcd57f5414d71. A better fix is commit de0993097cad2fd5819f8bea5ff53cddce7cde41. This patch didn't properly describe the zOrder stuff anyway. The problem technically wasn't with the zOrder - the painting method only made it seem to be so. Thanks to the reviewers for their helpful comments that spurred further areas of research. Change-Id: I586edd189e5b0a25b6e1e64ca42fdf43305997da Reviewed-on: https://gerrit.libreoffice.org/41904 Tested-by: Jenkins Reviewed-by: Justin Luth diff --git a/sw/qa/extras/ooxmlexport/data/tdf111895_foregroundShape.docx b/sw/qa/extras/ooxmlexport/data/tdf111895_foregroundShape.docx deleted file mode 100644 index b282059b1097.. Binary files a/sw/qa/extras/ooxmlexport/data/tdf111895_foregroundShape.docx and /dev/null differ diff --git a/sw/qa/extras/ooxmlexport/data/tdf111895_foregroundShape2.docx b/sw/qa/extras/ooxmlexport/data/tdf111895_foregroundShape2.docx deleted file mode 100644 index ae2e3c7573db.. Binary files a/sw/qa/extras/ooxmlexport/data/tdf111895_foregroundShape2.docx and /dev/null differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx index 43639f622cac..930cbdc41b4f 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx @@ -230,22 +230,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf98700_keepWithNext, "tdf98700_keepWithNext.odt") CPPUNIT_ASSERT_EQUAL_MESSAGE("Text Body style toggled off keep with next", false, getProperty(getParagraph(5), "ParaKeepTogether")); } -DECLARE_OOXMLEXPORT_TEST(testTdf111895_foregroundShape, "tdf111895_foregroundShape.docx") -{ -uno::Reference xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY); -CPPUNIT_ASSERT_EQUAL_MESSAGE("Light yellow background", sal_Int32(0x66), getProperty(xPageStyle, "BackColor")); -// despite a behindDoc==1, put shape in foreground since the page background would have hidden it otherwise. -CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape is in front of page background", true, getProperty(getShape(1), "Opaque")); -} - -DECLARE_OOXMLEXPORT_TEST(testTdf111895_foregroundShape2, "tdf111895_foregroundShape2.docx") -{ -uno::Reference xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY); -CPPUNIT_ASSERT_EQUAL_MESSAGE("Light yellow background", sal_Int32(0x66), getProperty(xPageStyle, "BackColor")); -// despite a page background, don't show behindDoc==1 shape in front since it would have hidden wrap_THROUGH text. -CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape is in front of page background", false, getProperty(getShape(1), "Opaque")); -} - // base class to supply a helper method for testHFLinkToPrev class testHFBase : public Test { diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 41decae20717..fc83d8d31af8 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -3778,11 +3778,6 @@ bool DomainMapper::IsStyleSheetImport() const return m_pImpl->IsStyleSheetImport(); } -bool DomainMapper::HasPageBackground() const -{ -return (bool)m_pImpl->m_oBackgroundColor; -} - void DomainMapper::enableInteropGrabBag(const OUString& aName) { m_pImpl->m_aInteropGrabBagName = aName; diff --git a/writerfilter/source/dmapper/DomainMapper.hxx b/writerfilter/source/dmapper/DomainMapper.hxx index 35a18b445c13..b2b89f1776c1 100644 --- a/writerfilter/source/dmapper/DomainMapper.hxx +++ b/writerfilter/source/dmapper/DomainMapper.hxx @@ -110,7 +110,6 @@ public: bool IsInHeaderFooter() const; bool IsInTable() const; bool IsStyleSheetImport() const; -bool HasPageBackground() const; /** @see DomainMapper_Impl::processDeferredCharacterProperties() */ diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index 68d7ac4a1738..65a20747c38f 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -197,7 +197,6 @@ public: text::WrapTextMode nWrap; bool bLayoutInCell; bool bOpaque; -bool bBehindDoc; bool bContour; bool bContourOutside; WrapPolygon::Pointer_t mpWrapPolygon; @@ -267,7 +266,
[Libreoffice-commits] core.git: sw/qa sw/source
sw/qa/extras/odfexport/data/tdf111891_frameVertStyle.odt |binary sw/qa/extras/odfexport/odfexport.cxx |6 ++ sw/source/core/unocore/unostyle.cxx |7 ++- 3 files changed, 12 insertions(+), 1 deletion(-) New commits: commit 10dc371d31f003ac3ed9b89ca1db95d36603603f Author: Justin Luth Date: Thu Aug 24 15:48:29 2017 -0400 tdf#111891 unostyle: use default handler for non-page style LO 5.1 commit 664197d95becd516c3dac25a50439078ba61e051 introduced a handler for RES_TEXT_VERT_ADJUST to handle page styles, but that meant that the default handler was no longer called for frames (the only other item currently using RES_TEXT_VERT_ADJUST). Change-Id: I33827160fe64dc4cc2107afc26f7ac2e698007e1 Reviewed-on: https://gerrit.libreoffice.org/41538 Tested-by: Justin Luth Reviewed-by: Justin Luth diff --git a/sw/qa/extras/odfexport/data/tdf111891_frameVertStyle.odt b/sw/qa/extras/odfexport/data/tdf111891_frameVertStyle.odt new file mode 100644 index ..8fcf98a6272b Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf111891_frameVertStyle.odt differ diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index cc096f406733..a2f9923b57d7 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -860,6 +860,12 @@ DECLARE_ODFEXPORT_TEST(testTextFrameVertAdjust, "textframe-vertadjust.odt") CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_BOTTOM, getProperty(xFrame, "TextVerticalAdjust")); } +DECLARE_ODFEXPORT_TEST(testTdf111891_frameVertStyle, "tdf111891_frameVertStyle.odt") +{ +uno::Reference xFrame(getShape(1), uno::UNO_QUERY); +CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_BOTTOM, getProperty(xFrame, "TextVerticalAdjust")); +} + DECLARE_ODFEXPORT_TEST(testShapeRelsize, "shape-relsize.odt") { uno::Reference xShape = getShape(1); diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index d3764741486a..62b9821791a0 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1804,8 +1804,13 @@ void SwXStyle::SetPropertyValue(const SfxItemPropertySimpleEntry& } } template<> -void SwXStyle::SetPropertyValue(const SfxItemPropertySimpleEntry&, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase) +void SwXStyle::SetPropertyValue(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet& rPropSet, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase) { +if(m_rEntry.m_eFamily != SfxStyleFamily::Page) +{ +SetPropertyValue(rEntry, rPropSet, rValue, o_rStyleBase); +return; +} if(!m_pDoc || !rValue.has() || !o_rStyleBase.GetOldPageDesc()) return; SwPageDesc* pPageDesc = m_pDoc->FindPageDesc(o_rStyleBase.GetOldPageDesc()->GetName()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: git-hook: Catch tab indentation also for makefiles
2017-09-04 17:13 GMT+02:00 jani libreoffice : > > I think temporary GNU make still needs recipe lines to start with tab >> characters? And in any case, our makefiles are apparently written with >> lots of tab characters all over the place. I'd suggest to revert (at least >> for now). > > > Yeah, I see that tabs and spaces are mixed in makefiles. That's why I > thought it would be good to make it consistent similar to other source > files. > I did not push it yet. It's on gerrit. So I can abandon it. > > > build breaks on my mac when I replace tab with spaces, so please do not > make this a demand. > OK, I abandoned the patch. Thanks! ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: sw/qa writerfilter/source
sw/qa/extras/rtfexport/data/tdf112208_hangingIndent.rtf | 89 sw/qa/extras/rtfexport/rtfexport2.cxx |6 + writerfilter/source/rtftok/rtfsprm.cxx |2 3 files changed, 97 insertions(+) New commits: commit 72b19aa29f9adcab6dd20d1517208f3b999d055e Author: Justin Luth Date: Mon Sep 4 11:43:09 2017 -0400 tdf#112208 rtfimport: fix missing paragraph first line indent This is a followup to commit f528f9499bd91b700c549575e88fa102cfffede9 adding ParaFirstLineIndent to that commit's Para(Left|Right)Margin. I also added code for hanging indents, but it doesn't look like that case will ever hit. Just added for completeness. My test unit was created in Word as a hanging indent, but it invokes the firstLine case... Change-Id: I2b04866b9eb4b085503f3b7d3b6e97d4f9e3d19c Reviewed-on: https://gerrit.libreoffice.org/41901 Reviewed-by: Justin Luth Tested-by: Justin Luth diff --git a/sw/qa/extras/rtfexport/data/tdf112208_hangingIndent.rtf b/sw/qa/extras/rtfexport/data/tdf112208_hangingIndent.rtf new file mode 100644 index ..8f3be9e4cbbe --- /dev/null +++ b/sw/qa/extras/rtfexport/data/tdf112208_hangingIndent.rtf @@ -0,0 +1,89 @@ +{\rtf1\adeflang1025\ansi\ansicpg1252\uc1\adeff0\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang2057\deflangfe2057{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}{\f95\froman\fcharset238\fprq2 Times New Roman CE;} +{\f96\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f98\froman\fcharset161\fprq2 Times New Roman Greek;}{\f99\froman\fcharset162\fprq2 Times New Roman Tur;}{\f100\fbidi \froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\f101\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f102\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f103\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f105\fswiss\fcharset238\fprq2 Arial CE;} +{\f106\fswiss\fcharset204\fprq2 Arial Cyr;}{\f108\fswiss\fcharset161\fprq2 Arial Greek;}{\f109\fswiss\fcharset162\fprq2 Arial Tur;}{\f110\fbidi \fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f111\fbidi \fswiss\fcharset178\fprq2 Arial (Arabic);} +{\f112\fswiss\fcharset186\fprq2 Arial Baltic;}{\f113\fswiss\fcharset163\fprq2 Arial (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0; +\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;\red0\green0\blue1;} +{\stylesheet{\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs24\alang1025 \ltrch\fcs0 \fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 \snext0 Normal;}{ +\s1\ql \li0\ri0\sb240\sa120\keepn\nowidctlpar\wrapdefault\faauto\outlinelevel0\rin0\lin0\itap0 \rtlch\fcs1 \ab\af1\afs32\alang1025 \ltrch\fcs0 \b\f1\fs32\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 \sbasedon28 \snext29 heading 1;}{ +\s2\ql \li0\ri0\sb240\sa120\keepn\nowidctlpar\wrapdefault\faauto\ilvl1\outlinelevel1\rin0\lin0\itap0 \rtlch\fcs1 \ab\ai\af1\afs28\alang1025 \ltrch\fcs0 \b\i\f1\fs28\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 \sbasedon28 \snext29 heading 2;}{ +\s3\ql \li0\ri0\sb240\sa120\keepn\nowidctlpar\wrapdefault\faauto\ilvl2\outlinelevel2\rin0\lin0\itap0 \rtlch\fcs1 \ab\af1\afs28\alang1025 \ltrch\fcs0 \b\f1\fs28\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 \sbasedon28 \snext29 heading 3;}{\*\cs10 +\additive \ssemihidden Default Paragraph Font;}{\* +\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tblind0\tblindtype3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv +\ql \li0\ri0\widctlpar\wrapdefault\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \rtlch\fcs1 \af0\afs20 \ltrch\fcs0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}{ +\s15\ql \li0\ri0\nowidctlpar\wrapdefault\faauto\rin0\lin0\itap0 \rtlch\fcs1 \af1\afs24\alang1081 \ltrch\fcs0 \f1\fs24\lang1043\langfe2052\kerning1\cgrid\langnp1043\langfenp2052 \snext15 Default Style;}{\*\cs16 \additive +\ul\lang255\langfe255\langnp255\langfenp255\ulc1 Internetkoppeling;}{\*\cs17 \additive \ul\lang255\langfe255\langnp255\langfenp255\ulc1 Bezochte internetkoppeling;}{\*\cs18 \additive \super Eindnootanker;}{\*\cs19 \additive \super Voetnootanker;}{\*\cs20 +\additive Voetnoottekens;}{\*\cs21 \additive Eindnoottekens;}{\*\cs22 \additive Endnote Characters;}{\*\cs23 \additive \ul\cf9\lang255\langfe255\langnp255\langfenp255 Internet Link;}{\*\cs24 \additive \ul\cf13\lang255\langfe255\langnp255\langfenp25
[Libreoffice-commits] core.git: external/libepubgen writerperfect/qa writerperfect/source
external/libepubgen/libepubgen-epub3.patch.1 | 44 + writerperfect/qa/unit/EPUBExportTest.cxx | 13 + writerperfect/qa/unit/data/writer/epubexport/meta.fodt | 12 writerperfect/source/writer/exp/xmlmetai.cxx | 24 + 4 files changed, 93 insertions(+) New commits: commit 41092fe0bb0d2f49948bf2a1f27acb53f21a84aa Author: Miklos Vajna Date: Mon Sep 4 17:27:39 2017 +0200 EPUB export: write author metadata is the author and is the "last modified by" in ODF (it seems), so map the first to EPUB's . Change-Id: Id701c8c38b0901ae14fbbc7b32d01b43d6d03f68 Reviewed-on: https://gerrit.libreoffice.org/41903 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/external/libepubgen/libepubgen-epub3.patch.1 b/external/libepubgen/libepubgen-epub3.patch.1 index d1d35c102022..0415bf340e78 100644 --- a/external/libepubgen/libepubgen-epub3.patch.1 +++ b/external/libepubgen/libepubgen-epub3.patch.1 @@ -1862,3 +1862,47 @@ index 4ce2964..1661064 100644 -- 2.12.3 +From 7e3b5186616326534b1ae95c6d2d188c5e522c7f Mon Sep 17 00:00:00 2001 +From: Miklos Vajna +Date: Mon, 4 Sep 2017 17:18:49 +0200 +Subject: [PATCH] EPUBGenerator: always write author and title + +Some EPUB3 readers categorize books by author and then title, so if +these are empty, then it's next to impossible to reach the export result +there. +--- + src/lib/EPUBGenerator.cpp | 11 --- + src/test/EPUBTextGeneratorTest.cpp | 11 +++ + 2 files changed, 19 insertions(+), 3 deletions(-) + +diff --git a/src/lib/EPUBGenerator.cpp b/src/lib/EPUBGenerator.cpp +index 1661064..3340643 100644 +--- a/src/lib/EPUBGenerator.cpp b/src/lib/EPUBGenerator.cpp +@@ -260,15 +260,20 @@ void EPUBGenerator::writeRoot() + sink.insertCharacters(identifierCharactrs.c_str()); + sink.closeElement("dc:identifier"); + +- // Zero-width space as it must be at least one character in length after +- // white space has been trimmed. +- RVNGString title("\u200b"); ++ RVNGString title("Unknown Title"); + if (m_metadata["dc:title"] && !m_metadata["dc:title"]->getStr().empty()) + title = m_metadata["dc:title"]->getStr(); + sink.openElement("dc:title"); + sink.insertCharacters(title); + sink.closeElement("dc:title"); + ++ RVNGString creator("Unknown Author"); ++ if (m_metadata["meta:initial-creator"] && !m_metadata["meta:initial-creator"]->getStr().empty()) ++creator = m_metadata["meta:initial-creator"]->getStr(); ++ sink.openElement("dc:creator"); ++ sink.insertCharacters(creator); ++ sink.closeElement("dc:creator"); ++ + RVNGString language("en"); + if (m_metadata["dc:language"] && !m_metadata["dc:language"]->getStr().empty()) + language = m_metadata["dc:language"]->getStr(); +-- +2.12.3 + diff --git a/writerperfect/qa/unit/EPUBExportTest.cxx b/writerperfect/qa/unit/EPUBExportTest.cxx index fef1cf19770c..61a6da2941f0 100644 --- a/writerperfect/qa/unit/EPUBExportTest.cxx +++ b/writerperfect/qa/unit/EPUBExportTest.cxx @@ -53,6 +53,7 @@ public: void testPageBreakSplit(); void testSpanAutostyle(); void testParaAutostyleCharProps(); +void testMeta(); CPPUNIT_TEST_SUITE(EPUBExportTest); CPPUNIT_TEST(testOutlineLevel); @@ -61,6 +62,7 @@ public: CPPUNIT_TEST(testPageBreakSplit); CPPUNIT_TEST(testSpanAutostyle); CPPUNIT_TEST(testParaAutostyleCharProps); +CPPUNIT_TEST(testMeta); CPPUNIT_TEST_SUITE_END(); }; @@ -88,6 +90,7 @@ void EPUBExportTest::tearDown() void EPUBExportTest::registerNamespaces(xmlXPathContextPtr &pXmlXpathCtx) { +xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("dc"), BAD_CAST("http://purl.org/dc/elements/1.1/";)); xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("opf"), BAD_CAST("http://www.idpf.org/2007/opf";)); xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("xhtml"), BAD_CAST("http://www.w3.org/1999/xhtml";)); } @@ -202,6 +205,16 @@ void EPUBExportTest::testParaAutostyleCharProps() assertXPath(mpXmlDoc, "//xhtml:p[2]/xhtml:span", "class", "span1"); } +void EPUBExportTest::testMeta() +{ +createDoc("meta.fodt", {}); + +mpXmlDoc = parseExport("OEBPS/content.opf"); +// This was "Unknown Author", was not handled. +assertXPathContent(mpXmlDoc, "/opf:package/opf:metadata/dc:creator", "A U Thor"); +assertXPathContent(mpXmlDoc, "/opf:package/opf:metadata/dc:title", "Title"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(EPUBExportTest); } diff --git a/writerperfect/qa/unit/data/writer/epubexport/meta.fodt b/writerperfect/qa/unit/data/writer/epubexport/meta.fodt new file mode 100644 index ..4e46fe79fcda --- /dev/null +++ b/writerperfect/qa/unit/data/writer/epubexport/meta.fodt @@ -0,0 +1,12 @@ + +http://purl.org/dc/elements/1.1/";> + +A U Thor +Title + + + + Hello world! + + + diff --git a/writerperfect/source/writer/exp/xmlmetai.cxx b/writerperfect/source/writer/exp/xmlmetai.cxx in
[Libreoffice-commits] core.git: configure.ac
configure.ac | 29 - 1 file changed, 24 insertions(+), 5 deletions(-) New commits: commit f7bc186bdabd420f5cfb0de62108413160b1e1de Author: jan Iversen Date: Sat Sep 2 17:40:45 2017 +0200 iOS, update configure.ac to handle ios Added enable-ios-simulator, and updated to do cross compile Change-Id: Id9031aa2ad1e271f843cf1cba6e3b67d907b6df0 diff --git a/configure.ac b/configure.ac index 81a3ac0877ef..39f42eb6d0ed 100644 --- a/configure.ac +++ b/configure.ac @@ -716,7 +716,7 @@ darwin*) # Mac OS X or iOS test_freetype=no test_fontconfig=no test_dbus=no -if test "$host_cpu" = "armv7" -o "$host_cpu" = "arm64"; then +if test "$enable_ios_simulator" = "yes" -o "$host_cpu" = "armv7" -o "$host_cpu" = "arm64"; then _os=iOS test_gtk=no test_cups=no @@ -991,6 +991,11 @@ AC_SUBST(DLOPEN_LIBS) # if you use --disable-extension-integration. Is that really the # case? +AC_ARG_ENABLE(ios-simulator, +AS_HELP_STRING([--enable-ios-simulator], +[build i386 or x86_64 for ios simulator]) +) + libo_FUZZ_ARG_ENABLE(extension-integration, AS_HELP_STRING([--disable-extension-integration], [Disable integration of the built extensions in the installer of the @@ -2709,7 +2714,7 @@ dnl === dnl Check OS X SDK and compiler dnl === -if test $_os = Darwin; then +if test $_os = Darwin -o $_os = iOS; then # If no --with-macosx-sdk option is given, look for one @@ -2946,6 +2951,7 @@ if test $_os = iOS; then elif test "$build_cpu" = "x86_64"; then platform=iPhoneSimulator XCODE_ARCHS=x86_64 +BITNESS_OVERRIDE=64 versionmin=-mios-simulator-version-min=9.3 else platform=iPhoneOS @@ -3153,6 +3159,9 @@ if test "$_os" = "WINNT"; then BITNESS_OVERRIDE=64 fi fi +if test "$_os" = "iOS"; then +cross_compiling="yes" +fi if test "$cross_compiling" = "yes"; then export CROSS_COMPILING=TRUE @@ -4015,9 +4024,19 @@ darwin*) OS=IOS ;; i*86) -AC_MSG_ERROR([Can't build 64-bit code in 32-bit OS]) +if test "$enable_ios_simulator" = "yes"; then +OS=IOS +CPUNAME=i386 +RTL_ARCH=i386 +PLATFORMID=macosx_i38 +else +AC_MSG_ERROR([Can't build 64-bit code in 32-bit OS]) +fi ;; x86_64) +if test "$enable_ios_simulator" = "yes"; then +OS=IOS +fi CPUNAME=X86_64 RTL_ARCH=X86_64 PLATFORMID=macosx_x86_64 @@ -6343,7 +6362,7 @@ _ACEOF fi fi -AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)]) + AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)]) cat >visibility.cxx <<_ACEOF #pragma GCC visibility push(hidden) struct __attribute__ ((visibility ("default"))) TestStruct { @@ -6358,7 +6377,7 @@ _ACEOF else case "$host_cpu" in i?86|x86_64) -if test "$_os" = "Darwin"; then +if test "$_os" = "Darwin" -o "$_os" = "iOS"; then gccvisbroken=no else if $EGREP -q '@PLT|@GOT' visibility.s || test "$ENABLE_LTO" = "TRUE"; then ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/source
vcl/source/window/menufloatingwindow.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit a89c3dc4b0a2ec846af387833474b543b3f149ad Author: Andreas Brandner Date: Mon Sep 4 18:41:27 2017 +0200 tdf#39468 Translate German comments/terms Change-Id: I528e7e4b4d365ff512cd03ea22f7517319541e05 Reviewed-on: https://gerrit.libreoffice.org/41907 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx index 0204828574e5..d6dd08d4e17e 100644 --- a/vcl/source/window/menufloatingwindow.cxx +++ b/vcl/source/window/menufloatingwindow.cxx @@ -280,7 +280,6 @@ IMPL_LINK_NOARG(MenuFloatingWindow, PopupEnd, FloatingWindow*, void) End(); if ( pActivePopup ) { -//SAL_WARN_IF( pActivePopup->ImplGetWindow(), "vcl", "PopupEnd, obwohl pActivePopup MIT Window!" ); KillActivePopup(); // should be ok to just remove it //pActivePopup->bCanceled = true; } @@ -357,7 +356,7 @@ IMPL_LINK( MenuFloatingWindow, HighlightChanged, Timer*, pTimer, void ) sal_uInt16 nRet = pActivePopup->ImplExecute( this, tools::Rectangle( aItemTopLeft, aItemBottomRight ), FloatWinPopupFlags::Right, pMenu, pTimer == nullptr ); SetPopupModeFlags( nOldFlags ); -// nRet != 0, wenn es waerend Activate() abgeschossen wurde... +// nRet != 0, if it was stopped during Activate()... if ( !nRet && ( pActivePopup == pTest ) && pActivePopup->ImplGetWindow() ) pActivePopup->ImplGetFloatingWindow()->AddPopupModeWindow( this ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: slideshow/source vcl/headless
slideshow/source/engine/shapes/gdimtftools.cxx |2 +- vcl/headless/svpgdi.cxx|9 - 2 files changed, 9 insertions(+), 2 deletions(-) New commits: commit 67951d08ddd20ac87fc7eb54a90cb81901a89f8c Author: Caolán McNamara Date: Mon Sep 4 17:12:02 2017 +0100 Resolves: tdf#111073 incorrect gif background color a) set correct palette entries for the 1bit bitmap returned b) only use a BITMASK for the mask (like its AnimatedGraphicPrimitive2D brother in drawinglayer does) Change-Id: I704997de554dc4d0e523458d45ab329815b5046a Reviewed-on: https://gerrit.libreoffice.org/41905 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx index 3d7e643dfb7b..fb12c9853392 100644 --- a/slideshow/source/engine/shapes/gdimtftools.cxx +++ b/slideshow/source/engine/shapes/gdimtftools.cxx @@ -285,7 +285,7 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames, pVDev->EnableMapMode( false ); // setup mask VDev (alpha VDev is currently rather slow) -ScopedVclPtrInstance< VirtualDevice > pVDevMask; +ScopedVclPtrInstance pVDevMask(DeviceFormat::BITMASK); pVDevMask->SetOutputSizePixel( aAnimSize ); pVDevMask->EnableMapMode( false ); diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index 170d6c6087e6..5b8c0a8a66e0 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -1145,7 +1145,14 @@ void SvpSalGraphics::drawMask( const SalTwoRect& rTR, SalBitmap* SvpSalGraphics::getBitmap( long nX, long nY, long nWidth, long nHeight ) { SvpSalBitmap* pBitmap = new SvpSalBitmap(); -pBitmap->Create(Size(nWidth, nHeight), GetBitCount(), BitmapPalette()); +BitmapPalette aPal; +if (GetBitCount() == 1) +{ +aPal.SetEntryCount(2); +aPal[0] = Color(COL_BLACK); +aPal[1] = Color(COL_WHITE); +} +pBitmap->Create(Size(nWidth, nHeight), GetBitCount(), aPal); cairo_surface_t* target = SvpSalGraphics::createCairoSurface(pBitmap->GetBuffer()); cairo_t* cr = cairo_create(target); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: comphelper/source
comphelper/source/misc/threadpool.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 662c17fbd2ea72247d6ab94583f505dc242e1e8f Author: Tor Lillqvist Date: Mon Sep 4 20:32:38 2017 +0300 We can use thread_local on Windows, too (In some DBG_UTIL code.) Change-Id: I2f09c46186154551bfed5f711bd3b03efbf81053 Reviewed-on: https://gerrit.libreoffice.org/41909 Tested-by: Jenkins Reviewed-by: Tor Lillqvist diff --git a/comphelper/source/misc/threadpool.cxx b/comphelper/source/misc/threadpool.cxx index e67bacb8bd6b..7368544a14b1 100644 --- a/comphelper/source/misc/threadpool.cxx +++ b/comphelper/source/misc/threadpool.cxx @@ -22,7 +22,7 @@ namespace comphelper { /** prevent waiting for a task from inside a task */ -#if defined DBG_UTIL && defined LINUX +#if defined DBG_UTIL && (defined LINUX || defined _WIN32) static thread_local bool gbIsWorkerThread; #endif @@ -55,7 +55,7 @@ public: virtual void execute() override { -#if defined DBG_UTIL && defined LINUX +#if defined DBG_UTIL && (defined LINUX || defined _WIN32) gbIsWorkerThread = true; #endif std::unique_lock< std::mutex > aGuard( mpPool->maMutex ); @@ -215,7 +215,7 @@ ThreadTask *ThreadPool::popWorkLocked( std::unique_lock< std::mutex > & rGuard, void ThreadPool::waitUntilDone(const std::shared_ptr& rTag) { -#if defined DBG_UTIL && defined LINUX +#if defined DBG_UTIL && (defined LINUX || defined _WIN32) assert(!gbIsWorkerThread && "cannot wait for tasks from inside a task"); #endif { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.Menubar.js | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) New commits: commit a29fa8756dbc9b0686300a0854994bf18b3ea4b6 Author: Henry Castro Date: Mon Sep 4 16:32:24 2017 -0400 loleaflet: add initial menu bar before the document is loaded Change-Id: I9ab7f87e0ad3f4c9ff11670b8a2675d895a9c812 diff --git a/loleaflet/src/control/Control.Menubar.js b/loleaflet/src/control/Control.Menubar.js index 031bbb52..17bc8a64 100644 --- a/loleaflet/src/control/Control.Menubar.js +++ b/loleaflet/src/control/Control.Menubar.js @@ -6,6 +6,12 @@ L.Control.Menubar = L.Control.extend({ // TODO: Some mechanism to stop the need to copy duplicate menus (eg. Help) options: { + initial: [ + {name: _('File'), disabled: true}, + {name: _('Edit'), disabled: true}, + {name: _('View'), disabled: true}, + {name: _('Insert'), disabled: true} + ], text: [ {name: _('File'), id: 'file', type: 'menu', menu: [ {name: _('Save'), id: 'save', type: 'action'}, @@ -298,6 +304,7 @@ L.Control.Menubar = L.Control.extend({ onAdd: function (map) { this._initialized = false; this._menubarCont = L.DomUtil.get('main-menu'); + this._initializeMenu(this.options.initial); map.on('doclayerinit', this._onDocLayerInit, this); map.on('addmenu', this._addMenu, this); @@ -322,6 +329,11 @@ L.Control.Menubar = L.Control.extend({ }, _onDocLayerInit: function() { + // clear initial menu + while (this._menubarCont.hasChildNodes()) { + this._menubarCont.removeChild(this._menubarCont.firstChild); + } + // Add document specific menu var docType = this._map.getDocType(); if (docType === 'text') { @@ -746,7 +758,7 @@ L.Control.Menubar = L.Control.extend({ L.DomUtil.addClass(liItem, 'readonly'); } } - var aItem = L.DomUtil.create('a', '', liItem); + var aItem = L.DomUtil.create('a', menu[i].disabled ? 'disabled' : '', liItem); aItem.innerHTML = menu[i].name; if (menu[i].type === 'menu') { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: distro-configs/LibreOfficeAndroidX86.conf
distro-configs/LibreOfficeAndroidX86.conf |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 690d7bd3174fb5ccb4c6c2467626ee119eea0453 Author: Christian Lohmaier Date: Mon Sep 4 22:31:08 2017 +0200 android: should be i686-linux-android, not i686-linux-androideabi Change-Id: I8042fd656892a627c52d1b02c161594d97976726 diff --git a/distro-configs/LibreOfficeAndroidX86.conf b/distro-configs/LibreOfficeAndroidX86.conf index 62cf17d6adcd..cacd45941ecb 100644 --- a/distro-configs/LibreOfficeAndroidX86.conf +++ b/distro-configs/LibreOfficeAndroidX86.conf @@ -1,4 +1,4 @@ ---host=i686-linux-androideabi +--host=i686-linux-android --disable-cairo-canvas --disable-cups --disable-gstreamer-0-10 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 12 commits - cui/inc cui/Library_cui.mk cui/source cui/uiconfig extras/source
cui/Library_cui.mk |1 cui/inc/strings.hrc |3 cui/source/customize/CommandCategoryListBox.cxx | 268 cui/source/customize/SvxMenuConfigPage.cxx | 329 -- cui/source/customize/SvxToolbarConfigPage.cxx | 747 -- cui/source/customize/cfg.cxx| 168 +++-- cui/source/inc/CommandCategoryListBox.hxx | 66 ++ cui/source/inc/SvxConfigPageHelper.hxx |5 cui/source/inc/SvxMenuConfigPage.hxx| 20 cui/source/inc/SvxToolbarConfigPage.hxx | 24 cui/source/inc/cfg.hxx | 55 - cui/uiconfig/ui/customizedialog.ui | 14 cui/uiconfig/ui/menuassignpage.ui | 789 ++-- extras/source/glade/libreoffice-catalog.xml.in |3 14 files changed, 1287 insertions(+), 1205 deletions(-) New commits: commit 6c68f38bc28bb55a4f0d53b8f38957516d3935d1 Author: Muhammet Kara Date: Mon Aug 28 15:19:57 2017 +0300 Make the Modify button functional in the Customize dialog By adding "rename", "change icon", "reset icon", and "restore default command" options to the Modify button at the bottom of the right (toolbar/menu entries) list. Change icon / Reset icon / Restore default command options are not supported in the menu/context menu tabs yet. Change-Id: Iade3d1aca722c7f8eddcadf251b9562c5366d8ad Reviewed-on: https://gerrit.libreoffice.org/41620 Reviewed-by: Katarina Behrens Tested-by: Katarina Behrens diff --git a/cui/source/customize/SvxMenuConfigPage.cxx b/cui/source/customize/SvxMenuConfigPage.cxx index 336e6bbe4ed9..016141184758 100644 --- a/cui/source/customize/SvxMenuConfigPage.cxx +++ b/cui/source/customize/SvxMenuConfigPage.cxx @@ -135,9 +135,18 @@ SvxMenuConfigPage::SvxMenuConfigPage(vcl::Window *pParent, const SfxItemSet& rSe m_pInsertBtn->SetSelectHdl( LINK( this, SvxMenuConfigPage, InsertHdl ) ); +m_pModifyBtn->SetSelectHdl( +LINK( this, SvxMenuConfigPage, ModifyItemHdl ) ); m_pResetBtn->SetClickHdl( LINK( this, SvxMenuConfigPage, ResetMenuHdl ) ); +PopupMenu* pPopup = m_pModifyBtn->GetPopupMenu(); +// These operations are not possible on menus/context menus yet +pPopup->EnableItem( pPopup->GetItemId("changeIcon"), false ); +pPopup->EnableItem( pPopup->GetItemId("resetIcon"), false ); +pPopup->EnableItem( pPopup->GetItemId("restoreItem"), false ); +pPopup->RemoveDisabledEntries(); + if ( !bIsMenuBar ) { // Context menus cannot be added/removed @@ -149,7 +158,6 @@ SvxMenuConfigPage::SvxMenuConfigPage(vcl::Window *pParent, const SfxItemSet& rSe // TODO: Remove this when it is possible to reset menubar menus individually m_pResetBtn->Disable(); } - } SvxMenuConfigPage::~SvxMenuConfigPage() @@ -197,19 +205,19 @@ void SvxMenuConfigPage::UpdateButtonStates() // Disable Up and Down buttons depending on current selection SvTreeListEntry* selection = m_pContentsListBox->GetCurEntry(); -if ( m_pContentsListBox->GetEntryCount() == 0 || selection == nullptr ) -{ -m_pMoveUpButton->Enable( false ); -m_pMoveDownButton->Enable( false ); +bool bIsSeparator = +selection && (static_cast(selection->GetUserData()))->IsSeparator(); +bool bIsValidSelection = +!(m_pContentsListBox->GetEntryCount() == 0 || selection == nullptr); -return; -} +m_pMoveUpButton->Enable( +bIsValidSelection && selection != m_pContentsListBox->First() ); +m_pMoveDownButton->Enable( +bIsValidSelection && selection != m_pContentsListBox->Last() ); -SvTreeListEntry* first = m_pContentsListBox->First(); -SvTreeListEntry* last = m_pContentsListBox->Last(); +m_pRemoveCommandButton->Enable( bIsValidSelection ); -m_pMoveUpButton->Enable( selection != first ); -m_pMoveDownButton->Enable( selection != last ); +m_pModifyBtn->Enable( bIsValidSelection && !bIsSeparator); } void SvxMenuConfigPage::DeleteSelectedTopLevel() @@ -386,6 +394,49 @@ IMPL_LINK( SvxMenuConfigPage, InsertHdl, MenuButton *, pButton, void ) } } +IMPL_LINK( SvxMenuConfigPage, ModifyItemHdl, MenuButton *, pButton, void ) +{ +OString sIdent = pButton->GetCurItemIdent(); + +SAL_WARN("cui.customize", "sIdent: " << sIdent); + +if (sIdent == "renameItem") +{ +SvTreeListEntry* pActEntry = m_pContentsListBox->GetCurEntry(); +SvxConfigEntry* pEntry = +static_cast(pActEntry->GetUserData()); + +OUString aNewName( SvxConfigPageHelper::stripHotKey( pEntry->GetName() ) ); +OUString aDesc = CuiResId( RID_SVXSTR_LABEL_NEW_NAME ); + +VclPtrInstance< SvxNameDialog > pNameDialog( this, aNewName, aDesc ); +pNameDialog->SetHelpId( HID_SVX_CONFIG_RENAME_MENU_ITEM ); +pNameDialog->SetText( Cu
[Libreoffice-commits] online.git: loleaflet/dist
loleaflet/dist/toolbar/toolbar.js | 52 +++--- 1 file changed, 26 insertions(+), 26 deletions(-) New commits: commit b53bcf23ae601687fd8996d66e5a2a56d8c21d8e Author: Henry Castro Date: Mon Sep 4 16:52:30 2017 -0400 loleaflet: disable toolbar buttons before the document is loaded Change-Id: Ia6679414f8eab54366a48b1c431ce9384d2dc8ca diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index e33ad8f7..ef30c422 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -469,18 +469,18 @@ $(function () { ]}, {type: 'button', id: 'save', img: 'save', hint: _('Save')}, {type: 'break', id: 'savebreak'}, - {type: 'button', id: 'undo', img: 'undo', hint: _('Undo'), uno: 'Undo'}, - {type: 'button', id: 'redo', img: 'redo', hint: _('Redo'), uno: 'Redo'}, - {type: 'button', id: 'repair', img: 'repair', hint: _('Document repair')}, + {type: 'button', id: 'undo', img: 'undo', hint: _('Undo'), uno: 'Undo', disabled: true}, + {type: 'button', id: 'redo', img: 'redo', hint: _('Redo'), uno: 'Redo', disabled: true}, + {type: 'button', id: 'repair', img: 'repair', hint: _('Document repair'), disabled: true}, {type: 'break'}, {type: 'html', id: 'styles', html: ''}, {type: 'html', id: 'fonts', html: ''}, {type: 'html', id: 'fontsizes', html: ''}, {type: 'break'}, - {type: 'button', id: 'bold', img: 'bold', hint: _('Bold'), uno: 'Bold'}, - {type: 'button', id: 'italic', img: 'italic', hint: _('Italic'), uno: 'Italic'}, - {type: 'button', id: 'underline', img: 'underline', hint: _('Underline'), uno: 'Underline'}, - {type: 'button', id: 'strikeout', img: 'strikeout', hint: _('Strikeout'), uno: 'Strikeout'}, + {type: 'button', id: 'bold', img: 'bold', hint: _('Bold'), uno: 'Bold', disabled: true}, + {type: 'button', id: 'italic', img: 'italic', hint: _('Italic'), uno: 'Italic', disabled: true}, + {type: 'button', id: 'underline', img: 'underline', hint: _('Underline'), uno: 'Underline', disabled: true}, + {type: 'button', id: 'strikeout', img: 'strikeout', hint: _('Strikeout'), uno: 'Strikeout', disabled: true}, {type: 'break', id: 'formatbreak'}, {type: 'button', id: 'insertfootnote', img: 'insertfootnote', hint: _('Insert Footnote'), uno: 'InsertFootnote' }, {type: 'break' }, @@ -489,29 +489,29 @@ $(function () { {type: 'html', id: 'backcolor-html', html: ''}, {type: 'button', id: 'backcolor', img: 'backcolor', hint: _('Highlighting')}, {type: 'break'}, - {type: 'button', id: 'leftpara', img: 'alignleft', hint: _('Align left'), uno: 'LeftPara', unosheet: 'AlignLeft'}, - {type: 'button', id: 'centerpara', img: 'alignhorizontal', hint: _('Center horizontally'), uno: 'CenterPara', unosheet: 'AlignHorizontalCenter'}, - {type: 'button', id: 'rightpara', img: 'alignright', hint: _('Align right'), uno: 'RightPara', unosheet: 'AlignRight'}, - {type: 'button', id: 'justifypara', img: 'alignblock', hint: _('Justified'), uno: 'JustifyPara', unosheet: ''}, + {type: 'button', id: 'leftpara', img: 'alignleft', hint: _('Align left'), uno: 'LeftPara', unosheet: 'AlignLeft', disabled: true}, + {type: 'button', id: 'centerpara', img: 'alignhorizontal', hint: _('Center horizontally'), uno: 'CenterPara', unosheet: 'AlignHorizontalCenter', disabled: true}, + {type: 'button', id: 'rightpara', img: 'alignright', hint: _('Align right'), uno: 'RightPara', unosheet: 'AlignRight', disabled: true}, + {type: 'button', id: 'justifypara', img: 'alignblock', hint: _('Justified'), uno: 'JustifyPara', unosheet: '', disabled: true}, {type: 'break', id: 'wraptextseparator'}, - {type: 'button', id: 'wraptext', img: 'wraptext', hint: _('Wrap Text'), uno: 'WrapText'}, - {type: 'button', id: 'togglemergecells', img: 'togglemergecells', hint: _('Merge and Center Cells'), uno: 'ToggleMergeCells'}, + {type: 'button', id: 'wraptext', img: 'wraptext', hint: _('Wrap Text'), uno: 'WrapText', disabled: true}, + {type: 'button', id: 'togglemergecells', img: 'togg
[Libreoffice-commits] core.git: 4 commits - sc/inc sc/source
sc/inc/document.hxx| 11 ++--- sc/source/core/data/documen2.cxx | 78 ++--- sc/source/core/data/documen3.cxx | 12 ++--- sc/source/core/data/documen4.cxx |4 - sc/source/core/data/documen5.cxx |8 +-- sc/source/core/data/documen6.cxx |4 - sc/source/core/data/documen8.cxx | 28 ++--- sc/source/core/data/documen9.cxx | 28 ++--- sc/source/core/data/document.cxx | 56 +- sc/source/core/data/document10.cxx |2 sc/source/core/data/fillinfo.cxx |4 - 11 files changed, 117 insertions(+), 118 deletions(-) New commits: commit fc61be93c60967bf1d6bcffcada8189016d4530e Author: Tor Lillqvist Date: Tue Sep 5 01:12:40 2017 +0300 Prefix one more member of ScDocument: pShell Change-Id: I72f2556f54e1ea4b397f9b21b1d767ae597e6e43 diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 498ea76b119f..e08378e2242c 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -319,7 +319,7 @@ private: SfxUndoManager* mpUndoManager; ScFieldEditEngine* mpEditEngine; // uses pEditPool from xPoolHelper ScNoteEditEngine* mpNoteEngine; // uses pEditPool from xPoolHelper -SfxObjectShell* pShell; +SfxObjectShell* mpShell; VclPtrpPrinter; VclPtr pVirtualDevice_100th_mm; ScDrawLayer*pDrawLayer; // SdrModel @@ -931,7 +931,7 @@ public: boolSetDdeLinkResultMatrix( size_t nDdePos, const ScMatrixRef& pResults ); SfxBindings*GetViewBindings(); -SfxObjectShell* GetDocumentShell() const{ return pShell; } +SfxObjectShell* GetDocumentShell() const{ return mpShell; } SC_DLLPUBLIC ScDrawLayer* GetDrawLayer() { return pDrawLayer; } SC_DLLPUBLIC const ScDrawLayer* GetDrawLayer() const { return pDrawLayer; } SfxBroadcaster* GetDrawBroadcaster(); // to avoid header diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx index 78cc2a103d05..c54564ddd918 100644 --- a/sc/source/core/data/documen2.cxx +++ b/sc/source/core/data/documen2.cxx @@ -138,7 +138,7 @@ ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) : mpUndoManager( nullptr ), mpEditEngine( nullptr ), mpNoteEngine( nullptr ), -pShell( pDocShell ), +mpShell( pDocShell ), pPrinter( nullptr ), pVirtualDevice_100th_mm( nullptr ), pDrawLayer( nullptr ), @@ -266,7 +266,7 @@ const sfx2::LinkManager* ScDocument::GetLinkManager() const sc::DocumentLinkManager& ScDocument::GetDocLinkManager() { if (!mpDocLinkMgr) -mpDocLinkMgr.reset(new sc::DocumentLinkManager(pShell)); +mpDocLinkMgr.reset(new sc::DocumentLinkManager(mpShell)); return *mpDocLinkMgr; } @@ -297,7 +297,7 @@ sal_uInt32 ScDocument::GetDocumentID() const const ScDocument* pThis = this; sal_uInt32 nCrc = rtl_crc32( 0, &pThis, sizeof(ScDocument*) ); // the this pointer only might not be sufficient -nCrc = rtl_crc32( nCrc, &pShell, sizeof(SfxObjectShell*) ); +nCrc = rtl_crc32( nCrc, &mpShell, sizeof(SfxObjectShell*) ); return nCrc; } @@ -328,16 +328,16 @@ IMPL_LINK_NOARG(ScDocument, TrackTimeHdl, Timer *, void) { aTrackIdle.Start();// try again later } -else if (pShell)// execute +else if (mpShell)// execute { TrackFormulas(); -pShell->Broadcast( SfxHint( SfxHintId::ScDataChanged ) ); +mpShell->Broadcast( SfxHint( SfxHintId::ScDataChanged ) ); // modified... -if (!pShell->IsModified()) +if (!mpShell->IsModified()) { -pShell->SetModified(); +mpShell->SetModified(); SfxBindings* pBindings = GetViewBindings(); if (pBindings) { @@ -977,16 +977,16 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos, // 3 => NameBox // 4 => both -if (pSrcDoc->pShell->GetMedium()) +if (pSrcDoc->mpShell->GetMedium()) { -pSrcDoc->maFileURL = pSrcDoc->pShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DecodeMechanism::ToIUri); +pSrcDoc->maFileURL = pSrcDoc->mpShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DecodeMechanism::ToIUri); // for unsaved files use the title name and adjust during save of file if (pSrcDoc->maFileURL.isEmpty()) -pSrcDoc->maFileURL = pSrcDoc->pShell->GetName(); +pSrcDoc->maFileURL = pSrcDoc->mpShell->GetName(); } else { -pSrcDoc->maFileURL = pSrcDoc->pShell->GetName(); +pSrcDoc->maFileURL = pSrcDoc->mpShell-
[Libreoffice-commits] online.git: loleaflet/dist
loleaflet/dist/toolbar/toolbar.js |3 +++ 1 file changed, 3 insertions(+) New commits: commit 01dd761750b0fe0ab5a1c0949fc9dd7b67db195f Author: Henry Castro Date: Mon Sep 4 19:16:07 2017 -0400 loleaflet: log when w2ui toolbar is not created Change-Id: I9f8f50b628028f9f5541aa97f8c2f0ff2e72924d diff --git a/loleaflet/dist/toolbar/toolbar.js b/loleaflet/dist/toolbar/toolbar.js index ef30c422..d69fe1b3 100644 --- a/loleaflet/dist/toolbar/toolbar.js +++ b/loleaflet/dist/toolbar/toolbar.js @@ -722,6 +722,9 @@ $(function () { $('#search-input').off('keypress', onSearchKeyPress).on('keypress', onSearchKeyPress); } }); + if ($('#toolbar-up').children().length === 0) { + console.log('w2ui toolbar is not created'); + } }); var userJoinedPopupMessage = '' + _('%user has joined') + ''; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] online.git: loleaflet/src
loleaflet/src/control/Control.ColumnHeader.js |8 loleaflet/src/control/Control.RowHeader.js|8 2 files changed, 8 insertions(+), 8 deletions(-) New commits: commit 3b6af443bda99dd8f10b668bbafa5efdceb3d6be Author: Henry Castro Date: Mon Sep 4 20:40:53 2017 -0400 loleaflet: related to tdf#107806 Change-Id: Ifd6bd15538007416747accf7b0ad602292b1195a diff --git a/loleaflet/src/control/Control.ColumnHeader.js b/loleaflet/src/control/Control.ColumnHeader.js index c63a0c83..a9571d25 100644 --- a/loleaflet/src/control/Control.ColumnHeader.js +++ b/loleaflet/src/control/Control.ColumnHeader.js @@ -297,14 +297,14 @@ L.Control.ColumnHeader = L.Control.Header.extend({ if (item.width != distance.x) { var command = { + ColumnWidth: { + type: 'unsigned short', + value: this._map._docLayer.twipsToHMM(Math.max(distance.x, 0)) + }, Column: { type: 'unsigned short', value: item.parentNode && item.parentNode.nextSibling && L.DomUtil.getStyle(item.parentNode.nextSibling, 'display') === 'none' ? item.column + 1 : item.column - }, - Width: { - type: 'unsigned short', - value: Math.max(distance.x, 0) } }; diff --git a/loleaflet/src/control/Control.RowHeader.js b/loleaflet/src/control/Control.RowHeader.js index c582117e..744a99a6 100644 --- a/loleaflet/src/control/Control.RowHeader.js +++ b/loleaflet/src/control/Control.RowHeader.js @@ -271,14 +271,14 @@ L.Control.RowHeader = L.Control.Header.extend({ if (item.height != distance.y) { var command = { + RowHeight: { + type: 'unsigned short', + value: this._map._docLayer.twipsToHMM(Math.max(distance.y, 0)) + }, Row: { type: 'long', value: item.parentNode && item.parentNode.nextSibling && L.DomUtil.getStyle(item.parentNode.nextSibling, 'display') === 'none' ? item.row + 1 : item.row - }, - Height: { - type: 'unsigned short', - value: Math.max(distance.y, 0) } }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: officecfg/registry sc/uiconfig sc/UIConfig_scalc.mk
officecfg/registry/data/org/openoffice/Office/UI/Notebookbar.xcu | 22 sc/UIConfig_scalc.mk |2 sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui | 9879 +++ sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui |12664 ++ 4 files changed, 22567 insertions(+) New commits: commit 342622d51f457c5a7d5026814a323d1deece4681 Author: andreas kainz Date: Thu Aug 31 00:19:40 2017 +0200 tdf#107158 Groupedbar variant of the Notebookbar for Calc Change-Id: I8f6a086a0895d54cce6243f65c3f47f7cc4cf50e Reviewed-on: https://gerrit.libreoffice.org/41742 Tested-by: Jenkins Reviewed-by: Yousuf Philips diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Notebookbar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Notebookbar.xcu index ee8aff0b52a5..f10de902dc00 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Notebookbar.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Notebookbar.xcu @@ -83,6 +83,28 @@ false + + +Groupedbar Compact + + +notebookbar_groupedbar_compact.ui + + +false + + + + +Groupedbar Full + + +notebookbar_groupedbar_full.ui + + +false + + Contextual groups diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk index bd926ac93dd6..4e03e316669c 100644 --- a/sc/UIConfig_scalc.mk +++ b/sc/UIConfig_scalc.mk @@ -146,6 +146,8 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/scalc,\ sc/uiconfig/scalc/ui/namerangesdialog \ sc/uiconfig/scalc/ui/notebookbar \ sc/uiconfig/scalc/ui/notebookbar_groups \ + sc/uiconfig/scalc/ui/notebookbar_groupedbar_full \ + sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact \ sc/uiconfig/scalc/ui/managenamesdialog \ sc/uiconfig/scalc/ui/mergecellsdialog \ sc/uiconfig/scalc/ui/movecopysheet \ diff --git a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui new file mode 100644 index ..f4933e3a4e6a --- /dev/null +++ b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_compact.ui @@ -0,0 +1,9879 @@ + + + + + + +True +False + + +True +False +.uno:LeftPara + + + + +True +False +.uno:CenterPara + + + + +True +False +.uno:RightPara + + + + +True +False +.uno:JustifyPara + + + + +True +False + + +True +False +.uno:ExtrusionToggle + + + + +True +False + + + + +True +False +.uno:ExtrusionTiltDown + + + + +True +False +.uno:ExtrusionTiltUp + + + + +True +False +.uno:ExtrusionTiltLeft + + + + +True +False +.uno:ExtrusionTiltRight + + + + +True +False + + +True +False +.uno:ObjectAlignLeft + + + + +True +False +.uno:AlignCenter + + + + +True +False +.uno:ObjectAlignRight + + + + +True +False + + + + +True +False +.uno:AlignUp + + + + +True +False +.uno:AlignMiddle + + + + +True +False +.uno:AlignDown + + + + +True +False + + +True +False +.uno:ToggleAnchorType + + + + +True +False + + + + +True +False +.uno:WrapOff + + + + +True +False +.uno:WrapOn + + + + +True +False +.uno:WrapIdeal + + + + +True +False +.uno:WrapLeft + + + + +True +False +.uno:WrapRight + + + + +True +False +.uno:WrapThrough + + + + +True +False +.uno:WrapThroughTransparent + + + + +True +False +.uno:WrapContour + + + + +True +False +.uno:WrapAnchorOnly + + + + +True +False +.uno:TextWrap + + + + +True +False + + + + +True +
[Libreoffice-commits] core.git: sw/uiconfig
sw/uiconfig/swriter/ui/notebookbar_groupedbar_full.ui | 419 -- 1 file changed, 106 insertions(+), 313 deletions(-) New commits: commit 89c25a02ccf9bd5b4392ffd2d469dbcb4ae94bcb Author: andreas kainz Date: Tue Aug 29 23:49:39 2017 +0200 update notebookbar_groupedbar_full view group sync appearance between writer and calc Change-Id: I7a91e12c0632be4a1dfbc488bcf6397b5219c43f Reviewed-on: https://gerrit.libreoffice.org/41714 Reviewed-by: Yousuf Philips Tested-by: Yousuf Philips diff --git a/sw/uiconfig/swriter/ui/notebookbar_groupedbar_full.ui b/sw/uiconfig/swriter/ui/notebookbar_groupedbar_full.ui index 0fec03e9dde2..16b7a6df4513 100644 --- a/sw/uiconfig/swriter/ui/notebookbar_groupedbar_full.ui +++ b/sw/uiconfig/swriter/ui/notebookbar_groupedbar_full.ui @@ -2,6 +2,7 @@ + True @@ -5568,57 +5569,20 @@ True vertical - + True False +both-horiz +False - -True -False -both-horiz -False - - -True -False -.uno:Zoom - - -False -True - - - - -False -True -0 - - - - + True False -end -True -icons -False - - -True -False -.uno:ZoomPage - - -False -True - - +.uno:Zoom False -True -1 +True @@ -5629,57 +5593,42 @@ - + True False +icons +False - + True False -icons -False - - -True -False -.uno:ControlCodes - - -False -True - - +.uno:ControlCodes