From a4b9630c4ca2372b429489466e3235531c0c5021 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Fri, 22 Apr 2016 10:12:52 +0200 Subject: [PATCH] update to 5.2.0 alpha1 --- .gitignore | 4 + ...15385-use-preferred-size-if-widget-s.patch | 30 - ...78-drawing-the-background-over-an-ac.patch | 52 - 0001-Resolves-tdf-98636.patch | 123 - ...638-sometimes-menu-grab-doesn-t-take.patch | 47 - 0001-Update-liborcus-to-0.11.0.patch | 1995 ----------------- 0001-but-only-for-dialog.patch | 26 - ...rate-better-unit-test-assert-message.patch | 1158 ---------- ...us-bits-means-different-things-again.patch | 48 - 0001-pass-original-CFLAGS.patch | 26 + 0001-reorder.patch | 66 - ...pagate-selected-slides-to-print-dial.patch | 110 - ...271-allow-to-export-only-notes-pages.patch | 346 --- ...oid-double-swap-on-big-endian-arches.patch | 91 - ...hope-that-over-activation-isn-t-real.patch | 329 --- ...uld-start-invisible-and-take-default.patch | 49 - ...-disable-tearability-of-color-window.patch | 46 - ...s-towards-enabling-native-gtk3-popup.patch | 173 -- 0002-reduce-copypasta.patch | 156 -- 0003-detect-Boost.Filesystem.patch | 164 -- ...flush-any-unexecuted-Select-events-o.patch | 81 - ...ayland-start-floating-windows-hidden.patch | 56 - ...estystem-external-for-system-boost-t.patch | 31 - ...-old-action-if-same-command-is-added.patch | 77 - 0005-gtk3-handle-items-without-commands.patch | 32 - ...le-toolbox-menu-entries-as-checkable.patch | 64 - ...t-gtk-layout-direction-to-match-ours.patch | 26 - ...-gtk3-implement-native-context-menus.patch | 552 ----- libreoffice.spec | 53 +- sources | 8 +- 30 files changed, 49 insertions(+), 5970 deletions(-) delete mode 100644 0001-Resolves-rhbz-1315385-use-preferred-size-if-widget-s.patch delete mode 100644 0001-Resolves-tdf-91778-drawing-the-background-over-an-ac.patch delete mode 100644 0001-Resolves-tdf-98636.patch delete mode 100644 0001-Resolves-tdf-98638-sometimes-menu-grab-doesn-t-take.patch delete mode 100644 0001-Update-liborcus-to-0.11.0.patch delete mode 100644 0001-but-only-for-dialog.patch delete mode 100644 0001-generate-better-unit-test-assert-message.patch delete mode 100644 0001-gtk3-various-bits-means-different-things-again.patch create mode 100644 0001-pass-original-CFLAGS.patch delete mode 100644 0001-reorder.patch delete mode 100644 0001-rhbz-1168757-propagate-selected-slides-to-print-dial.patch delete mode 100644 0001-tdf-39271-allow-to-export-only-notes-pages.patch delete mode 100644 0001-tdf-95450-avoid-double-swap-on-big-endian-arches.patch delete mode 100644 0001-tdf-97665-Let-s-hope-that-over-activation-isn-t-real.patch delete mode 100644 0001-these-popups-should-start-invisible-and-take-default.patch delete mode 100644 0002-disable-tearability-of-color-window.patch delete mode 100644 0002-gtk3-some-changes-towards-enabling-native-gtk3-popup.patch delete mode 100644 0002-reduce-copypasta.patch delete mode 100644 0003-detect-Boost.Filesystem.patch delete mode 100644 0003-gtk3-vcl-popups-flush-any-unexecuted-Select-events-o.patch delete mode 100644 0003-gtk3-wayland-start-floating-windows-hidden.patch delete mode 100644 0004-define-boost_filestystem-external-for-system-boost-t.patch delete mode 100644 0004-gtk3-replace-old-action-if-same-command-is-added.patch delete mode 100644 0005-gtk3-handle-items-without-commands.patch delete mode 100644 0006-mark-checkable-toolbox-menu-entries-as-checkable.patch delete mode 100644 0007-set-gtk-layout-direction-to-match-ours.patch delete mode 100644 0008-gtk3-implement-native-context-menus.patch diff --git a/.gitignore b/.gitignore index 0b331da..3348b40 100644 --- a/.gitignore +++ b/.gitignore @@ -39,3 +39,7 @@ /libreoffice-5.1.3.1.tar.xz /libreoffice-help-5.1.3.1.tar.xz /libreoffice-translations-5.1.3.1.tar.xz +/ce12af00283eb90d9281956524250d6e-xmlsec1-1.2.20.tar.gz +/libreoffice-5.2.0.0.alpha1.tar.xz +/libreoffice-help-5.2.0.0.alpha1.tar.xz +/libreoffice-translations-5.2.0.0.alpha1.tar.xz diff --git a/0001-Resolves-rhbz-1315385-use-preferred-size-if-widget-s.patch b/0001-Resolves-rhbz-1315385-use-preferred-size-if-widget-s.patch deleted file mode 100644 index 747ef70..0000000 --- a/0001-Resolves-rhbz-1315385-use-preferred-size-if-widget-s.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 86692366b7edbd6dd1ce329a172fb78d402ac328 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Wed, 9 Mar 2016 11:01:43 +0000 -Subject: [PATCH] Resolves: rhbz#1315385 use preferred size if widget supports - it - -when deciding if a popup needs to be placed up or down to stay -visible on screen - -Change-Id: I718e0ee4a79152e919ac95841e15d4b53764ac78 ---- - vcl/source/window/floatwin.cxx | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx -index 00c3b34..6553f94 100644 ---- a/vcl/source/window/floatwin.cxx -+++ b/vcl/source/window/floatwin.cxx -@@ -244,7 +244,7 @@ Point FloatingWindow::ImplCalcPos( vcl::Window* pWindow, - { - // get window position - Point aPos; -- Size aSize = pWindow->GetSizePixel(); -+ Size aSize = ::isLayoutEnabled(pWindow) ? pWindow->get_preferred_size() : pWindow->GetSizePixel(); - Rectangle aScreenRect = pWindow->ImplGetFrameWindow()->GetDesktopRectPixel(); - FloatingWindow *pFloatingWindow = dynamic_cast( pWindow ); - --- -2.7.1 - diff --git a/0001-Resolves-tdf-91778-drawing-the-background-over-an-ac.patch b/0001-Resolves-tdf-91778-drawing-the-background-over-an-ac.patch deleted file mode 100644 index 29fc348..0000000 --- a/0001-Resolves-tdf-91778-drawing-the-background-over-an-ac.patch +++ /dev/null @@ -1,52 +0,0 @@ -From a7c499a8dcff909693793588c9976a2c039604de Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Wed, 20 Apr 2016 11:55:01 +0100 -Subject: [PATCH] Resolves: tdf#91778 drawing the background over an active - cursor - -will overwrite it, which means that when it toggles "off" afterwards, it uses -invert on the freshly drawn background which will visually make it appear "on" -and not off - -Just explictly turn it off and restore it and avoid the whole potential -problem. - -Change-Id: Ie21d77e9d704124011e43b42c98b26eaf208eef2 -(cherry picked from commit 29a9f433c268414747d8ec7343fc2b5987971738) ---- - sc/source/ui/view/gridwin4.cxx | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx -index e15cb1e..731c560 100644 ---- a/sc/source/ui/view/gridwin4.cxx -+++ b/sc/source/ui/view/gridwin4.cxx -@@ -900,6 +900,14 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI - aEnd.X() -= 2 * nLayoutSign; - aEnd.Y() -= 2; - -+ // toggle the cursor off if its on to ensure the cursor invert -+ // background logic remains valid after the background is cleared on -+ // the next cursor flash -+ vcl::Cursor* pCrsr = pEditView->GetCursor(); -+ const bool bVisCursor = pCrsr && pCrsr->IsVisible(); -+ if (bVisCursor) -+ pCrsr->Hide(); -+ - // set the correct mapmode - Rectangle aBackground(aStart, aEnd); - if (bIsTiledRendering) -@@ -916,6 +924,10 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI - // paint the editeng text - pEditView->Paint(rDevice.PixelToLogic(Rectangle(Point(nScrX, nScrY), Size(aOutputData.GetScrW(), aOutputData.GetScrH()))), &rDevice); - rDevice.SetMapMode(MAP_PIXEL); -+ -+ // restore the cursor it it was originally visible -+ if (bVisCursor) -+ pCrsr->Show(); - } - - if (pViewData->HasEditView(eWhich)) --- -2.7.3 - diff --git a/0001-Resolves-tdf-98636.patch b/0001-Resolves-tdf-98636.patch deleted file mode 100644 index 2e20216..0000000 --- a/0001-Resolves-tdf-98636.patch +++ /dev/null @@ -1,123 +0,0 @@ -From 66db55aa84e8401a9eccedb02c67150833a344ba Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Tue, 15 Mar 2016 11:15:40 +0000 -Subject: [PATCH] Resolves: tdf#98636 - -On changing a menu item from a non-submenu to a submenu then update -the newly created menu as if it was the first full update of -the entire menu hierarchy. - -On changing a menu item from a submenu to a non-submenu its evidentially -not sufficient to unset the G_LO_MENU_ATTRIBUTE_SUBMENU_ACTION attribute -so remove the submenu-item and add a new non-submenu item to force -its new type - -Change-Id: I2030d9198d6849643a5991ddfffc1cc3425ba72e ---- - vcl/inc/unx/gtk/gtksalmenu.hxx | 2 +- - vcl/unx/gtk/glomenu.cxx | 1 + - vcl/unx/gtk/gtksalmenu.cxx | 24 ++++++++++++++++++++---- - 3 files changed, 22 insertions(+), 5 deletions(-) - -diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx -index 8dadcfe..0e1cfd1 100644 ---- a/vcl/inc/unx/gtk/gtksalmenu.hxx -+++ b/vcl/inc/unx/gtk/gtksalmenu.hxx -@@ -87,7 +87,7 @@ public: - bool IsItemVisible( unsigned nPos ); - - void NativeSetItemText( unsigned nSection, unsigned nItemPos, const OUString& rText ); -- void NativeSetItemCommand( unsigned nSection, -+ bool NativeSetItemCommand( unsigned nSection, - unsigned nItemPos, - sal_uInt16 nId, - const gchar* aCommand, -diff --git a/vcl/unx/gtk/glomenu.cxx b/vcl/unx/gtk/glomenu.cxx -index 835e832..e8529e0 100644 ---- a/vcl/unx/gtk/glomenu.cxx -+++ b/vcl/unx/gtk/glomenu.cxx -@@ -294,6 +294,7 @@ g_lo_menu_set_action_and_target_value (GLOMenu *menu, - - g_lo_menu_set_attribute_value (menu, position, G_MENU_ATTRIBUTE_ACTION, action_value); - g_lo_menu_set_attribute_value (menu, position, G_MENU_ATTRIBUTE_TARGET, target_value); -+ g_lo_menu_set_attribute_value (menu, position, G_LO_MENU_ATTRIBUTE_SUBMENU_ACTION, nullptr); - - g_menu_model_items_changed (G_MENU_MODEL (menu), position, 1, 1); - } -diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx -index 91b7f35..48520c2 100644 ---- a/vcl/unx/gtk/gtksalmenu.cxx -+++ b/vcl/unx/gtk/gtksalmenu.cxx -@@ -297,7 +297,7 @@ void GtkSalMenu::ImplUpdate(bool bRecurse, bool bRemoveDisabledEntries) - - if ( pSubmenu && pSubmenu->GetMenu() ) - { -- NativeSetItemCommand( nSection, nItemPos, nId, aNativeCommand, itemBits, FALSE, TRUE ); -+ bool bNonMenuChangedToMenu = NativeSetItemCommand( nSection, nItemPos, nId, aNativeCommand, itemBits, FALSE, TRUE ); - pNewCommandList = g_list_append( pNewCommandList, g_strdup( aNativeCommand ) ); - - GLOMenu* pSubMenuModel = g_lo_menu_get_submenu_from_item_in_section( pLOMenu, nSection, nItemPos ); -@@ -310,12 +310,12 @@ void GtkSalMenu::ImplUpdate(bool bRecurse, bool bRemoveDisabledEntries) - - g_object_unref( pSubMenuModel ); - -- if ( bRecurse ) -+ if (bRecurse || bNonMenuChangedToMenu) - { - SAL_INFO("vcl.unity", "preparing submenu " << pSubMenuModel << " to menu model " << G_MENU_MODEL(pSubMenuModel) << " and action group " << G_ACTION_GROUP(pActionGroup)); - pSubmenu->SetMenuModel( G_MENU_MODEL( pSubMenuModel ) ); - pSubmenu->SetActionGroup( G_ACTION_GROUP( pActionGroup ) ); -- pSubmenu->ImplUpdate(bRecurse, bRemoveDisabledEntries); -+ pSubmenu->ImplUpdate(true, bRemoveDisabledEntries); - } - } - -@@ -798,7 +798,7 @@ void GtkSalMenu::NativeSetAccelerator( unsigned nSection, unsigned nItemPos, con - g_free( aCurrentAccel ); - } - --void GtkSalMenu::NativeSetItemCommand( unsigned nSection, -+bool GtkSalMenu::NativeSetItemCommand( unsigned nSection, - unsigned nItemPos, - sal_uInt16 nId, - const gchar* aCommand, -@@ -806,6 +806,8 @@ void GtkSalMenu::NativeSetItemCommand( unsigned nSection, - gboolean bChecked, - gboolean bIsSubmenu ) - { -+ bool bSubMenuAddedOrRemoved = false; -+ - SolarMutexGuard aGuard; - GLOActionGroup* pActionGroup = G_LO_ACTION_GROUP( mpActionGroup ); - -@@ -845,6 +847,18 @@ void GtkSalMenu::NativeSetItemCommand( unsigned nSection, - - if ( aCurrentCommand == nullptr || g_strcmp0( aCurrentCommand, aCommand ) != 0 ) - { -+ bool bOldHasSubmenu = g_lo_menu_get_submenu_from_item_in_section(pMenu, nSection, nItemPos) != nullptr; -+ bSubMenuAddedOrRemoved = bOldHasSubmenu != bIsSubmenu; -+ if (bSubMenuAddedOrRemoved) -+ { -+ //tdf#98636 its not good enough to unset the "submenu-action" attribute to change something -+ //from a submenu to a non-submenu item, so remove the old one entirely and re-add it to -+ //support achieving that -+ gchar* pLabel = g_lo_menu_get_label_from_item_in_section(pMenu, nSection, nItemPos); -+ g_lo_menu_remove_from_section(pMenu, nSection, nItemPos); -+ g_lo_menu_insert_in_section(pMenu, nSection, nItemPos, pLabel); -+ } -+ - g_lo_menu_set_command_to_item_in_section( pMenu, nSection, nItemPos, aCommand ); - - gchar* aItemCommand = g_strconcat("win.", aCommand, NULL ); -@@ -865,6 +879,8 @@ void GtkSalMenu::NativeSetItemCommand( unsigned nSection, - - if (pTarget) - g_variant_unref(pTarget); -+ -+ return bSubMenuAddedOrRemoved; - } - - GtkSalMenu* GtkSalMenu::GetMenuForItemCommand(gchar* aCommand, int& rDupsToSkip, gboolean bGetSubmenu) --- -2.7.1 - diff --git a/0001-Resolves-tdf-98638-sometimes-menu-grab-doesn-t-take.patch b/0001-Resolves-tdf-98638-sometimes-menu-grab-doesn-t-take.patch deleted file mode 100644 index 2f05e6e..0000000 --- a/0001-Resolves-tdf-98638-sometimes-menu-grab-doesn-t-take.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 0ee0e8010f986b67d696111ff4ea269ccf904aba Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Mon, 14 Mar 2016 12:50:56 +0000 -Subject: [PATCH] Resolves: tdf#98638 sometimes menu grab doesn't take - -due to older timestamp vs earlier grab. Which suggests we should probably use -GDK_CURRENT_TIME everywhere or (probably better) use gtk_get_current_event_time -everywhere - -Change-Id: Ie04ab254b9fea423143cc9a129d2eecb683ed300 ---- - vcl/unx/gtk3/gtk3gtkframe.cxx | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx -index bdd5499..742f812 100644 ---- a/vcl/unx/gtk3/gtk3gtkframe.cxx -+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx -@@ -2078,9 +2078,9 @@ void GtkSalFrame::grabPointer( bool bGrab, bool bOwnerEvents ) - GdkDeviceManager* pDeviceManager = gdk_display_get_device_manager(getGdkDisplay()); - GdkDevice* pPointer = gdk_device_manager_get_client_pointer(pDeviceManager); - if (bGrab) -- gdk_device_grab(pPointer, widget_get_window(getMouseEventWidget()), GDK_OWNERSHIP_NONE, bOwnerEvents, (GdkEventMask) nMask, m_pCurrentCursor, GDK_CURRENT_TIME); -+ gdk_device_grab(pPointer, widget_get_window(getMouseEventWidget()), GDK_OWNERSHIP_NONE, bOwnerEvents, (GdkEventMask) nMask, m_pCurrentCursor, gtk_get_current_event_time()); - else -- gdk_device_ungrab(pPointer, GDK_CURRENT_TIME); -+ gdk_device_ungrab(pPointer, gtk_get_current_event_time()); - } - - void GtkSalFrame::grabKeyboard( bool bGrab ) -@@ -2098,11 +2098,11 @@ void GtkSalFrame::grabKeyboard( bool bGrab ) - if (bGrab) - { - gdk_device_grab(pKeyboard, widget_get_window(m_pWindow), GDK_OWNERSHIP_NONE, -- true, (GdkEventMask)(GDK_KEY_PRESS | GDK_KEY_RELEASE), nullptr, GDK_CURRENT_TIME); -+ true, (GdkEventMask)(GDK_KEY_PRESS | GDK_KEY_RELEASE), nullptr, gtk_get_current_event_time()); - } - else - { -- gdk_device_ungrab(pKeyboard, GDK_CURRENT_TIME); -+ gdk_device_ungrab(pKeyboard, gtk_get_current_event_time()); - } - } - --- -2.7.1 - diff --git a/0001-Update-liborcus-to-0.11.0.patch b/0001-Update-liborcus-to-0.11.0.patch deleted file mode 100644 index f7d0a71..0000000 --- a/0001-Update-liborcus-to-0.11.0.patch +++ /dev/null @@ -1,1995 +0,0 @@ -From b325b4c286b56a63316063a3ac4648bf7b7efcbe Mon Sep 17 00:00:00 2001 -From: Kohei Yoshida -Date: Sat, 5 Mar 2016 20:09:34 -0500 -Subject: [PATCH] Update liborcus to 0.11.0. - -Markus did half of this, and I simply carried the torch. - -Change-Id: Icd3ee1e4b5bd562faee06dfd9dce52a4bed49a71 -Reviewed-on: https://gerrit.libreoffice.org/22943 -Tested-by: Jenkins -Reviewed-by: Kohei Yoshida ---- - RepositoryExternal.mk | 19 +- - configure.ac | 2 +- - download.lst | 4 +- - external/boost/Module_boost.mk | 1 + - external/boost/StaticLibrary_boost_filesystem.mk | 36 + - ...0001-Fix-for-OSX-build-inside-LibreOffice.patch | 1175 ++++++++++++++++++++ - .../liborcus/0001-Get-it-to-build-on-Windows.patch | 212 ++++ - external/liborcus/ExternalPackage_liborcus.mk | 8 +- - external/liborcus/ExternalProject_liborcus.mk | 22 +- - external/liborcus/Library_orcus-parser.mk | 3 + - external/liborcus/Library_orcus.mk | 18 +- - external/liborcus/UnpackedTarball_liborcus.mk | 11 +- - external/liborcus/fix-crash-ooo55043-1.patch.0 | 17 - - external/liborcus/unusedheader.patch.0 | 11 - - external/liborcus/windows-constants-hack.patch | 15 + - sc/Library_scfilt.mk | 1 + - sc/source/filter/inc/orcusinterface.hxx | 2 + - sc/source/filter/orcus/filterdetect.cxx | 2 +- - sc/source/filter/orcus/interface.cxx | 63 +- - 19 files changed, 1544 insertions(+), 78 deletions(-) - create mode 100644 external/boost/StaticLibrary_boost_filesystem.mk - create mode 100644 external/liborcus/0001-Fix-for-OSX-build-inside-LibreOffice.patch - create mode 100755 external/liborcus/0001-Get-it-to-build-on-Windows.patch - delete mode 100644 external/liborcus/fix-crash-ooo55043-1.patch.0 - delete mode 100644 external/liborcus/unusedheader.patch.0 - create mode 100755 external/liborcus/windows-constants-hack.patch - -diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk -index 5b497ee..c6fe371 100644 ---- a/RepositoryExternal.mk -+++ b/RepositoryExternal.mk -@@ -743,6 +743,21 @@ $(call gb_LinkTarget_set_include,$(1),\ - - endef - -+define gb_LinkTarget__use_boost_filesystem -+$(call gb_LinkTarget_add_defs,$(1),\ -+ -DBOOST_ALL_NO_LIB \ -+) -+ -+$(call gb_LinkTarget_use_static_libraries,$(1),\ -+ boost_filesystem \ -+) -+ -+endef -+ -+define gb_ExternalProject__use_boost_filesystem -+$(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem) -+endef -+ - define gb_ExternalProject__use_boost_headers - $(call gb_ExternalProject_use_unpacked,$(1),boost) - -@@ -3129,7 +3144,7 @@ $(call gb_LinkTarget_set_include,$(1),\ - ) - - $(call gb_LinkTarget_add_libs,$(1),\ -- -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.10 \ -+ -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/liborcus/.libs -lorcus-0.11 \ - ) - - $(if $(SYSTEM_BOOST), \ -@@ -3148,7 +3163,7 @@ $(call gb_LinkTarget_set_include,$(1),\ - ) - - $(call gb_LinkTarget_add_libs,$(1),\ -- -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.10 \ -+ -L$(call gb_UnpackedTarball_get_dir,liborcus)/src/parser/.libs -lorcus-parser-0.11 \ - ) - - endef -diff --git a/configure.ac b/configure.ac -index 934d43a..dab1919 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -9196,7 +9196,7 @@ if test -z "$enable_orcus" -o "$enable_orcus" != no; then - ENABLE_ORCUS="TRUE" - AC_DEFINE(ENABLE_ORCUS) - -- libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.10 >= 0.9.0]) -+ libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.11 >= 0.11.0]) - if test "$with_system_orcus" != "yes"; then - if test "$SYSTEM_BOOST" = "TRUE"; then - # =========================================================== -diff --git a/external/boost/Module_boost.mk b/external/boost/Module_boost.mk -index 5bac25e..ae407f5 100644 ---- a/external/boost/Module_boost.mk -+++ b/external/boost/Module_boost.mk -@@ -11,6 +11,7 @@ $(eval $(call gb_Module_Module,boost)) - - $(eval $(call gb_Module_add_targets,boost,\ - StaticLibrary_boostdatetime \ -+ StaticLibrary_boost_filesystem \ - StaticLibrary_boost_system \ - StaticLibrary_boost_iostreams \ - UnpackedTarball_boost \ -diff --git a/external/boost/StaticLibrary_boost_filesystem.mk b/external/boost/StaticLibrary_boost_filesystem.mk -new file mode 100644 -index 0000000..024308a ---- /dev/null -+++ b/external/boost/StaticLibrary_boost_filesystem.mk -@@ -0,0 +1,36 @@ -+# -*- 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_StaticLibrary_StaticLibrary,boost_filesystem)) -+ -+$(eval $(call gb_StaticLibrary_use_unpacked,boost_filesystem,boost)) -+ -+$(eval $(call gb_StaticLibrary_set_warnings_not_errors,boost_filesystem)) -+ -+# disable "auto link" "feature" on MSVC -+$(eval $(call gb_StaticLibrary_add_defs,boost_filesystem,\ -+ -DBOOST_ALL_NO_LIB \ -+)) -+ -+$(eval $(call gb_StaticLibrary_use_external,boost_filesystem,boost_headers)) -+ -+$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,boost_filesystem,cpp)) -+ -+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,boost_filesystem,\ -+ UnpackedTarball/boost/libs/filesystem/src/codecvt_error_category \ -+ UnpackedTarball/boost/libs/filesystem/src/operations \ -+ UnpackedTarball/boost/libs/filesystem/src/path \ -+ UnpackedTarball/boost/libs/filesystem/src/path_traits \ -+ UnpackedTarball/boost/libs/filesystem/src/portability \ -+ UnpackedTarball/boost/libs/filesystem/src/unique_path \ -+ UnpackedTarball/boost/libs/filesystem/src/utf8_codecvt_facet \ -+ UnpackedTarball/boost/libs/filesystem/src/windows_file_codecvt \ -+)) -+ -+# vim: set noet sw=4 ts=4: -diff --git a/external/liborcus/0001-Fix-for-OSX-build-inside-LibreOffice.patch b/external/liborcus/0001-Fix-for-OSX-build-inside-LibreOffice.patch -new file mode 100644 -index 0000000..d03c98d ---- /dev/null -+++ b/external/liborcus/0001-Fix-for-OSX-build-inside-LibreOffice.patch -@@ -0,0 +1,1175 @@ -+From a1df2d984d527931c6cbbe6547856283bdbf6a9b Mon Sep 17 00:00:00 2001 -+From: Kohei Yoshida -+Date: Sun, 6 Mar 2016 21:21:31 -0500 -+Subject: [PATCH] Fix for OSX build inside LibreOffice. -+ -+--- -+ include/orcus/sax_ns_parser.hpp | 2 +- -+ slickedit/orcus.vpj | 178 ++++--------------------------- -+ src/liborcus/dom_tree.cpp | 12 +-- -+ src/liborcus/json_document_tree.cpp | 29 +++-- -+ src/liborcus/json_document_tree_test.cpp | 2 +- -+ src/liborcus/ods_content_xml_context.cpp | 2 +- -+ src/liborcus/opc_reader.cpp | 2 +- -+ src/liborcus/orcus_gnumeric.cpp | 2 +- -+ src/liborcus/orcus_import_ods.cpp | 2 +- -+ src/liborcus/orcus_import_xlsx.cpp | 2 +- -+ src/liborcus/orcus_xls_xml.cpp | 2 +- -+ src/liborcus/orcus_xlsx.cpp | 20 ++-- -+ src/liborcus/orcus_xml.cpp | 4 +- -+ src/liborcus/xlsx_sheet_context.cpp | 8 +- -+ src/liborcus/xml_map_tree.cpp | 6 +- -+ src/liborcus/xml_structure_tree.cpp | 4 +- -+ src/liborcus/yaml_document_tree.cpp | 34 +++--- -+ src/mso/encryption_info.cpp | 3 +- -+ src/orcus_filter_global.cpp | 2 +- -+ src/orcus_json_main.cpp | 2 +- -+ src/orcus_yaml_main.cpp | 2 +- -+ src/parser/json_parser_base.cpp | 2 +- -+ src/parser/sax_parser_base.cpp | 2 +- -+ src/parser/string_pool.cpp | 4 +- -+ src/parser/yaml_parser_base.cpp | 2 +- -+ src/spreadsheet/document.cpp | 2 +- -+ 26 files changed, 95 insertions(+), 237 deletions(-) -+ -+diff --git a/include/orcus/sax_ns_parser.hpp b/include/orcus/sax_ns_parser.hpp -+index 680f39d..49a2b48 100644 -+--- a/include/orcus/sax_ns_parser.hpp -++++ b/include/orcus/sax_ns_parser.hpp -+@@ -142,7 +142,7 @@ private: -+ -+ void start_element(const sax::parser_element& elem) -+ { -+- m_scopes.push_back(make_unique<__sax::elem_scope>()); -++ m_scopes.push_back(orcus::make_unique<__sax::elem_scope>()); -+ __sax::elem_scope& scope = *m_scopes.back(); -+ scope.ns = m_ns_cxt.get(elem.ns); -+ scope.name = elem.name; -+diff --git a/slickedit/orcus.vpj b/slickedit/orcus.vpj -+index 23c6d42..bbc89ec 100644 -+--- a/slickedit/orcus.vpj -++++ b/slickedit/orcus.vpj -+@@ -145,6 +145,10 @@ -+ Filters=""> -+ -+ -++ -++ -++ -++ -+ -+ -+ -+@@ -186,6 +190,7 @@ -+ -+ -+ -++ -+ -+ -+ -+@@ -193,43 +198,34 @@ -+ -+ -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+ -+ -+ -+- -+- -+ -+ -+ -++ -++ -++ -+ -+ -+ -+ -+ -++ -++ -+ -+ -+ -+@@ -240,308 +236,172 @@ -+ -+ -+ -+- -+- -+ -++ -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+ -+- -+ -+ -+ -+ -+ -+- -+ -+- -+- -+ -+- -++ -++ -++ -+ -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+- -+- -+ -+ -+- -+- -+ -+- -++ -+ -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+- -+- -+ -+ -+- -+- -+ -+- -++ -+ -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+- -+- -+ -+ -+- -+- -++ -++ -+ -+ -+- -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+- -+- -+ -+ -+- -+ -+ -+ -+- -+- -+ -+ -+- -+- -+ -+ -+ -+ -+- -+- -+ -+ -+- -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+- -+- -+ -+ -+- -+- -+ -+ -+- -+ -+- -+- -+ -+ -+ -+ -+ -+ -+- -+ -+ -+ -+- -+- -+ -+ -+- -+- -+ -+ -+ -+@@ -565,6 +425,7 @@ -+ -+ -+ -++ -+ -+ -+ -+@@ -597,7 +458,6 @@ -+ -+ -+ -+- -+ -+ -+ -+diff --git a/src/liborcus/dom_tree.cpp b/src/liborcus/dom_tree.cpp -+index 255a7d7..1b4588b 100644 -+--- a/src/liborcus/dom_tree.cpp -++++ b/src/liborcus/dom_tree.cpp -+@@ -177,7 +177,7 @@ void dom_tree::content::print(ostream& os, const xmlns_context& /*cxt*/) const -+ dom_tree::content::~content() {} -+ -+ dom_tree::dom_tree(xmlns_context& cxt) : -+- mp_impl(make_unique(cxt)) {} -++ mp_impl(orcus::make_unique(cxt)) {} -+ -+ dom_tree::~dom_tree() {} -+ -+@@ -242,7 +242,7 @@ void dom_tree::start_element(xmlns_id_t ns, const pstring& name) -+ -+ // Append new element as a child element of the current element. -+ p = mp_impl->m_elem_stack.back(); -+- p->child_nodes.push_back(make_unique(ns, name_safe)); -++ p->child_nodes.push_back(orcus::make_unique(ns, name_safe)); -+ p = static_cast(p->child_nodes.back().get()); -+ p->attrs.swap(mp_impl->m_cur_attrs); -+ mp_impl->m_elem_stack.push_back(p); -+@@ -269,7 +269,7 @@ void dom_tree::set_characters(const pstring& val) -+ -+ element* p = mp_impl->m_elem_stack.back(); -+ val2 = mp_impl->m_pool.intern(val2).first; // Make sure the string is persistent. -+- p->child_nodes.push_back(make_unique(val2)); -++ p->child_nodes.push_back(orcus::make_unique(val2)); -+ } -+ -+ void dom_tree::set_attribute(xmlns_id_t ns, const pstring& name, const pstring& val) -+@@ -283,7 +283,7 @@ void dom_tree::set_attribute(xmlns_id_t ns, const pstring& name, const pstring& -+ -+ void dom_tree::set_doctype(const sax::doctype_declaration& dtd) -+ { -+- mp_impl->m_doctype = make_unique(dtd); // make a copy. -++ mp_impl->m_doctype = orcus::make_unique(dtd); // make a copy. -+ -+ sax::doctype_declaration& this_dtd = *mp_impl->m_doctype; -+ string_pool& pool = mp_impl->m_pool; -+@@ -360,7 +360,7 @@ void dom_tree::dump_compact(ostream& os) const -+ -+ scopes_type scopes; -+ -+- scopes.push_back(make_unique(string(), mp_impl->m_root)); -++ scopes.push_back(orcus::make_unique(string(), mp_impl->m_root)); -+ while (!scopes.empty()) -+ { -+ bool new_scope = false; -+@@ -418,7 +418,7 @@ void dom_tree::dump_compact(ostream& os) const -+ ++cur_scope.current_pos; -+ ostringstream elem_name; -+ elem->print(elem_name, mp_impl->m_ns_cxt); -+- scopes.push_back(make_unique(elem_name.str())); -++ scopes.push_back(orcus::make_unique(elem_name.str())); -+ scope& child_scope = *scopes.back(); -+ child_scope.nodes.swap(nodes); -+ child_scope.current_pos = child_scope.nodes.begin(); -+diff --git a/src/liborcus/json_document_tree.cpp b/src/liborcus/json_document_tree.cpp -+index adafcbf..81289e1 100644 -+--- a/src/liborcus/json_document_tree.cpp -++++ b/src/liborcus/json_document_tree.cpp -+@@ -55,7 +55,6 @@ using node_t = json::detail::node_t; -+ -+ const char* tab = " "; -+ constexpr char quote = '"'; -+-constexpr char backslash = '\\'; -+ -+ const xmlns_id_t NS_orcus_json_xml = "http://schemas.kohei.us/orcus/2015/json"; -+ -+@@ -455,13 +454,13 @@ public: -+ { -+ if (m_root) -+ { -+- json_value* jv = push_value(make_unique()); -++ json_value* jv = push_value(orcus::make_unique()); -+ assert(jv && jv->type == node_t::array); -+ m_stack.push_back(parser_stack(jv)); -+ } -+ else -+ { -+- m_root = make_unique(); -++ m_root = orcus::make_unique(); -+ m_stack.push_back(parser_stack(m_root.get())); -+ } -+ } -+@@ -476,13 +475,13 @@ public: -+ { -+ if (m_root) -+ { -+- json_value* jv = push_value(make_unique()); -++ json_value* jv = push_value(orcus::make_unique()); -+ assert(jv && jv->type == node_t::object); -+ m_stack.push_back(parser_stack(jv)); -+ } -+ else -+ { -+- m_root = make_unique(); -++ m_root = orcus::make_unique(); -+ m_stack.push_back(parser_stack(m_root.get())); -+ } -+ } -+@@ -504,17 +503,17 @@ public: -+ -+ void boolean_true() -+ { -+- push_value(make_unique(node_t::boolean_true)); -++ push_value(orcus::make_unique(node_t::boolean_true)); -+ } -+ -+ void boolean_false() -+ { -+- push_value(make_unique(node_t::boolean_false)); -++ push_value(orcus::make_unique(node_t::boolean_false)); -+ } -+ -+ void null() -+ { -+- push_value(make_unique(node_t::null)); -++ push_value(orcus::make_unique(node_t::null)); -+ } -+ -+ void string(const char* p, size_t len, bool transient) -+@@ -524,12 +523,12 @@ public: -+ // The tree manages the life cycle of this string value. -+ s = m_pool.intern(s).first; -+ -+- push_value(make_unique(s)); -++ push_value(orcus::make_unique(s)); -+ } -+ -+ void number(double val) -+ { -+- push_value(make_unique(val)); -++ push_value(orcus::make_unique(val)); -+ } -+ -+ void swap(std::unique_ptr& other_root) -+@@ -554,8 +553,8 @@ struct node::impl -+ impl(const json_value* jv) : m_node(jv) {} -+ }; -+ -+-node::node(const json_value* jv) : mp_impl(make_unique(jv)) {} -+-node::node(const node& other) : mp_impl(make_unique(other.mp_impl->m_node)) {} -++node::node(const json_value* jv) : mp_impl(orcus::make_unique(jv)) {} -++node::node(const node& other) : mp_impl(orcus::make_unique(other.mp_impl->m_node)) {} -+ node::node(node&& rhs) : mp_impl(std::move(rhs.mp_impl)) {} -+ node::~node() {} -+ -+@@ -720,12 +719,12 @@ struct json_document_tree::impl -+ std::unique_ptr m_own_pool; -+ string_pool& m_pool; -+ -+- impl() : m_own_pool(make_unique()), m_pool(*m_own_pool) {} -++ impl() : m_own_pool(orcus::make_unique()), m_pool(*m_own_pool) {} -+ impl(string_pool& pool) : m_pool(pool) {} -+ }; -+ -+-json_document_tree::json_document_tree() : mp_impl(make_unique()) {} -+-json_document_tree::json_document_tree(string_pool& pool) : mp_impl(make_unique(pool)) {} -++json_document_tree::json_document_tree() : mp_impl(orcus::make_unique()) {} -++json_document_tree::json_document_tree(string_pool& pool) : mp_impl(orcus::make_unique(pool)) {} -+ json_document_tree::~json_document_tree() {} -+ -+ void json_document_tree::load(const std::string& strm, const json_config& config) -+diff --git a/src/liborcus/json_document_tree_test.cpp b/src/liborcus/json_document_tree_test.cpp -+index da16150..4b4fcbd 100644 -+--- a/src/liborcus/json_document_tree_test.cpp -++++ b/src/liborcus/json_document_tree_test.cpp -+@@ -193,7 +193,7 @@ std::unique_ptr get_doc_tree(const char* filepath) -+ cout << "--- original" << endl; -+ cout << strm << endl; -+ -+- auto doc = make_unique(); -++ auto doc = orcus::make_unique(); -+ doc->load(strm, test_config); -+ -+ return doc; -+diff --git a/src/liborcus/ods_content_xml_context.cpp b/src/liborcus/ods_content_xml_context.cpp -+index f496353..c4e706d 100644 -+--- a/src/liborcus/ods_content_xml_context.cpp -++++ b/src/liborcus/ods_content_xml_context.cpp -+@@ -588,7 +588,7 @@ void ods_content_xml_context::push_cell_value() -+ ods_session_data& ods_data = -+ static_cast(*get_session_context().mp_data); -+ ods_data.m_formulas.push_back( -+- make_unique( -++ orcus::make_unique( -+ m_tables.size()-1, m_row, m_col, m_cell_attr.formula_grammar, m_cell_attr.formula)); -+ -+ ods_session_data::formula& formula_data = *ods_data.m_formulas.back(); -+diff --git a/src/liborcus/opc_reader.cpp b/src/liborcus/opc_reader.cpp -+index 814b2cf..666530e 100644 -+--- a/src/liborcus/opc_reader.cpp -++++ b/src/liborcus/opc_reader.cpp -+@@ -244,7 +244,7 @@ void opc_reader::read_content_types() -+ m_config, m_ns_repo, opc_tokens, -+ reinterpret_cast(&buffer[0]), buffer.size()); -+ -+- auto handler = make_unique( -++ auto handler = orcus::make_unique( -+ new opc_content_types_context(m_session_cxt, opc_tokens)); -+ -+ parser.set_handler(handler.get()); -+diff --git a/src/liborcus/orcus_gnumeric.cpp b/src/liborcus/orcus_gnumeric.cpp -+index 1873c0e..c29bef9 100644 -+--- a/src/liborcus/orcus_gnumeric.cpp -++++ b/src/liborcus/orcus_gnumeric.cpp -+@@ -82,7 +82,7 @@ void orcus_gnumeric::read_content_xml(const char* p, size_t size) -+ { -+ xml_stream_parser parser(get_config(), mp_impl->m_ns_repo, gnumeric_tokens, p, size); -+ -+- auto handler = make_unique( -++ auto handler = orcus::make_unique( -+ mp_impl->m_cxt, gnumeric_tokens, mp_impl->mp_factory); -+ -+ parser.set_handler(handler.get()); -+diff --git a/src/liborcus/orcus_import_ods.cpp b/src/liborcus/orcus_import_ods.cpp -+index af1135e..2d76dbb 100644 -+--- a/src/liborcus/orcus_import_ods.cpp -++++ b/src/liborcus/orcus_import_ods.cpp -+@@ -32,7 +32,7 @@ void import_ods::read_styles(const char* p, size_t n, spreadsheet::iface::import -+ -+ session_context cxt; -+ odf_styles_map_type styles_map; -+- auto context = make_unique(cxt, odf_tokens, styles_map, styles); -++ auto context = orcus::make_unique(cxt, odf_tokens, styles_map, styles); -+ -+ xml_simple_stream_handler stream_handler(context.release()); -+ -+diff --git a/src/liborcus/orcus_import_xlsx.cpp b/src/liborcus/orcus_import_xlsx.cpp -+index 2f9f172..0d4a933 100644 -+--- a/src/liborcus/orcus_import_xlsx.cpp -++++ b/src/liborcus/orcus_import_xlsx.cpp -+@@ -33,7 +33,7 @@ void import_xlsx::read_table(const char* p, size_t n, spreadsheet::iface::import -+ return; -+ -+ session_context cxt; -+- auto handler = make_unique(cxt, ooxml_tokens, *table); -++ auto handler = orcus::make_unique(cxt, ooxml_tokens, *table); -+ -+ xmlns_repository ns_repo; -+ ns_repo.add_predefined_values(NS_ooxml_all); -+diff --git a/src/liborcus/orcus_xls_xml.cpp b/src/liborcus/orcus_xls_xml.cpp -+index 2849219..22ffeab 100644 -+--- a/src/liborcus/orcus_xls_xml.cpp -++++ b/src/liborcus/orcus_xls_xml.cpp -+@@ -92,7 +92,7 @@ void orcus_xls_xml::read_stream(const char* content, size_t len) -+ xml_stream_parser parser( -+ get_config(), mp_impl->m_ns_repo, xls_xml_tokens, content, len); -+ -+- auto handler = make_unique( -++ auto handler = orcus::make_unique( -+ mp_impl->m_cxt, xls_xml_tokens, mp_impl->mp_factory); -+ -+ parser.set_handler(handler.get()); -+diff --git a/src/liborcus/orcus_xlsx.cpp b/src/liborcus/orcus_xlsx.cpp -+index 8c578e6..7c1e46c 100644 -+--- a/src/liborcus/orcus_xlsx.cpp -++++ b/src/liborcus/orcus_xlsx.cpp -+@@ -286,7 +286,7 @@ void orcus_xlsx::read_workbook(const string& dir_path, const string& file_name) -+ if (buffer.empty()) -+ return; -+ -+- auto handler = make_unique( -++ auto handler = orcus::make_unique( -+ new xlsx_workbook_context(mp_impl->m_cxt, ooxml_tokens)); -+ -+ xml_stream_parser parser( -+@@ -341,7 +341,7 @@ void orcus_xlsx::read_sheet(const string& dir_path, const string& file_name, xls -+ get_config(), mp_impl->m_ns_repo, ooxml_tokens, -+ reinterpret_cast(&buffer[0]), buffer.size()); -+ -+- auto handler = make_unique( -++ auto handler = orcus::make_unique( -+ mp_impl->m_cxt, ooxml_tokens, data->id-1, sheet); -+ -+ parser.set_handler(handler.get()); -+@@ -373,7 +373,7 @@ void orcus_xlsx::read_shared_strings(const string& dir_path, const string& file_ -+ get_config(), mp_impl->m_ns_repo, ooxml_tokens, -+ reinterpret_cast(&buffer[0]), buffer.size()); -+ -+- auto handler = make_unique( -++ auto handler = orcus::make_unique( -+ new xlsx_shared_strings_context( -+ mp_impl->m_cxt, ooxml_tokens, mp_impl->mp_factory->get_shared_strings())); -+ -+@@ -406,7 +406,7 @@ void orcus_xlsx::read_styles(const string& dir_path, const string& file_name) -+ get_config(), mp_impl->m_ns_repo, ooxml_tokens, -+ reinterpret_cast(&buffer[0]), buffer.size()); -+ -+- auto handler = make_unique( -++ auto handler = orcus::make_unique( -+ new xlsx_styles_context( -+ mp_impl->m_cxt, ooxml_tokens, mp_impl->mp_factory->get_styles())); -+ -+@@ -441,7 +441,7 @@ void orcus_xlsx::read_table(const std::string& dir_path, const std::string& file -+ if (buffer.empty()) -+ return; -+ -+- auto handler = make_unique(mp_impl->m_cxt, ooxml_tokens, *table); -++ auto handler = orcus::make_unique(mp_impl->m_cxt, ooxml_tokens, *table); -+ -+ xml_stream_parser parser( -+ get_config(), mp_impl->m_ns_repo, ooxml_tokens, -+@@ -471,7 +471,7 @@ void orcus_xlsx::read_pivot_cache_def(const std::string& dir_path, const std::st -+ if (buffer.empty()) -+ return; -+ -+- auto handler = make_unique(mp_impl->m_cxt, ooxml_tokens); -++ auto handler = orcus::make_unique(mp_impl->m_cxt, ooxml_tokens); -+ -+ xml_stream_parser parser( -+ get_config(), mp_impl->m_ns_repo, ooxml_tokens, -+@@ -502,7 +502,7 @@ void orcus_xlsx::read_pivot_cache_rec(const std::string& dir_path, const std::st -+ if (buffer.empty()) -+ return; -+ -+- auto handler = make_unique(mp_impl->m_cxt, ooxml_tokens); -++ auto handler = orcus::make_unique(mp_impl->m_cxt, ooxml_tokens); -+ -+ xml_stream_parser parser( -+ get_config(), mp_impl->m_ns_repo, ooxml_tokens, -+@@ -532,7 +532,7 @@ void orcus_xlsx::read_pivot_table(const std::string& dir_path, const std::string -+ if (buffer.empty()) -+ return; -+ -+- auto handler = make_unique(mp_impl->m_cxt, ooxml_tokens); -++ auto handler = orcus::make_unique(mp_impl->m_cxt, ooxml_tokens); -+ -+ xml_stream_parser parser( -+ get_config(), mp_impl->m_ns_repo, ooxml_tokens, -+@@ -567,7 +567,7 @@ void orcus_xlsx::read_rev_headers(const std::string& dir_path, const std::string -+ get_config(), mp_impl->m_ns_repo, ooxml_tokens, -+ reinterpret_cast(&buffer[0]), buffer.size()); -+ -+- auto handler = make_unique( -++ auto handler = orcus::make_unique( -+ new xlsx_revheaders_context(mp_impl->m_cxt, ooxml_tokens)); -+ -+ parser.set_handler(handler.get()); -+@@ -600,7 +600,7 @@ void orcus_xlsx::read_rev_log(const std::string& dir_path, const std::string& fi -+ get_config(), mp_impl->m_ns_repo, ooxml_tokens, -+ reinterpret_cast(&buffer[0]), buffer.size()); -+ -+- auto handler = make_unique( -++ auto handler = orcus::make_unique( -+ new xlsx_revlog_context(mp_impl->m_cxt, ooxml_tokens)); -+ -+ parser.set_handler(handler.get()); -+diff --git a/src/liborcus/orcus_xml.cpp b/src/liborcus/orcus_xml.cpp -+index 2cb7fa3..f97c4f9 100644 -+--- a/src/liborcus/orcus_xml.cpp -++++ b/src/liborcus/orcus_xml.cpp -+@@ -343,7 +343,7 @@ void write_range_reference_group( -+ scopes_type scopes; -+ for (spreadsheet::row_t current_row = 0; current_row < ref.row_size; ++current_row) -+ { -+- scopes.push_back(make_unique(root)); // root element -++ scopes.push_back(orcus::make_unique(root)); // root element -+ -+ while (!scopes.empty()) -+ { -+@@ -378,7 +378,7 @@ void write_range_reference_group( -+ // This is a non-leaf element. Push a new scope with this -+ // element and re-start the loop. -+ ++cur_scope.current_child_pos; -+- scopes.push_back(make_unique(child_elem)); -++ scopes.push_back(orcus::make_unique(child_elem)); -+ new_scope = true; -+ break; -+ } -+diff --git a/src/liborcus/xlsx_sheet_context.cpp b/src/liborcus/xlsx_sheet_context.cpp -+index f350049..720319a 100644 -+--- a/src/liborcus/xlsx_sheet_context.cpp -++++ b/src/liborcus/xlsx_sheet_context.cpp -+@@ -547,7 +547,7 @@ void xlsx_sheet_context::end_element_cell() -+ { -+ // shared formula expression -+ session_data.m_shared_formulas.push_back( -+- make_unique( -++ orcus::make_unique( -+ m_sheet_id, m_cur_row, m_cur_col, m_cur_formula.shared_id, -+ m_cur_formula.str.str(), m_cur_formula.ref.str())); -+ } -+@@ -555,14 +555,14 @@ void xlsx_sheet_context::end_element_cell() -+ { -+ // array formula expression -+ session_data.m_formulas.push_back( -+- make_unique( -++ orcus::make_unique( -+ m_sheet_id, m_cur_row, m_cur_col, m_cur_formula.str.str(), m_cur_formula.ref.str())); -+ } -+ else -+ { -+ // normal (non-shared) formula expression -+ session_data.m_formulas.push_back( -+- make_unique( -++ orcus::make_unique( -+ m_sheet_id, m_cur_row, m_cur_col, m_cur_formula.str.str())); -+ } -+ } -+@@ -570,7 +570,7 @@ void xlsx_sheet_context::end_element_cell() -+ { -+ // shared formula without formula expression -+ session_data.m_shared_formulas.push_back( -+- make_unique( -++ orcus::make_unique( -+ m_sheet_id, m_cur_row, m_cur_col, m_cur_formula.shared_id)); -+ } -+ else if (m_cur_formula.type == spreadsheet::formula_t::data_table) -+diff --git a/src/liborcus/xml_map_tree.cpp b/src/liborcus/xml_map_tree.cpp -+index 132ccb9..69fbc75 100644 -+--- a/src/liborcus/xml_map_tree.cpp -++++ b/src/liborcus/xml_map_tree.cpp -+@@ -666,7 +666,7 @@ xml_map_tree::linkable* xml_map_tree::get_element_stack( -+ { -+ // Insert a new element of this name. -+ children.push_back( -+- make_unique( -++ orcus::make_unique( -+ token.ns, m_names.intern(token.name.get(), token.name.size()).first, -+ element_unlinked, reference_unknown)); -+ cur_element = children.back().get(); -+@@ -695,7 +695,7 @@ xml_map_tree::linkable* xml_map_tree::get_element_stack( -+ throw xpath_error("This attribute is already linked. You can't link the same attribute twice."); -+ -+ attrs.push_back( -+- make_unique( -++ orcus::make_unique( -+ token.ns, m_names.intern(token.name.get(), token.name.size()).first, ref_type)); -+ -+ ret = attrs.back().get(); -+@@ -710,7 +710,7 @@ xml_map_tree::linkable* xml_map_tree::get_element_stack( -+ { -+ // No element of that name exists. -+ children.push_back( -+- make_unique( -++ orcus::make_unique( -+ token.ns, m_names.intern(token.name.get(), token.name.size()).first, -+ element_linked, ref_type)); -+ -+diff --git a/src/liborcus/xml_structure_tree.cpp b/src/liborcus/xml_structure_tree.cpp -+index f2d62bd..3a08c64 100644 -+--- a/src/liborcus/xml_structure_tree.cpp -++++ b/src/liborcus/xml_structure_tree.cpp -+@@ -451,7 +451,7 @@ void xml_structure_tree::dump_compact(ostream& os) const -+ cxt.dump(os); -+ -+ element_ref ref(mp_impl->mp_root->name, &mp_impl->mp_root->prop); -+- scopes.push_back(make_unique(entity_name(), false, ref)); -++ scopes.push_back(orcus::make_unique(entity_name(), false, ref)); -+ while (!scopes.empty()) -+ { -+ bool new_scope = false; -+@@ -505,7 +505,7 @@ void xml_structure_tree::dump_compact(ostream& os) const -+ -+ // Push a new scope, and restart the loop with the new scope. -+ ++cur_scope.current_pos; -+- scopes.push_back(make_unique(this_elem.name, this_elem.prop->repeat)); -++ scopes.push_back(orcus::make_unique(this_elem.name, this_elem.prop->repeat)); -+ scope& child_scope = *scopes.back(); -+ child_scope.elements.swap(elems); -+ child_scope.current_pos = child_scope.elements.begin(); -+diff --git a/src/liborcus/yaml_document_tree.cpp b/src/liborcus/yaml_document_tree.cpp -+index b7cc4bc..5aad4f2 100644 -+--- a/src/liborcus/yaml_document_tree.cpp -++++ b/src/liborcus/yaml_document_tree.cpp -+@@ -254,13 +254,13 @@ public: -+ -+ if (m_root) -+ { -+- yaml_value* yv = push_value(make_unique()); -++ yaml_value* yv = push_value(orcus::make_unique()); -+ assert(yv && yv->type == node_t::sequence); -+ m_stack.push_back(parser_stack(yv)); -+ } -+ else -+ { -+- m_root = make_unique(); -++ m_root = orcus::make_unique(); -+ m_stack.push_back(parser_stack(m_root.get())); -+ } -+ } -+@@ -276,13 +276,13 @@ public: -+ assert(m_in_document); -+ if (m_root) -+ { -+- yaml_value* yv = push_value(make_unique()); -++ yaml_value* yv = push_value(orcus::make_unique()); -+ assert(yv && yv->type == node_t::map); -+ m_stack.push_back(parser_stack(yv)); -+ } -+ else -+ { -+- m_root = make_unique(); -++ m_root = orcus::make_unique(); -+ m_stack.push_back(parser_stack(m_root.get())); -+ } -+ } -+@@ -319,11 +319,11 @@ public: -+ -+ if (m_root) -+ { -+- yaml_value* yv = push_value(make_unique(p, n)); -++ yaml_value* yv = push_value(orcus::make_unique(p, n)); -+ assert(yv && yv->type == node_t::string); -+ } -+ else -+- m_root = make_unique(p, n); -++ m_root = orcus::make_unique(p, n); -+ } -+ -+ void number(double val) -+@@ -331,11 +331,11 @@ public: -+ assert(m_in_document); -+ if (m_root) -+ { -+- yaml_value* yv = push_value(make_unique(val)); -++ yaml_value* yv = push_value(orcus::make_unique(val)); -+ assert(yv && yv->type == node_t::number); -+ } -+ else -+- m_root = make_unique(val); -++ m_root = orcus::make_unique(val); -+ } -+ -+ void boolean_true() -+@@ -343,11 +343,11 @@ public: -+ assert(m_in_document); -+ if (m_root) -+ { -+- yaml_value* yv = push_value(make_unique(node_t::boolean_true)); -++ yaml_value* yv = push_value(orcus::make_unique(node_t::boolean_true)); -+ assert(yv && yv->type == node_t::boolean_true); -+ } -+ else -+- m_root = make_unique(node_t::boolean_true); -++ m_root = orcus::make_unique(node_t::boolean_true); -+ } -+ -+ void boolean_false() -+@@ -355,11 +355,11 @@ public: -+ assert(m_in_document); -+ if (m_root) -+ { -+- yaml_value* yv = push_value(make_unique(node_t::boolean_false)); -++ yaml_value* yv = push_value(orcus::make_unique(node_t::boolean_false)); -+ assert(yv && yv->type == node_t::boolean_false); -+ } -+ else -+- m_root = make_unique(node_t::boolean_false); -++ m_root = orcus::make_unique(node_t::boolean_false); -+ } -+ -+ void null() -+@@ -367,11 +367,11 @@ public: -+ assert(m_in_document); -+ if (m_root) -+ { -+- yaml_value* yv = push_value(make_unique(node_t::null)); -++ yaml_value* yv = push_value(orcus::make_unique(node_t::null)); -+ assert(yv && yv->type == node_t::null); -+ } -+ else -+- m_root = make_unique(node_t::null); -++ m_root = orcus::make_unique(node_t::null); -+ } -+ -+ void swap(std::vector& docs) -+@@ -396,8 +396,8 @@ struct node::impl -+ impl(const yaml_value* yv) : m_node(yv) {} -+ }; -+ -+-node::node(const yaml_value* yv) : mp_impl(make_unique(yv)) {} -+-node::node(const node& other) : mp_impl(make_unique(other.mp_impl->m_node)) {} -++node::node(const yaml_value* yv) : mp_impl(orcus::make_unique(yv)) {} -++node::node(const node& other) : mp_impl(orcus::make_unique(other.mp_impl->m_node)) {} -+ node::node(node&& rhs) : mp_impl(std::move(rhs.mp_impl)) {} -+ node::~node() {} -+ -+@@ -548,7 +548,7 @@ double node::numeric_value() const -+ -+ }} -+ -+-yaml_document_tree::yaml_document_tree() : mp_impl(make_unique()) {} -++yaml_document_tree::yaml_document_tree() : mp_impl(orcus::make_unique()) {} -+ yaml_document_tree::~yaml_document_tree() {} -+ -+ void yaml_document_tree::load(const std::string& strm) -+diff --git a/src/mso/encryption_info.cpp b/src/mso/encryption_info.cpp -+index 1d428fc..e9bc3ad 100644 -+--- a/src/mso/encryption_info.cpp -++++ b/src/mso/encryption_info.cpp -+@@ -143,11 +143,10 @@ public: -+ -+ class sax_handler -+ { -+- xmlns_context& m_ns_cxt; -+ vector m_attrs; -+ -+ public: -+- sax_handler(xmlns_context& ns_cxt) : m_ns_cxt(ns_cxt) {} -++ sax_handler(xmlns_context& /*ns_cxt*/) {} -+ void doctype(const sax::doctype_declaration&) {} -+ void start_declaration(const pstring&) {} -+ void end_declaration(const pstring&) {} -+diff --git a/src/orcus_filter_global.cpp b/src/orcus_filter_global.cpp -+index 09c2ab6..df50496 100644 -+--- a/src/orcus_filter_global.cpp -++++ b/src/orcus_filter_global.cpp -+@@ -239,7 +239,7 @@ std::unique_ptr parse_json_args(int argc, char** argv) -+ return nullptr; -+ } -+ -+- std::unique_ptr config = make_unique(); -++ std::unique_ptr config = orcus::make_unique(); -+ -+ if (vm.count("input")) -+ config->input_path = vm["input"].as(); -+diff --git a/src/orcus_json_main.cpp b/src/orcus_json_main.cpp -+index edca63a..6a739b2 100644 -+--- a/src/orcus_json_main.cpp -++++ b/src/orcus_json_main.cpp -+@@ -25,7 +25,7 @@ using namespace orcus; -+ -+ std::unique_ptr load_doc(const std::string& strm, const json_config& config) -+ { -+- std::unique_ptr doc(make_unique()); -++ std::unique_ptr doc(orcus::make_unique()); -+ try -+ { -+ doc->load(strm, config); -+diff --git a/src/orcus_yaml_main.cpp b/src/orcus_yaml_main.cpp -+index 3d15742..c028f64 100644 -+--- a/src/orcus_yaml_main.cpp -++++ b/src/orcus_yaml_main.cpp -+@@ -76,7 +76,7 @@ std::unique_ptr parse_yaml_args(int argc, char** argv) -+ return nullptr; -+ } -+ -+- std::unique_ptr config = make_unique(); -++ std::unique_ptr config = orcus::make_unique(); -+ -+ if (vm.count("input")) -+ config->input_path = vm["input"].as(); -+diff --git a/src/parser/json_parser_base.cpp b/src/parser/json_parser_base.cpp -+index 50e3f36..eff27b7 100644 -+--- a/src/parser/json_parser_base.cpp -++++ b/src/parser/json_parser_base.cpp -+@@ -35,7 +35,7 @@ struct parser_base::impl -+ }; -+ -+ parser_base::parser_base(const char* p, size_t n) : -+- ::orcus::parser_base(p, n), mp_impl(make_unique()) {} -++ ::orcus::parser_base(p, n), mp_impl(orcus::make_unique()) {} -+ -+ parser_base::~parser_base() {} -+ -+diff --git a/src/parser/sax_parser_base.cpp b/src/parser/sax_parser_base.cpp -+index 51d56a4..3cd4f25 100644 -+--- a/src/parser/sax_parser_base.cpp -++++ b/src/parser/sax_parser_base.cpp -+@@ -57,7 +57,7 @@ struct parser_base::impl -+ -+ parser_base::parser_base(const char* content, size_t size) : -+ ::orcus::parser_base(content, size), -+- mp_impl(make_unique()), -++ mp_impl(orcus::make_unique()), -+ m_nest_level(0), -+ m_buffer_pos(0), -+ m_root_elem_open(true) -+diff --git a/src/parser/string_pool.cpp b/src/parser/string_pool.cpp -+index 83c0501..baba88a 100644 -+--- a/src/parser/string_pool.cpp -++++ b/src/parser/string_pool.cpp -+@@ -61,7 +61,7 @@ struct string_pool::impl -+ string_store_type m_store; -+ }; -+ -+-string_pool::string_pool() : mp_impl(make_unique()) {} -++string_pool::string_pool() : mp_impl(orcus::make_unique()) {} -+ -+ string_pool::~string_pool() -+ { -+@@ -82,7 +82,7 @@ pair string_pool::intern(const char* str, size_t n) -+ if (itr == mp_impl->m_set.end()) -+ { -+ // This string has not been interned. Intern it. -+- mp_impl->m_store.push_back(make_unique(str, n)); -++ mp_impl->m_store.push_back(orcus::make_unique(str, n)); -+ pair r = mp_impl->m_set.insert(pstring(mp_impl->m_store.back()->data(), n)); -+ if (!r.second) -+ throw general_error("failed to intern a new string instance."); -+diff --git a/src/parser/yaml_parser_base.cpp b/src/parser/yaml_parser_base.cpp -+index 656dfdc..3c93266 100644 -+--- a/src/parser/yaml_parser_base.cpp -++++ b/src/parser/yaml_parser_base.cpp -+@@ -59,7 +59,7 @@ const size_t parser_base::parse_indent_end_of_stream = std::numeric_limits::max() - 2; -+ -+ parser_base::parser_base(const char* p, size_t n) : -+- ::orcus::parser_base(p, n), mp_impl(make_unique()) {} -++ ::orcus::parser_base(p, n), mp_impl(orcus::make_unique()) {} -+ -+ parser_base::~parser_base() {} -+ -+diff --git a/src/spreadsheet/document.cpp b/src/spreadsheet/document.cpp -+index a80646c..17cc113 100644 -+--- a/src/spreadsheet/document.cpp -++++ b/src/spreadsheet/document.cpp -+@@ -448,7 +448,7 @@ sheet* document::append_sheet(const pstring& sheet_name, row_t row_size, col_t c -+ sheet_t sheet_index = static_cast(mp_impl->m_sheets.size()); -+ -+ mp_impl->m_sheets.push_back( -+- make_unique( -++ orcus::make_unique( -+ *this, sheet_name_safe, sheet_index, row_size, col_size)); -+ -+ mp_impl->m_context.append_sheet( -+-- -+2.4.5 -+ -diff --git a/external/liborcus/0001-Get-it-to-build-on-Windows.patch b/external/liborcus/0001-Get-it-to-build-on-Windows.patch -new file mode 100755 -index 0000000..dca91b3 ---- /dev/null -+++ b/external/liborcus/0001-Get-it-to-build-on-Windows.patch -@@ -0,0 +1,212 @@ -+From c5d7282214727bcc28b6ec7e2b8016b40872cd3b Mon Sep 17 00:00:00 2001 -+From: Kohei Yoshida -+Date: Mon, 7 Mar 2016 18:35:23 -0500 -+Subject: [PATCH] Get it to build on Windows. -+ -+--- -+ include/orcus/json_parser.hpp | 32 +++++++++++++------------------- -+ include/orcus/parser_global.hpp | 4 ++-- -+ src/liborcus/json_document_tree.cpp | 2 +- -+ src/liborcus/json_util.cpp | 4 ++-- -+ src/liborcus/yaml_document_tree.cpp | 4 +++- -+ src/parser/parser_global.cpp | 3 +++ -+ src/parser/pstring.cpp | 1 + -+ src/parser/stream.cpp | 4 ++-- -+ src/parser/yaml_parser_base.cpp | 17 ++++++----------- -+ 9 files changed, 33 insertions(+), 38 deletions(-) -+ -+diff --git a/include/orcus/json_parser.hpp b/include/orcus/json_parser.hpp -+index 5d733fb..183b831 100644 -+--- a/include/orcus/json_parser.hpp -++++ b/include/orcus/json_parser.hpp -+@@ -204,16 +204,13 @@ void json_parser<_Handler>::object() -+ if (!res.str) -+ { -+ // Parsing was unsuccessful. -+- switch (res.length) -+- { -+- case parse_quoted_string_state::error_no_closing_quote: -+- throw json::parse_error("object: stream ended prematurely before reaching the closing quote of a key.", offset()); -+- case parse_quoted_string_state::error_illegal_escape_char: -+- json::parse_error::throw_with( -+- "object: illegal escape character '", cur_char(), "' in key value.", offset()); -+- default: -+- throw json::parse_error("object: unknown error while parsing a key value.", offset()); -+- } -++ if (res.length == parse_quoted_string_state::error_no_closing_quote) -++ throw json::parse_error("object: stream ended prematurely before reaching the closing quote of a key.", offset()); -++ else if (res.length == parse_quoted_string_state::error_illegal_escape_char) -++ json::parse_error::throw_with( -++ "object: illegal escape character '", cur_char(), "' in key value.", offset()); -++ else -++ throw json::parse_error("object: unknown error while parsing a key value.", offset()); -+ } -+ -+ m_handler.object_key(res.str, res.length, res.transient); -+@@ -297,15 +294,12 @@ void json_parser<_Handler>::string() -+ } -+ -+ // Parsing was unsuccessful. -+- switch (res.length) -+- { -+- case parse_quoted_string_state::error_no_closing_quote: -+- throw json::parse_error("string: stream ended prematurely before reaching the closing quote.", offset()); -+- case parse_quoted_string_state::error_illegal_escape_char: -+- json::parse_error::throw_with("string: illegal escape character '", cur_char(), "'.", offset()); -+- default: -+- throw json::parse_error("string: unknown error.", offset()); -+- } -++ if (res.length == parse_quoted_string_state::error_no_closing_quote) -++ throw json::parse_error("string: stream ended prematurely before reaching the closing quote.", offset()); -++ else if (res.length == parse_quoted_string_state::error_illegal_escape_char) -++ json::parse_error::throw_with("string: illegal escape character '", cur_char(), "'.", offset()); -++ else -++ throw json::parse_error("string: unknown error.", offset()); -+ } -+ -+ } -+diff --git a/include/orcus/parser_global.hpp b/include/orcus/parser_global.hpp -+index 6fab254..b76aec4 100644 -+--- a/include/orcus/parser_global.hpp -++++ b/include/orcus/parser_global.hpp -+@@ -31,8 +31,8 @@ enum class string_escape_char_t -+ */ -+ struct parse_quoted_string_state -+ { -+- static constexpr size_t error_no_closing_quote = 1; -+- static constexpr size_t error_illegal_escape_char = 2; -++ ORCUS_PSR_DLLPUBLIC static const size_t error_no_closing_quote; -++ ORCUS_PSR_DLLPUBLIC static const size_t error_illegal_escape_char; -+ -+ const char* str; -+ size_t length; -+diff --git a/src/liborcus/json_document_tree.cpp b/src/liborcus/json_document_tree.cpp -+index 81289e1..2fb8a41 100644 -+--- a/src/liborcus/json_document_tree.cpp -++++ b/src/liborcus/json_document_tree.cpp -+@@ -54,7 +54,7 @@ using json_value = json::detail::json_value; -+ using node_t = json::detail::node_t; -+ -+ const char* tab = " "; -+-constexpr char quote = '"'; -++const char quote = '"'; -+ -+ const xmlns_id_t NS_orcus_json_xml = "http://schemas.kohei.us/orcus/2015/json"; -+ -+diff --git a/src/liborcus/json_util.cpp b/src/liborcus/json_util.cpp -+index 37bd2b0..8f593cd 100644 -+--- a/src/liborcus/json_util.cpp -++++ b/src/liborcus/json_util.cpp -+@@ -11,8 +11,8 @@ namespace orcus { namespace json { -+ -+ namespace { -+ -+-constexpr char quote = '"'; -+-constexpr char backslash = '\\'; -++const char quote = '"'; -++const char backslash = '\\'; -+ -+ } -+ -+diff --git a/src/liborcus/yaml_document_tree.cpp b/src/liborcus/yaml_document_tree.cpp -+index 5aad4f2..27bb7e8 100644 -+--- a/src/liborcus/yaml_document_tree.cpp -++++ b/src/liborcus/yaml_document_tree.cpp -+@@ -155,6 +155,8 @@ struct parser_stack -+ yaml_value* node; -+ -+ parser_stack(yaml_value* _node) : node(_node) {} -++ parser_stack(const parser_stack&) = delete; -++ parser_stack(parser_stack&& r) : key(std::move(r.key)), node(r.node) {} -+ }; -+ -+ typedef std::unique_ptr document_root_type; -+@@ -577,7 +579,7 @@ const char* kw_false = "false"; -+ const char* kw_tilde = "~"; -+ const char* kw_null = "null"; -+ -+-constexpr char quote = '"'; -++const char quote = '"'; -+ -+ void dump_indent(std::ostringstream& os, size_t scope) -+ { -+diff --git a/src/parser/parser_global.cpp b/src/parser/parser_global.cpp -+index 6e6b656..4023689 100644 -+--- a/src/parser/parser_global.cpp -++++ b/src/parser/parser_global.cpp -+@@ -12,6 +12,9 @@ -+ -+ namespace orcus { -+ -++const size_t parse_quoted_string_state::error_no_closing_quote = 1; -++const size_t parse_quoted_string_state::error_illegal_escape_char = 2; -++ -+ bool is_blank(char c) -+ { -+ return is_in(c, " \t\n\r"); -+diff --git a/src/parser/pstring.cpp b/src/parser/pstring.cpp -+index 303e88e..50ab2ca 100644 -+--- a/src/parser/pstring.cpp -++++ b/src/parser/pstring.cpp -+@@ -12,6 +12,7 @@ -+ #include -+ #include -+ #include -++#include -+ -+ using namespace std; -+ -+diff --git a/src/parser/stream.cpp b/src/parser/stream.cpp -+index 00a24a0..eb73dcc 100644 -+--- a/src/parser/stream.cpp -++++ b/src/parser/stream.cpp -+@@ -85,7 +85,7 @@ std::string create_parse_error_output(const std::string& strm, std::ptrdiff_t of -+ if (offset < 0) -+ return std::string(); -+ -+- constexpr size_t max_line_length = 60; -++ const size_t max_line_length = 60; -+ -+ auto line_info = find_line_with_offset(strm, offset); -+ pstring line = std::get<0>(line_info); -+@@ -113,7 +113,7 @@ std::string create_parse_error_output(const std::string& strm, std::ptrdiff_t of -+ // The error line is too long. Only show a segment of the line where the -+ // error occurred. -+ -+- constexpr size_t fixed_offset = 20; -++ const size_t fixed_offset = 20; -+ -+ size_t line_start = offset_on_line - fixed_offset; -+ size_t line_end = line_start + max_line_length; -+diff --git a/src/parser/yaml_parser_base.cpp b/src/parser/yaml_parser_base.cpp -+index 3c93266..c6e7939 100644 -+--- a/src/parser/yaml_parser_base.cpp -++++ b/src/parser/yaml_parser_base.cpp -+@@ -289,18 +289,13 @@ void throw_quoted_string_parse_error(const char* func_name, const parse_quoted_s -+ { -+ std::ostringstream os; -+ os << func_name << ": failed to parse "; -+- switch (ret.length) -+- { -+- case parse_quoted_string_state::error_illegal_escape_char: -+- os << "due to the presence of illegal escape character."; -+- break; -+- case parse_quoted_string_state::error_no_closing_quote: -+- os << "because the closing quote was not found."; -+- break; -+- default: -+- os << "due to unknown reason."; -++ if (ret.length == parse_quoted_string_state::error_illegal_escape_char) -++ os << "due to the presence of illegal escape character."; -++ else if (ret.length == parse_quoted_string_state::error_no_closing_quote) -++ os << "because the closing quote was not found."; -++ else -++ os << "due to unknown reason."; -+ -+- } -+ throw parse_error(os.str()); -+ } -+ -+-- -+1.8.1.msysgit.1 -+ -diff --git a/external/liborcus/ExternalPackage_liborcus.mk b/external/liborcus/ExternalPackage_liborcus.mk -index 4411592..56debe9 100644 ---- a/external/liborcus/ExternalPackage_liborcus.mk -+++ b/external/liborcus/ExternalPackage_liborcus.mk -@@ -12,11 +12,11 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,liborcus,liborcus)) - $(eval $(call gb_ExternalPackage_use_external_project,liborcus,liborcus)) - - ifeq ($(OS),MACOSX) --$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.10.0.dylib,src/liborcus/.libs/liborcus-0.10.0.dylib)) --$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.10.0.dylib,src/parser/.libs/liborcus-parser-0.10.0.dylib)) -+$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.11.0.dylib,src/liborcus/.libs/liborcus-0.11.0.dylib)) -+$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.11.0.dylib,src/parser/.libs/liborcus-parser-0.11.0.dylib)) - else ifeq ($(DISABLE_DYNLOADING),) --$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.10.so.0,src/liborcus/.libs/liborcus-0.10.so.0.0.0)) --$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.10.so.0,src/parser/.libs/liborcus-parser-0.10.so.0.0.0)) -+$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-0.11.so.0,src/liborcus/.libs/liborcus-0.11.so.0.0.0)) -+$(eval $(call gb_ExternalPackage_add_file,liborcus,$(LIBO_LIB_FOLDER)/liborcus-parser-0.11.so.0,src/parser/.libs/liborcus-parser-0.11.so.0.0.0)) - endif - - # vim: set noet sw=4 ts=4: -diff --git a/external/liborcus/ExternalProject_liborcus.mk b/external/liborcus/ExternalProject_liborcus.mk -index 7eb8fdb..580ef847 100644 ---- a/external/liborcus/ExternalProject_liborcus.mk -+++ b/external/liborcus/ExternalProject_liborcus.mk -@@ -13,6 +13,7 @@ $(eval $(call gb_ExternalProject_use_autoconf,liborcus,build)) - - $(eval $(call gb_ExternalProject_use_externals,liborcus, \ - boost_headers \ -+ boost_filesystem \ - boost_iostreams \ - boost_system \ - mdds_headers \ -@@ -38,9 +39,9 @@ ifneq ($(SYSTEM_ZLIB),) - liborcus_LIBS+=-lz - endif - ifneq ($(SYSTEM_BOOST),) --liborcus_LIBS+=$(BOOST_SYSTEM_LIB) $(BOOST_IOSTREAMS_LIB) -+liborcus_LIBS+=$(BOOST_SYSTEM_LIB) $(BOOST_IOSTREAMS_LIB) $(BOOST_FILESYSTEM_LIB) - else --liborcus_LIBS+=-L$(gb_StaticLibrary_WORKDIR) -lboost_system -lboost_iostreams -+liborcus_LIBS+=-L$(gb_StaticLibrary_WORKDIR) -lboost_system -lboost_iostreams -lboost_filesystem - endif - ifeq ($(OS),ANDROID) - liborcus_LIBS+=-lgnustl_shared -lm -@@ -96,12 +97,13 @@ $(call gb_ExternalProject_get_state_target,liborcus,build) : - , \ - --enable-shared --disable-static \ - ) \ -- $(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \ -- --disable-spreadsheet-model \ -- --without-tools \ -- --disable-werror \ -- $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \ -- $(if $(SYSTEM_BOOST),,\ -+ $(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \ -+ --disable-spreadsheet-model \ -+ --without-tools \ -+ --disable-python \ -+ --disable-werror \ -+ $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \ -+ $(if $(SYSTEM_BOOST),,\ - --with-boost=$(WORKDIR)/UnpackedTarball/boost \ - boost_cv_lib_iostreams=yes \ - boost_cv_lib_system=yes \ -@@ -111,8 +113,8 @@ $(call gb_ExternalProject_get_state_target,liborcus,build) : - $(MAKE) \ - $(if $(filter MACOSX,$(OS)),\ - && $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \ -- $(gb_Package_SOURCEDIR_liborcus)/src/liborcus/.libs/liborcus-0.10.0.dylib \ -- $(gb_Package_SOURCEDIR_liborcus)/src/parser/.libs/liborcus-parser-0.10.0.dylib \ -+ $(gb_Package_SOURCEDIR_liborcus)/src/liborcus/.libs/liborcus-0.11.0.dylib \ -+ $(gb_Package_SOURCEDIR_liborcus)/src/parser/.libs/liborcus-parser-0.11.0.dylib \ - ) \ - ) - -diff --git a/external/liborcus/Library_orcus-parser.mk b/external/liborcus/Library_orcus-parser.mk -index c3b4eec..28af14e 100644 ---- a/external/liborcus/Library_orcus-parser.mk -+++ b/external/liborcus/Library_orcus-parser.mk -@@ -39,6 +39,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus-parser,\ - UnpackedTarball/liborcus/src/parser/css_types \ - UnpackedTarball/liborcus/src/parser/csv_parser_base \ - UnpackedTarball/liborcus/src/parser/exception \ -+ UnpackedTarball/liborcus/src/parser/json_parser_base \ -+ UnpackedTarball/liborcus/src/parser/parser_base \ - UnpackedTarball/liborcus/src/parser/parser_global \ - UnpackedTarball/liborcus/src/parser/pstring \ - UnpackedTarball/liborcus/src/parser/sax_parser_base \ -@@ -48,6 +50,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus-parser,\ - UnpackedTarball/liborcus/src/parser/tokens \ - UnpackedTarball/liborcus/src/parser/types \ - UnpackedTarball/liborcus/src/parser/xml_namespace \ -+ UnpackedTarball/liborcus/src/parser/yaml_parser_base \ - UnpackedTarball/liborcus/src/parser/zip_archive \ - UnpackedTarball/liborcus/src/parser/zip_archive_stream \ - )) -diff --git a/external/liborcus/Library_orcus.mk b/external/liborcus/Library_orcus.mk -index ae98d5e..96169f1 100644 ---- a/external/liborcus/Library_orcus.mk -+++ b/external/liborcus/Library_orcus.mk -@@ -13,6 +13,7 @@ $(eval $(call gb_Library_use_unpacked,orcus,liborcus)) - - $(eval $(call gb_Library_use_externals,orcus,\ - boost_headers \ -+ boost_filesystem \ - boost_iostreams \ - boost_system \ - mdds_headers \ -@@ -53,12 +54,16 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus,\ - UnpackedTarball/liborcus/src/liborcus/gnumeric_namespace_types \ - UnpackedTarball/liborcus/src/liborcus/gnumeric_sheet_context \ - UnpackedTarball/liborcus/src/liborcus/gnumeric_tokens \ -+ UnpackedTarball/liborcus/src/liborcus/info \ - UnpackedTarball/liborcus/src/liborcus/interface \ -+ UnpackedTarball/liborcus/src/liborcus/json_document_tree \ -+ UnpackedTarball/liborcus/src/liborcus/json_util \ - UnpackedTarball/liborcus/src/liborcus/measurement \ -+ UnpackedTarball/liborcus/src/liborcus/odf_helper \ - UnpackedTarball/liborcus/src/liborcus/odf_namespace_types \ - UnpackedTarball/liborcus/src/liborcus/odf_para_context \ -- UnpackedTarball/liborcus/src/liborcus/odf_styles \ - UnpackedTarball/liborcus/src/liborcus/odf_styles_context \ -+ UnpackedTarball/liborcus/src/liborcus/odf_styles \ - UnpackedTarball/liborcus/src/liborcus/odf_tokens \ - UnpackedTarball/liborcus/src/liborcus/ods_content_xml_context \ - UnpackedTarball/liborcus/src/liborcus/ods_content_xml_handler \ -@@ -73,18 +78,26 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus,\ - UnpackedTarball/liborcus/src/liborcus/opc_reader \ - UnpackedTarball/liborcus/src/liborcus/orcus_csv \ - UnpackedTarball/liborcus/src/liborcus/orcus_gnumeric \ -+ UnpackedTarball/liborcus/src/liborcus/orcus_import_ods \ -+ UnpackedTarball/liborcus/src/liborcus/orcus_import_xlsx \ - UnpackedTarball/liborcus/src/liborcus/orcus_ods \ - UnpackedTarball/liborcus/src/liborcus/orcus_xlsx \ -+ UnpackedTarball/liborcus/src/liborcus/orcus_xls_xml \ - UnpackedTarball/liborcus/src/liborcus/orcus_xml \ - UnpackedTarball/liborcus/src/liborcus/session_context \ - UnpackedTarball/liborcus/src/liborcus/spreadsheet_interface \ - UnpackedTarball/liborcus/src/liborcus/spreadsheet_types \ -- UnpackedTarball/liborcus/src/liborcus/xls_xml_namespace_types \ -+ UnpackedTarball/liborcus/src/liborcus/string_helper \ - UnpackedTarball/liborcus/src/liborcus/xlsx_autofilter_context \ - UnpackedTarball/liborcus/src/liborcus/xlsx_conditional_format_context \ - UnpackedTarball/liborcus/src/liborcus/xlsx_context \ - UnpackedTarball/liborcus/src/liborcus/xlsx_handler \ - UnpackedTarball/liborcus/src/liborcus/xlsx_helper \ -+ UnpackedTarball/liborcus/src/liborcus/xls_xml_context \ -+ UnpackedTarball/liborcus/src/liborcus/xls_xml_detection_handler \ -+ UnpackedTarball/liborcus/src/liborcus/xls_xml_handler \ -+ UnpackedTarball/liborcus/src/liborcus/xls_xml_namespace_types \ -+ UnpackedTarball/liborcus/src/liborcus/xls_xml_tokens \ - UnpackedTarball/liborcus/src/liborcus/xlsx_pivot_context \ - UnpackedTarball/liborcus/src/liborcus/xlsx_revision_context \ - UnpackedTarball/liborcus/src/liborcus/xlsx_session_data \ -@@ -99,6 +112,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,orcus,\ - UnpackedTarball/liborcus/src/liborcus/xml_stream_handler \ - UnpackedTarball/liborcus/src/liborcus/xml_stream_parser \ - UnpackedTarball/liborcus/src/liborcus/xml_structure_tree \ -+ UnpackedTarball/liborcus/src/liborcus/yaml_document_tree \ - )) - - # vim: set noet sw=4 ts=4: -diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk -index 825fa49..0e337ef 100644 ---- a/external/liborcus/UnpackedTarball_liborcus.mk -+++ b/external/liborcus/UnpackedTarball_liborcus.mk -@@ -16,8 +16,15 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,liborcus,1)) - $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\ - external/liborcus/0001-workaround-a-linking-problem-on-windows.patch \ - external/liborcus/rpath.patch.0 \ -- external/liborcus/fix-crash-ooo55043-1.patch.0 \ -- external/liborcus/unusedheader.patch.0 \ -+ external/liborcus/0001-Fix-for-OSX-build-inside-LibreOffice.patch \ -+ external/liborcus/0001-Get-it-to-build-on-Windows.patch \ - )) - -+ifeq ($(OS),WNT) -+$(eval $(call gb_UnpackedTarball_add_patches,liborcus,\ -+ external/liborcus/windows-constants-hack.patch \ -+)) -+endif -+ -+ - # vim: set noet sw=4 ts=4: -diff --git a/external/liborcus/fix-crash-ooo55043-1.patch.0 b/external/liborcus/fix-crash-ooo55043-1.patch.0 -deleted file mode 100644 -index 58a97c0..0000000 ---- a/external/liborcus/fix-crash-ooo55043-1.patch.0 -+++ /dev/null -@@ -1,17 +0,0 @@ ----- src/parser/zip_archive_stream.cpp --+++ src/parser/zip_archive_stream.cpp --@@ -91,8 +91,13 @@ -- -- void zip_archive_stream_blob::read(unsigned char* buffer, size_t length) const -- { --+ if (!length) --+ return; -- // First, make sure we have enough blob to satisfy the requested stream length. --- size_t length_available = m_size - tell(); --+ const size_t pos = tell(); --+ if (pos > m_size) --+ throw zip_error("Stream is seeked past end. No data available"); --+ const size_t length_available = m_size - pos; -- if (length_available < length) -- throw zip_error("There is not enough stream left to fill requested length."); -- -diff --git a/external/liborcus/unusedheader.patch.0 b/external/liborcus/unusedheader.patch.0 -deleted file mode 100644 -index 4f7a77b..0000000 ---- a/external/liborcus/unusedheader.patch.0 -+++ /dev/null -@@ -1,11 +0,0 @@ ----- ./src/parser/pstring.cpp.orig 2015-12-02 14:38:44.658744408 +0000 --+++ ./src/parser/pstring.cpp 2015-12-02 14:38:50.449658497 +0000 --@@ -13,8 +13,6 @@ -- #include -- #include -- ---#include --- -- using namespace std; -- -- namespace orcus { -diff --git a/external/liborcus/windows-constants-hack.patch b/external/liborcus/windows-constants-hack.patch -new file mode 100755 -index 0000000..876bc16 ---- /dev/null -+++ b/external/liborcus/windows-constants-hack.patch -@@ -0,0 +1,15 @@ -+diff --git a/src/liborcus/info.cpp b/src/liborcus/info.cpp -+index ae571f5..539ce18 100644 -+--- a/src/liborcus/info.cpp -++++ b/src/liborcus/info.cpp -+@@ -7,7 +7,9 @@ -+ -+ #include "orcus/info.hpp" -+ -+-#include "constants.inl" -++#define ORCUS_MAJOR_VERSION 0 -++#define ORCUS_MINOR_VERSION 11 -++#define ORCUS_MICRO_VERSION 0 -+ -+ namespace orcus { -+ -diff --git a/sc/Library_scfilt.mk b/sc/Library_scfilt.mk -index 74f2ce5..b764290 100644 ---- a/sc/Library_scfilt.mk -+++ b/sc/Library_scfilt.mk -@@ -227,6 +227,7 @@ ifeq ($(ENABLE_ORCUS),TRUE) - $(eval $(call gb_Library_use_externals,scfilt,\ - orcus \ - orcus-parser \ -+ boost_filesystem \ - boost_system \ - boost_iostreams \ - zlib \ -diff --git a/sc/source/filter/inc/orcusinterface.hxx b/sc/source/filter/inc/orcusinterface.hxx -index 63b36ef..05fe4cb 100644 ---- a/sc/source/filter/inc/orcusinterface.hxx -+++ b/sc/source/filter/inc/orcusinterface.hxx -@@ -375,6 +375,7 @@ public: - - virtual void set_border_count(size_t n) override; - virtual void set_border_style(orcus::spreadsheet::border_direction_t dir, const char* s, size_t n) override; -+ virtual void set_border_style(orcus::spreadsheet::border_direction_t dir, orcus::spreadsheet::border_style_t style) override; - virtual void set_border_color(orcus::spreadsheet::border_direction_t dir, - orcus::spreadsheet::color_elem_t alpha, - orcus::spreadsheet::color_elem_t red, -@@ -425,6 +426,7 @@ public: - virtual void set_cell_style_name(const char* s, size_t n) override; - virtual void set_cell_style_xf(size_t index) override; - virtual void set_cell_style_builtin(size_t index) override; -+ virtual void set_cell_style_parent_name(const char* s, size_t n) override; - virtual size_t commit_cell_style() override; - }; - -diff --git a/sc/source/filter/orcus/filterdetect.cxx b/sc/source/filter/orcus/filterdetect.cxx -index 7dfccb9..9ae30ad 100644 ---- a/sc/source/filter/orcus/filterdetect.cxx -+++ b/sc/source/filter/orcus/filterdetect.cxx -@@ -93,7 +93,7 @@ OUString OrcusFormatDetect::detect(css::uno::Sequence - } - - orcus::format_t eFormat = orcus::detect(reinterpret_cast(aContent.getStr()), aContent.getLength()); -- if (eFormat == orcus::format_gnumeric) -+ if (eFormat == orcus::format_t::gnumeric) - return OUString("Gnumeric XML"); - - return OUString(); -diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx -index e50b8bf..496faea 100644 ---- a/sc/source/filter/orcus/interface.cxx -+++ b/sc/source/filter/orcus/interface.cxx -@@ -55,7 +55,7 @@ void ScOrcusGlobalSettings::set_default_formula_grammar(orcus::spreadsheet::form - - orcus::spreadsheet::formula_grammar_t ScOrcusGlobalSettings::get_default_formula_grammar() const - { -- return orcus::spreadsheet::formula_grammar_unknown; -+ return orcus::spreadsheet::formula_grammar_t::unknown; - } - - ScOrcusFactory::StringCellCache::StringCellCache(const ScAddress& rPos, size_t nIndex) : -@@ -231,19 +231,19 @@ double translateToInternal(double nVal, orcus::length_unit_t unit) - { - switch(unit) - { -- case orcus::length_unit_inch: -+ case orcus::length_unit_t::inch: - return nVal * 72.0 * 20.0; - break; -- case orcus::length_unit_twip: -+ case orcus::length_unit_t::twip: - return nVal; - break; -- case orcus::length_unit_point: -+ case orcus::length_unit_t::point: - return nVal * 20.0; - break; -- case orcus::length_unit_centimeter: -+ case orcus::length_unit_t::centimeter: - return nVal * 20.0 * 72.0 / 2.54; - break; -- case orcus::length_unit_unknown: -+ case orcus::length_unit_t::unknown: - SAL_WARN("sc.orcus", "unknown unit"); - break; - default: -@@ -393,18 +393,18 @@ void ScOrcusConditionalFormat::set_type(os::conditional_format_t type) - { - switch (type) - { -- case os::conditional_format_condition: -- case os::conditional_format_formula: -+ case os::conditional_format_t::condition: -+ case os::conditional_format_t::formula: - meEntryType = condformat::CONDITION; - // mpCurrentEntry.reset(new ScCondFormatEntry()); - break; -- case os::conditional_format_date: -+ case os::conditional_format_t::date: - break; -- case os::conditional_format_colorscale: -+ case os::conditional_format_t::colorscale: - break; -- case os::conditional_format_databar: -+ case os::conditional_format_t::databar: - break; -- case os::conditional_format_iconset: -+ case os::conditional_format_t::iconset: - break; - default: - SAL_INFO("sc.orcus.condformat", "unknown conditional_format_t value"); -@@ -549,17 +549,17 @@ formula::FormulaGrammar::Grammar getCalcGrammarFromOrcus( os::formula_grammar_t - formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_ODFF; - switch(grammar) - { -- case orcus::spreadsheet::formula_grammar_ods: -+ case orcus::spreadsheet::formula_grammar_t::ods: - eGrammar = formula::FormulaGrammar::GRAM_ODFF; - break; -- case orcus::spreadsheet::formula_grammar_xlsx_2007: -- case orcus::spreadsheet::formula_grammar_xlsx_2010: -+ case orcus::spreadsheet::formula_grammar_t::xlsx_2007: -+ case orcus::spreadsheet::formula_grammar_t::xlsx_2010: - eGrammar = formula::FormulaGrammar::GRAM_OOXML; - break; -- case orcus::spreadsheet::formula_grammar_gnumeric: -+ case orcus::spreadsheet::formula_grammar_t::gnumeric: - eGrammar = formula::FormulaGrammar::GRAM_ENGLISH_XL_A1; - break; -- case orcus::spreadsheet::formula_grammar_unknown: -+ case orcus::spreadsheet::formula_grammar_t::unknown: - break; - } - -@@ -799,16 +799,16 @@ SvxBoxItemLine getDirection(os::border_direction_t dir) - { - switch (dir) - { -- case os::border_right: -+ case os::border_direction_t::right: - return SvxBoxItemLine::RIGHT; - break; -- case os::border_left: -+ case os::border_direction_t::left: - return SvxBoxItemLine::RIGHT; - break; -- case os::border_top: -+ case os::border_direction_t::top: - return SvxBoxItemLine::RIGHT; - break; -- case os::border_bottom: -+ case os::border_direction_t::bottom: - return SvxBoxItemLine::RIGHT; - break; - default: -@@ -947,15 +947,15 @@ void ScOrcusStyles::set_font_underline(orcus::spreadsheet::underline_t e) - { - switch(e) - { -- case orcus::spreadsheet::underline_single: -- case orcus::spreadsheet::underline_single_accounting: -+ case orcus::spreadsheet::underline_t::single_line: -+ case orcus::spreadsheet::underline_t::single_accounting: - maCurrentFont.meUnderline = UNDERLINE_SINGLE; - break; -- case orcus::spreadsheet::underline_double: -- case orcus::spreadsheet::underline_double_accounting: -+ case orcus::spreadsheet::underline_t::double_line: -+ case orcus::spreadsheet::underline_t::double_accounting: - maCurrentFont.meUnderline = UNDERLINE_DOUBLE; - break; -- case orcus::spreadsheet::underline_none: -+ case orcus::spreadsheet::underline_t::none: - maCurrentFont.meUnderline = UNDERLINE_NONE; - break; - } -@@ -1019,6 +1019,12 @@ void ScOrcusStyles::set_border_style(orcus::spreadsheet::border_direction_t /*di - // implement later - } - -+void ScOrcusStyles::set_border_style( -+ orcus::spreadsheet::border_direction_t /*dir*/, orcus::spreadsheet::border_style_t /*style*/) -+{ -+ // implement later -+} -+ - void ScOrcusStyles::set_border_color(orcus::spreadsheet::border_direction_t dir, - orcus::spreadsheet::color_elem_t alpha, - orcus::spreadsheet::color_elem_t red, -@@ -1186,6 +1192,11 @@ void ScOrcusStyles::set_cell_style_builtin(size_t index) - maCurrentCellStyle.mnBuiltInId = index; - } - -+void ScOrcusStyles::set_cell_style_parent_name(const char* /*s*/, size_t /*n*/) -+{ -+ // place holder -+} -+ - size_t ScOrcusStyles::commit_cell_style() - { - SAL_INFO("sc.orcus.style", "commit cell style: " << maCurrentCellStyle.maName); --- -2.5.0 - diff --git a/0001-but-only-for-dialog.patch b/0001-but-only-for-dialog.patch deleted file mode 100644 index 2a6460e..0000000 --- a/0001-but-only-for-dialog.patch +++ /dev/null @@ -1,26 +0,0 @@ -From bba3f7bf8f831bf7f51de6441b3f15ed667e56fd Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Wed, 16 Dec 2015 11:02:27 +0000 -Subject: [PATCH] but only for dialog - -Change-Id: I7e4f5c075ca4844f81a59071bed475ea1da4bf91 ---- - vcl/source/window/syswin.cxx | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx -index 3f2cde1..057b51b 100644 ---- a/vcl/source/window/syswin.cxx -+++ b/vcl/source/window/syswin.cxx -@@ -1135,7 +1135,7 @@ void SystemWindow::DoInitialLayout() - mbIsCalculatingInitialLayoutSize = false; - mbInitialLayoutDone = true; - } -- else if (!(GetStyle() & WB_SIZEABLE)) -+ else if (IsDialog() && !(GetStyle() & WB_SIZEABLE)) - { - SetMinOutputSizePixel(GetSizePixel()); - } --- -2.5.0 - diff --git a/0001-generate-better-unit-test-assert-message.patch b/0001-generate-better-unit-test-assert-message.patch deleted file mode 100644 index da23f6d..0000000 --- a/0001-generate-better-unit-test-assert-message.patch +++ /dev/null @@ -1,1158 +0,0 @@ -From 8ebb0f30ab9ba54a1a7b32a53b158890f15033aa Mon Sep 17 00:00:00 2001 -From: Markus Mohrhard -Date: Sun, 29 Nov 2015 15:33:52 +0100 -Subject: [PATCH] generate better unit test assert message - -Change-Id: Ibba7f18fefb4f2851472a6ae0b41447237a6b97f -Reviewed-on: https://gerrit.libreoffice.org/20270 -Tested-by: Jenkins -Reviewed-by: Markus Mohrhard -Tested-by: Markus Mohrhard -(cherry picked from commit 36b658d38930b8aca7e16f7a6b286ca1b3e7a215) - -Get order of expected/actual args to CPPUNIT_ASSERT_EQUAL right - -Change-Id: I0fa26417630991c6d07b5412fb579f9c222d09a6 -(cherry picked from commit 88ab9d4aa09a8ce09fa4d03faefa32e57c530746) - -tdf#96136 replace CPPUNIT_ASSERT with CPPUNIT_ASSERT_EQUAL - -Change-Id: Ib45af8a56ac3adc428c530908cf1bbd95e9cc64c -Reviewed-on: https://gerrit.libreoffice.org/21065 -Tested-by: Jenkins -Reviewed-by: jan iversen -(cherry picked from commit 0e41527fd52f676ff6240a08b3fe25607c1ca726) - -loplugin:cstylecast - -Change-Id: I5ecd63d79e8be77879d3789c45079929696abe03 -(cherry picked from commit efcbfa6f429416d7285a593dbd724eaaf3f3841e) - -Use CPPUNIT_ASSERT_DOUBLES_EQUAL - -...except when checking for infinity - -Change-Id: If6e3b8965169cc615fa5d76422e1925866714936 -(cherry picked from commit 38e965fe0fcabffadb8fabe6756313b4f37daad5) ---- - basic/qa/cppunit/test_scanner.cxx | 882 +++++++++++++++++++------------------- - 1 file changed, 441 insertions(+), 441 deletions(-) - -diff --git a/basic/qa/cppunit/test_scanner.cxx b/basic/qa/cppunit/test_scanner.cxx -index 2927e6e..ba1320b 100644 ---- a/basic/qa/cppunit/test_scanner.cxx -+++ b/basic/qa/cppunit/test_scanner.cxx -@@ -67,12 +67,12 @@ namespace - CPPUNIT_TEST_SUITE_END(); - }; - -- static const char cr[] = "\n"; -- static const char rem[] = "REM"; -- static const char asdf[] = "asdf"; -- static const char dot[] = "."; -- static const char goto_[] = "goto"; -- static const char excl[] = "!"; -+ static const OUString cr = "\n"; -+ static const OUString rem = "REM"; -+ static const OUString asdf = "asdf"; -+ static const OUString dot = "."; -+ static const OUString goto_ = "goto"; -+ static const OUString excl = "!"; - - std::vector getSymbols(const OUString& source, sal_Int32& errors, bool bCompatible = false) - { -@@ -118,52 +118,52 @@ namespace - CPPUNIT_ASSERT(symbols.empty()); - - symbols = getSymbols(source2); -- CPPUNIT_ASSERT(symbols.size() == 1); -- CPPUNIT_ASSERT(symbols[0].text == cr); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(1), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); - - symbols = getSymbols(source3); -- CPPUNIT_ASSERT(symbols.size() == 1); -- CPPUNIT_ASSERT(symbols[0].text == cr); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(1), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); - - symbols = getSymbols(source4); -- CPPUNIT_ASSERT(symbols.size() == 1); -- CPPUNIT_ASSERT(symbols[0].text == cr); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(1), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); - - symbols = getSymbols(source5); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == cr); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); - - symbols = getSymbols(source6); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == cr); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); - - symbols = getSymbols(source7); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == cr); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); - - symbols = getSymbols(source8); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == cr); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); - - symbols = getSymbols(source9); -- CPPUNIT_ASSERT(symbols.size() == 1); -- CPPUNIT_ASSERT(symbols[0].text == cr); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(1), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); - } - - void ScannerTest::testOperators() -@@ -180,62 +180,62 @@ namespace - std::vector symbols; - - symbols = getSymbols(sourceE); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == sourceE); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(sourceE, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); - - symbols = getSymbols(sourceLT); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == sourceLT); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(sourceLT, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); - - symbols = getSymbols(sourceGT); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == sourceGT); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(sourceGT, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); - - symbols = getSymbols(sourceLTE); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == sourceLTE); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(sourceLTE, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); - - symbols = getSymbols(sourceGTE); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == sourceGTE); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(sourceGTE, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); - - symbols = getSymbols(sourceEE); -- CPPUNIT_ASSERT(symbols.size() == 3); -- CPPUNIT_ASSERT(symbols[0].text == sourceE); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == sourceE); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[2].text == cr); -- CPPUNIT_ASSERT(symbols[2].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(sourceE, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(sourceE, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[2].type); - - symbols = getSymbols(sourceNE); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == sourceNE); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(sourceNE, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); - - symbols = getSymbols(sourceA); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == sourceA); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(sourceA, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); - } - - void ScannerTest::testAlphanum() -@@ -256,116 +256,116 @@ namespace - std::vector symbols; - - symbols = getSymbols(source1); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == source1); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(source1, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); - - symbols = getSymbols(source2); -- CPPUNIT_ASSERT(symbols.size() == 3); -+ CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size()); - CPPUNIT_ASSERT(symbols[0].text.isEmpty()); // Can't start symbol with a digit -- CPPUNIT_ASSERT(symbols[0].number == 1); -- CPPUNIT_ASSERT(symbols[0].type == SbxINTEGER); -- CPPUNIT_ASSERT(symbols[1].text == "asfdasfd"); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[2].text == cr); -- CPPUNIT_ASSERT(symbols[2].type == SbxVARIANT); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(OUString("asfdasfd"), symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[2].type); - - symbols = getSymbols(source3); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == source3); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(source3, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); - - symbols = getSymbols(source4); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == source4); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(source4, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); - - symbols = getSymbols(source5); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == source5); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(source5, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); - - symbols = getSymbols(source6); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == source6); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(source6, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); - - symbols = getSymbols(source7); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == "joxclk_"); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(source7 == "joxclk "); // Change the trailing '_' to a ' ' -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(OUString("joxclk_"), symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(OUString("joxclk "), source7); // Change the trailing '_' to a ' ' -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); - - symbols = getSymbols(source8); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == "asdf"); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(OUString("asdf"), symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); - - symbols = getSymbols(source9); -- CPPUNIT_ASSERT(symbols.size() == 3); -+ CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size()); - CPPUNIT_ASSERT(symbols[0].text.isEmpty()); -- CPPUNIT_ASSERT(symbols[0].number == 19395); -- CPPUNIT_ASSERT(symbols[0].type == SbxINTEGER); -- CPPUNIT_ASSERT(symbols[1].text == "asdfa"); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[2].text == cr); -- CPPUNIT_ASSERT(symbols[2].type == SbxVARIANT); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(19395.0, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(OUString("asdfa"), symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[2].type); - - symbols = getSymbols(source10); -- CPPUNIT_ASSERT(symbols.size() == 8); -- CPPUNIT_ASSERT(symbols[0].text == cr); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(8), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); - CPPUNIT_ASSERT(symbols[1].text.isEmpty()); -- CPPUNIT_ASSERT(symbols[1].number == 1); -- CPPUNIT_ASSERT(symbols[1].type == SbxINTEGER); -- CPPUNIT_ASSERT(symbols[2].text == cr); -- CPPUNIT_ASSERT(symbols[2].type == SbxVARIANT); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, symbols[1].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[1].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[2].type); - CPPUNIT_ASSERT(symbols[3].text.isEmpty()); -- CPPUNIT_ASSERT(symbols[3].number == 2); -- CPPUNIT_ASSERT(symbols[3].type == SbxINTEGER); -- CPPUNIT_ASSERT(symbols[4].text == cr); -- CPPUNIT_ASSERT(symbols[4].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[5].text.getLength() == 1); -- CPPUNIT_ASSERT(symbols[5].text[0] == 'a'); -- CPPUNIT_ASSERT(symbols[5].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[6].text == "sdf"); -- CPPUNIT_ASSERT(symbols[6].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[7].text == cr); -- CPPUNIT_ASSERT(symbols[7].type == SbxVARIANT); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(2.0, symbols[3].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[3].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[4].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[4].type); -+ CPPUNIT_ASSERT_EQUAL(1u, (unsigned int)symbols[5].text.getLength()); -+ CPPUNIT_ASSERT_EQUAL('a', (char)symbols[5].text[0]); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[5].type); -+ CPPUNIT_ASSERT_EQUAL(OUString("sdf"), symbols[6].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[6].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[7].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[7].type); - - symbols = getSymbols(source11); -- CPPUNIT_ASSERT(symbols.size() == 4); -- CPPUNIT_ASSERT(symbols[0].text == asdf); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == dot); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[2].text == asdf); -- CPPUNIT_ASSERT(symbols[2].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[3].text == cr); -- CPPUNIT_ASSERT(symbols[3].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(4), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(asdf, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(dot, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); -+ CPPUNIT_ASSERT_EQUAL(asdf, symbols[2].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[2].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[3].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[3].type); - - symbols = getSymbols(source12); -- CPPUNIT_ASSERT(symbols.size() == 3); -- CPPUNIT_ASSERT(symbols[0].text == dot); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == dot); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[2].text == cr); -- CPPUNIT_ASSERT(symbols[2].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(dot, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(dot, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[2].type); - } - - void ScannerTest::testComments() -@@ -381,57 +381,57 @@ namespace - std::vector symbols; - - symbols = getSymbols(source1); -- CPPUNIT_ASSERT(symbols.size() == 1); -- CPPUNIT_ASSERT(symbols[0].text == rem); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(1), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(rem, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); - - symbols = getSymbols(source2); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == "REMasdf"); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(OUString("REMasdf"), symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); - - symbols = getSymbols(source3); -- CPPUNIT_ASSERT(symbols.size() == 1); -- CPPUNIT_ASSERT(symbols[0].text == rem); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(1), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(rem, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); - - symbols = getSymbols(source4); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == asdf); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == rem); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(asdf, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(rem, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); - - symbols = getSymbols(source5); -- CPPUNIT_ASSERT(symbols.size() == 3); -- CPPUNIT_ASSERT(symbols[0].text == rem); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(rem, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); - CPPUNIT_ASSERT(symbols[1].text.isEmpty()); -- CPPUNIT_ASSERT(symbols[1].number == 100); -- CPPUNIT_ASSERT(symbols[1].type == SbxINTEGER); -- CPPUNIT_ASSERT(symbols[2].text == cr); -- CPPUNIT_ASSERT(symbols[2].type == SbxVARIANT); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(100.0, symbols[1].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[1].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[2].type); - - symbols = getSymbols(source6); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == rem); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == rem); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(rem, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(rem, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); - - symbols = getSymbols(source7); -- CPPUNIT_ASSERT(symbols.size() == 4); -- CPPUNIT_ASSERT(symbols[0].text == rem); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(4), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(rem, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); - CPPUNIT_ASSERT(symbols[1].text.isEmpty()); -- CPPUNIT_ASSERT(symbols[1].number == 1234); -- CPPUNIT_ASSERT(symbols[1].type == SbxINTEGER); -- CPPUNIT_ASSERT(symbols[2].text == asdf); -- CPPUNIT_ASSERT(symbols[2].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[3].text == rem); -- CPPUNIT_ASSERT(symbols[3].type == SbxVARIANT); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1234.0, symbols[1].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[1].type); -+ CPPUNIT_ASSERT_EQUAL(asdf, symbols[2].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[2].type); -+ CPPUNIT_ASSERT_EQUAL(rem, symbols[3].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[3].type); - } - - void ScannerTest::testGoto() -@@ -443,31 +443,31 @@ namespace - std::vector symbols; - - symbols = getSymbols(source1); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == goto_); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(goto_, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); - - symbols = getSymbols(source2); -- CPPUNIT_ASSERT(symbols.size() == 3); -- CPPUNIT_ASSERT(symbols[0].text == "go"); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == "to"); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[2].text == cr); -- CPPUNIT_ASSERT(symbols[2].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(OUString("go"), symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(OUString("to"), symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[2].type); - - symbols = getSymbols(source3); -- CPPUNIT_ASSERT(symbols.size() == 4); -- CPPUNIT_ASSERT(symbols[0].text == "go"); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[2].text == "to"); -- CPPUNIT_ASSERT(symbols[2].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[3].text == cr); -- CPPUNIT_ASSERT(symbols[3].type == SbxVARIANT); -+ CPPUNIT_ASSERT_EQUAL(size_t(4), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(OUString("go"), symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); -+ CPPUNIT_ASSERT_EQUAL(OUString("to"), symbols[2].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[2].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[3].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[3].type); - } - - void ScannerTest::testGotoCompatible() -@@ -479,21 +479,21 @@ namespace - std::vector symbols; - - symbols = getSymbols(source1, true); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == goto_); -- CPPUNIT_ASSERT(symbols[1].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(goto_, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); - - symbols = getSymbols(source2, true); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == goto_); -- CPPUNIT_ASSERT(symbols[1].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(goto_, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); - - symbols = getSymbols(source3, true); -- CPPUNIT_ASSERT(symbols.size() == 4); -- CPPUNIT_ASSERT(symbols[0].text == "go"); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(symbols[2].text == "to"); -- CPPUNIT_ASSERT(symbols[3].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(4), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(OUString("go"), symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(OUString("to"), symbols[2].text); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[3].text); - } - - void ScannerTest::testExclamation() -@@ -508,41 +508,41 @@ namespace - std::vector symbols; - - symbols = getSymbols(source1); -- CPPUNIT_ASSERT(symbols.size() == 4); -- CPPUNIT_ASSERT(symbols[0].text == asdf); -- CPPUNIT_ASSERT(symbols[1].text == excl); -- CPPUNIT_ASSERT(symbols[2].text == asdf); -- CPPUNIT_ASSERT(symbols[3].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(4), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(asdf, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(excl, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(asdf, symbols[2].text); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[3].text); - - symbols = getSymbols(source2); -- CPPUNIT_ASSERT(symbols.size() == 3); -- CPPUNIT_ASSERT(symbols[0].text == excl); -+ CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(excl, symbols[0].text); - CPPUNIT_ASSERT(symbols[1].text.isEmpty()); -- CPPUNIT_ASSERT(symbols[1].number == 1234); -- CPPUNIT_ASSERT(symbols[2].text == cr); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1234.0, symbols[1].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text); - - symbols = getSymbols(source3); -- CPPUNIT_ASSERT(symbols.size() == 3); -- CPPUNIT_ASSERT(symbols[0].text == excl); -- CPPUNIT_ASSERT(symbols[1].text == "_3"); -- CPPUNIT_ASSERT(symbols[2].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(excl, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(OUString("_3"), symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text); - - symbols = getSymbols(source4); -- CPPUNIT_ASSERT(symbols.size() == 3); -- CPPUNIT_ASSERT(symbols[0].text == excl); -- CPPUNIT_ASSERT(symbols[1].text == "$"); -- CPPUNIT_ASSERT(symbols[2].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(excl, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(OUString("$"), symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text); - - symbols = getSymbols(source5); -- CPPUNIT_ASSERT(symbols.size() == 3); -- CPPUNIT_ASSERT(symbols[0].text == excl); -- CPPUNIT_ASSERT(symbols[1].text == "%"); -- CPPUNIT_ASSERT(symbols[2].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(excl, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(OUString("%"), symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text); - - symbols = getSymbols(source6); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].text == excl); -- CPPUNIT_ASSERT(symbols[1].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(excl, symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); - } - - void ScannerTest::testNumbers() -@@ -569,144 +569,144 @@ namespace - sal_Int32 errors; - - symbols = getSymbols(source1, errors); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].number == 12345); -- CPPUNIT_ASSERT(symbols[0].type == SbxINTEGER); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(errors == 0); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(12345.0, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors); - - symbols = getSymbols(source2, errors); -- CPPUNIT_ASSERT(symbols.size() == 3); -- CPPUNIT_ASSERT(symbols[0].number == 1.2); -- CPPUNIT_ASSERT(symbols[0].type == SbxDOUBLE); -- CPPUNIT_ASSERT(rtl::math::round( symbols[1].number, 12) == rtl::math::round( .3, 12)); -- CPPUNIT_ASSERT(symbols[1].type == SbxDOUBLE); -- CPPUNIT_ASSERT(symbols[2].text == cr); -- CPPUNIT_ASSERT(errors == 1); -+ CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size()); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1.2, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(.3, symbols[1].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[1].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text); -+ CPPUNIT_ASSERT_EQUAL(1u, (unsigned int)errors); - - symbols = getSymbols(source3, errors); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].number == 123.4); -- CPPUNIT_ASSERT(symbols[0].type == SbxDOUBLE); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(errors == 0); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(123.4, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors); - - symbols = getSymbols(source4, errors); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].number == .5); -- CPPUNIT_ASSERT(symbols[0].type == SbxDOUBLE); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(errors == 0); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(.5, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors); - - symbols = getSymbols(source5, errors); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].number == 5); -- CPPUNIT_ASSERT(symbols[0].type == SbxDOUBLE); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(errors == 0); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(5.0, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors); - - symbols = getSymbols(source6, errors); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].number == 0); -- CPPUNIT_ASSERT(symbols[0].type == SbxDOUBLE); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(errors == 0); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors); - - symbols = getSymbols(source7, errors); -- CPPUNIT_ASSERT(symbols.size() == 3); -- CPPUNIT_ASSERT(symbols[0].text == "-"); -- CPPUNIT_ASSERT(symbols[1].number == 3); -- CPPUNIT_ASSERT(symbols[1].type == SbxINTEGER); -- CPPUNIT_ASSERT(symbols[2].text == cr); -- CPPUNIT_ASSERT(errors == 0); -+ CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(OUString("-"), symbols[0].text); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(3.0, symbols[1].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[1].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text); -+ CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors); - - symbols = getSymbols(source8, errors); -- CPPUNIT_ASSERT(symbols.size() == 3); -- CPPUNIT_ASSERT(symbols[0].text == "-"); -- CPPUNIT_ASSERT(symbols[1].number == 0); -- CPPUNIT_ASSERT(symbols[1].type == SbxDOUBLE); -- CPPUNIT_ASSERT(symbols[2].text == cr); -- CPPUNIT_ASSERT(errors == 0); -+ CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(OUString("-"), symbols[0].text); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, symbols[1].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[1].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text); -+ CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors); - - symbols = getSymbols(source9, errors); -- CPPUNIT_ASSERT(symbols.size() == 3); -- CPPUNIT_ASSERT(symbols[0].number == 12); -- CPPUNIT_ASSERT(symbols[0].type == SbxDOUBLE); -- CPPUNIT_ASSERT(symbols[1].text == "dE3"); -- CPPUNIT_ASSERT(symbols[2].text == cr); -- CPPUNIT_ASSERT(errors == 1); -+ CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size()); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(12.0, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(OUString("dE3"), symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text); -+ CPPUNIT_ASSERT_EQUAL(1u, (unsigned int)errors); - - symbols = getSymbols(source10, errors); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].number == 12000); -- CPPUNIT_ASSERT(symbols[0].type == SbxDOUBLE); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(errors == 0); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(12000.0, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors); - - symbols = getSymbols(source11, errors); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].number == 12000); -- CPPUNIT_ASSERT(symbols[0].type == SbxDOUBLE); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(errors == 0); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(12000.0, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors); - - symbols = getSymbols(source12, errors); -- CPPUNIT_ASSERT(symbols.size() == 6); -- CPPUNIT_ASSERT(symbols[0].number == 12); -- CPPUNIT_ASSERT(symbols[0].type == SbxDOUBLE); -- CPPUNIT_ASSERT(symbols[1].text == "e"); -- CPPUNIT_ASSERT(symbols[2].text == "+"); -- CPPUNIT_ASSERT(symbols[3].text == "+"); -- CPPUNIT_ASSERT(symbols[4].number == 3); -- CPPUNIT_ASSERT(symbols[4].type == SbxINTEGER); -- CPPUNIT_ASSERT(symbols[5].text == cr); -- CPPUNIT_ASSERT(errors == 1); -+ CPPUNIT_ASSERT_EQUAL(size_t(6), symbols.size()); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(12.0, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(OUString("e"), symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(OUString("+"), symbols[2].text); -+ CPPUNIT_ASSERT_EQUAL(OUString("+"), symbols[3].text); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(3.0, symbols[4].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[4].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[5].text); -+ CPPUNIT_ASSERT_EQUAL(1u, (unsigned int)errors); - - symbols = getSymbols(source13, errors); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].number == .012); -- CPPUNIT_ASSERT(symbols[0].type == SbxDOUBLE); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(errors == 0); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(.012, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors); - - symbols = getSymbols(source14, errors); -- CPPUNIT_ASSERT(symbols.size() == 3); -- CPPUNIT_ASSERT(symbols[0].number == .012); -- CPPUNIT_ASSERT(symbols[0].type == SbxDOUBLE); -- CPPUNIT_ASSERT(symbols[1].text == "+"); -- CPPUNIT_ASSERT(symbols[2].text == cr); -- CPPUNIT_ASSERT(errors == 0); -+ CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size()); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(.012, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(OUString("+"), symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text); -+ CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors); - - symbols = getSymbols(source15, errors); -- CPPUNIT_ASSERT(symbols.size() == 6); -- CPPUNIT_ASSERT(symbols[0].number == 1); -- CPPUNIT_ASSERT(symbols[0].type == SbxINTEGER); -- CPPUNIT_ASSERT(symbols[1].text == ","); -- CPPUNIT_ASSERT(symbols[2].number == 2); -- CPPUNIT_ASSERT(symbols[2].type == SbxINTEGER); -- CPPUNIT_ASSERT(symbols[3].text == ","); -- CPPUNIT_ASSERT(symbols[4].number == 3); -- CPPUNIT_ASSERT(symbols[4].type == SbxINTEGER); -- CPPUNIT_ASSERT(symbols[5].text == cr); -- CPPUNIT_ASSERT(errors == 0); -+ CPPUNIT_ASSERT_EQUAL(size_t(6), symbols.size()); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(OUString(","), symbols[1].text); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(2.0, symbols[2].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[2].type); -+ CPPUNIT_ASSERT_EQUAL(OUString(","), symbols[3].text); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(3.0, symbols[4].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[4].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[5].text); -+ CPPUNIT_ASSERT_EQUAL(0u, (unsigned int)errors); - - symbols = getSymbols(source16, errors); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].number == 1); -- CPPUNIT_ASSERT(symbols[0].type == SbxDOUBLE); -- CPPUNIT_ASSERT(symbols[1].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); - // This error is from a "buffer overflow" which is stupid because - // the buffer is artificially constrained by the scanner. -- CPPUNIT_ASSERT(errors == 1); // HACK -+ CPPUNIT_ASSERT_EQUAL(1u, (unsigned int)errors); // HACK - - double fInf = 0.0; - rtl::math::setInf( &fInf, false); - symbols = getSymbols(source17, errors); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].number == fInf); -- CPPUNIT_ASSERT(symbols[0].type == SbxDOUBLE); -- CPPUNIT_ASSERT(symbols[1].text == cr); -- CPPUNIT_ASSERT(errors == 1); // math error, overflow -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(fInf, symbols[0].number); -+ CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(1u, (unsigned int)errors); // math error, overflow - } - - void ScannerTest::testDataType() -@@ -722,39 +722,39 @@ namespace - std::vector symbols; - - symbols = getSymbols(source1); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].type == SbxINTEGER); -- CPPUNIT_ASSERT(symbols[1].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); - - symbols = getSymbols(source2); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].type == SbxLONG); -- CPPUNIT_ASSERT(symbols[1].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(SbxLONG, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); - - symbols = getSymbols(source3); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].type == SbxSINGLE); -- CPPUNIT_ASSERT(symbols[1].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(SbxSINGLE, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); - - symbols = getSymbols(source4); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].type == SbxDOUBLE); -- CPPUNIT_ASSERT(symbols[1].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); - - symbols = getSymbols(source5); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].type == SbxCURRENCY); -- CPPUNIT_ASSERT(symbols[1].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(SbxCURRENCY, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); - - symbols = getSymbols(source6); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].type == SbxSTRING); -- CPPUNIT_ASSERT(symbols[1].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(SbxSTRING, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); - - symbols = getSymbols(source7); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); - } - - void ScannerTest::testHexOctal() -@@ -772,84 +772,84 @@ namespace - std::vector symbols; - - symbols = getSymbols(source1); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].number == 10); -- CPPUNIT_ASSERT(symbols[0].text == OUString()); -- CPPUNIT_ASSERT(symbols[0].type == SbxINTEGER); -- CPPUNIT_ASSERT(symbols[1].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(10.0, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(OUString(), symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); - - symbols = getSymbols(source2); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].number == 2783); -- CPPUNIT_ASSERT(symbols[0].text == OUString()); -- CPPUNIT_ASSERT(symbols[0].type == SbxINTEGER); -- CPPUNIT_ASSERT(symbols[1].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(2783.0, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(OUString(), symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); - - symbols = getSymbols(source3); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].number == 16); -- CPPUNIT_ASSERT(symbols[0].text == OUString()); -- CPPUNIT_ASSERT(symbols[0].type == SbxINTEGER); -- CPPUNIT_ASSERT(symbols[1].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(16.0, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(OUString(), symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); - - symbols = getSymbols(source4); -- CPPUNIT_ASSERT(symbols.size() == 6); -- CPPUNIT_ASSERT(symbols[0].number == 0); -- CPPUNIT_ASSERT(symbols[0].text == "&"); -- CPPUNIT_ASSERT(symbols[0].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[1].number == 0); -- CPPUNIT_ASSERT(symbols[1].text == OUString()); -- CPPUNIT_ASSERT(symbols[1].type == SbxINTEGER); -- CPPUNIT_ASSERT(symbols[2].number == 1); -- CPPUNIT_ASSERT(symbols[2].text == OUString()); -- CPPUNIT_ASSERT(symbols[2].type == SbxINTEGER); -- CPPUNIT_ASSERT(symbols[3].number == 1); -- CPPUNIT_ASSERT(symbols[3].text == "H1"); -- CPPUNIT_ASSERT(symbols[3].type == SbxLONG); -- CPPUNIT_ASSERT(symbols[4].number == 1); -- CPPUNIT_ASSERT(symbols[4].text == "H1"); -- CPPUNIT_ASSERT(symbols[4].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[5].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(6), symbols.size()); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(OUString("&"), symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[0].type); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, symbols[1].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(OUString(), symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[1].type); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, symbols[2].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(OUString(), symbols[2].text); -+ CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[2].type); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, symbols[3].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(OUString("H1"), symbols[3].text); -+ CPPUNIT_ASSERT_EQUAL(SbxLONG, symbols[3].type); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, symbols[4].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(OUString("H1"), symbols[4].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[4].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[5].text); - - symbols = getSymbols(source5); -- CPPUNIT_ASSERT(symbols.size() == 3); -- CPPUNIT_ASSERT(symbols[0].number == 0); -- CPPUNIT_ASSERT(symbols[0].text == OUString()); -- CPPUNIT_ASSERT(symbols[0].type == SbxINTEGER); -- CPPUNIT_ASSERT(symbols[1].number == 0); -- CPPUNIT_ASSERT(symbols[1].text == "O12"); -- CPPUNIT_ASSERT(symbols[1].type == SbxVARIANT); -- CPPUNIT_ASSERT(symbols[2].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size()); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(OUString(), symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[0].type); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, symbols[1].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(OUString("O12"), symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxVARIANT, symbols[1].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text); - - symbols = getSymbols(source6); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].number == 8); -- CPPUNIT_ASSERT(symbols[0].text == OUString()); -- CPPUNIT_ASSERT(symbols[0].type == SbxINTEGER); -- CPPUNIT_ASSERT(symbols[1].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(8.0, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(OUString(), symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[0].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); - - symbols = getSymbols(source7); -- CPPUNIT_ASSERT(symbols.size() == 2); -- CPPUNIT_ASSERT(symbols[0].number == 0); -- CPPUNIT_ASSERT(symbols[0].text == OUString()); -- CPPUNIT_ASSERT(symbols[1].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(0.0, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(OUString(), symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); - - symbols = getSymbols(source8); -- CPPUNIT_ASSERT(symbols.size() == 2); -+ CPPUNIT_ASSERT_EQUAL(size_t(2), symbols.size()); - // TODO: this line fails on 64 bit systems!!! -- // CPPUNIT_ASSERT(symbols[0].number == -1744830464); -- CPPUNIT_ASSERT(symbols[0].text == OUString()); -- CPPUNIT_ASSERT(symbols[1].text == cr); -+ // CPPUNIT_ASSERT_EQUAL(symbols[0].number, -1744830464); -+ CPPUNIT_ASSERT_EQUAL(OUString(), symbols[0].text); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[1].text); - - symbols = getSymbols(source9); -- CPPUNIT_ASSERT(symbols.size() == 3); -- CPPUNIT_ASSERT(symbols[0].text == OUString()); -- CPPUNIT_ASSERT(symbols[0].number == 1); -- CPPUNIT_ASSERT(symbols[0].type == SbxINTEGER); -- CPPUNIT_ASSERT(symbols[1].number == .23); -- CPPUNIT_ASSERT(symbols[1].text == OUString()); -- CPPUNIT_ASSERT(symbols[1].type == SbxDOUBLE); -- CPPUNIT_ASSERT(symbols[2].text == cr); -+ CPPUNIT_ASSERT_EQUAL(size_t(3), symbols.size()); -+ CPPUNIT_ASSERT_EQUAL(OUString(), symbols[0].text); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, symbols[0].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(SbxINTEGER, symbols[0].type); -+ CPPUNIT_ASSERT_DOUBLES_EQUAL(.23, symbols[1].number, 1E-12); -+ CPPUNIT_ASSERT_EQUAL(OUString(), symbols[1].text); -+ CPPUNIT_ASSERT_EQUAL(SbxDOUBLE, symbols[1].type); -+ CPPUNIT_ASSERT_EQUAL(cr, symbols[2].text); - } - - // Put the test suite in the registry --- -2.5.0 - diff --git a/0001-gtk3-various-bits-means-different-things-again.patch b/0001-gtk3-various-bits-means-different-things-again.patch deleted file mode 100644 index 2b37b35..0000000 --- a/0001-gtk3-various-bits-means-different-things-again.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 235411c9d47ecba88e46d859ea93bcecefb0c46e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Fri, 11 Mar 2016 13:21:23 +0000 -Subject: [PATCH] gtk3: various bits means different things again - -Change-Id: Iafa1e65fb0cc096513cdfe12a09fb0ef4c4d2db0 ---- - vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx -index 403280c..7591f68 100644 ---- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx -+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx -@@ -1124,6 +1124,12 @@ static GtkStyleContext* createStyleContext(GtkControlPart ePart, GtkStyleContext - # define CHECKED GTK_STATE_FLAG_ACTIVE - #endif - -+#if GTK_CHECK_VERSION(3,19,11) -+# define ACTIVE_TAB GTK_STATE_FLAG_CHECKED -+#else -+# define ACTIVE_TAB GTK_STATE_FLAG_ACTIVE -+#endif -+ - void GtkSalGraphics::PaintCheckOrRadio(cairo_t *cr, GtkStyleContext *context, - const Rectangle& rControlRectangle, bool bIsCheck, bool bInMenu) - { -@@ -1345,7 +1351,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co - case CTRL_TAB_ITEM: - context = mpNotebookHeaderTabsTabStyle; - if (nState & ControlState::SELECTED) -- flags = (GtkStateFlags) (flags | GTK_STATE_FLAG_ACTIVE); -+ flags = (GtkStateFlags) (flags | ACTIVE_TAB); - break; - case CTRL_WINDOW_BACKGROUND: - context = gtk_widget_get_style_context(mpWindow); -@@ -2030,7 +2036,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings ) - aTextColor = getColor( text_color ); - aStyleSet.SetTabRolloverTextColor(aTextColor); - -- gtk_style_context_set_state(pCStyle, GTK_STATE_FLAG_ACTIVE); -+ gtk_style_context_set_state(pCStyle, ACTIVE_TAB); - gtk_style_context_get_color(pCStyle, gtk_style_context_get_state(pCStyle), &text_color); - aTextColor = getColor( text_color ); - aStyleSet.SetTabHighlightTextColor(aTextColor); --- -2.7.1 - diff --git a/0001-pass-original-CFLAGS.patch b/0001-pass-original-CFLAGS.patch new file mode 100644 index 0000000..dd858ec --- /dev/null +++ b/0001-pass-original-CFLAGS.patch @@ -0,0 +1,26 @@ +From 590d80cea8fcd7c51140cff38392c4c180327330 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Fri, 22 Apr 2016 14:32:07 +0200 +Subject: [PATCH] pass original CFLAGS + +Change-Id: Ia37fa1ad21a9411d78b0c30c769b3934d43d1389 +--- + external/libxmlsec/ExternalProject_xmlsec.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/external/libxmlsec/ExternalProject_xmlsec.mk b/external/libxmlsec/ExternalProject_xmlsec.mk +index a22b426..6a81306 100644 +--- a/external/libxmlsec/ExternalProject_xmlsec.mk ++++ b/external/libxmlsec/ExternalProject_xmlsec.mk +@@ -55,7 +55,7 @@ $(call gb_ExternalProject_get_state_target,xmlsec,build) : + autoreconf \ + && ./configure \ + --with-pic --disable-shared --disable-crypto-dl --without-libxslt --without-gnutls \ +- CFLAGS="$(if $(debug),$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS))" \ ++ CFLAGS="$(CFLAGS) $(if $(debug),$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS))" \ + $(if $(or $(filter-out ANDROID,$(OS)),$(DISABLE_OPENSSL)),--without-openssl,--with-openssl=$(call gb_UnpackedTarball_get_dir,openssl)) \ + $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \ + $(if $(SYSTEM_NSS),,$(if $(filter MACOSX,$(OS)),--disable-pkgconfig)) \ +-- +2.5.0 + diff --git a/0001-reorder.patch b/0001-reorder.patch deleted file mode 100644 index 8c67915..0000000 --- a/0001-reorder.patch +++ /dev/null @@ -1,66 +0,0 @@ -From d72a33c6aed0ca8f9fe0b90bc6d72e7313985524 Mon Sep 17 00:00:00 2001 -From: David Tardon -Date: Tue, 8 Mar 2016 05:57:40 +0100 -Subject: [PATCH 1/4] reorder - -Change-Id: I8ff9f61475fddb475fe08e867c5446c825abb7dc ---- - RepositoryExternal.mk | 31 ++++++++++++++++--------------- - 1 file changed, 16 insertions(+), 15 deletions(-) - -diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk -index c6fe371..c8aab64 100644 ---- a/RepositoryExternal.mk -+++ b/RepositoryExternal.mk -@@ -704,6 +704,21 @@ $(call gb_LinkTarget_use_static_libraries,$(1),\ - - endef - -+define gb_LinkTarget__use_boost_filesystem -+$(call gb_LinkTarget_add_defs,$(1),\ -+ -DBOOST_ALL_NO_LIB \ -+) -+ -+$(call gb_LinkTarget_use_static_libraries,$(1),\ -+ boost_filesystem \ -+) -+ -+endef -+ -+define gb_ExternalProject__use_boost_filesystem -+$(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem) -+endef -+ - define gb_LinkTarget__use_boost_iostreams - $(call gb_LinkTarget_add_defs,$(1),\ - -DBOOST_ALL_NO_LIB \ -@@ -743,25 +758,11 @@ $(call gb_LinkTarget_set_include,$(1),\ - - endef - --define gb_LinkTarget__use_boost_filesystem --$(call gb_LinkTarget_add_defs,$(1),\ -- -DBOOST_ALL_NO_LIB \ --) -- --$(call gb_LinkTarget_use_static_libraries,$(1),\ -- boost_filesystem \ --) -- --endef -- --define gb_ExternalProject__use_boost_filesystem --$(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem) --endef -- - define gb_ExternalProject__use_boost_headers - $(call gb_ExternalProject_use_unpacked,$(1),boost) - - endef -+ - endif # SYSTEM_BOOST - - --- -2.5.0 - diff --git a/0001-rhbz-1168757-propagate-selected-slides-to-print-dial.patch b/0001-rhbz-1168757-propagate-selected-slides-to-print-dial.patch deleted file mode 100644 index b16b6a8..0000000 --- a/0001-rhbz-1168757-propagate-selected-slides-to-print-dial.patch +++ /dev/null @@ -1,110 +0,0 @@ -From 830b0e364cb1fec07664e1d5ec8a4c9593009959 Mon Sep 17 00:00:00 2001 -From: David Tardon -Date: Wed, 20 Jan 2016 18:40:06 +0100 -Subject: [PATCH] rhbz#1168757 propagate selected slides to print dialog - -Change-Id: Icef119baffb8985ea0cb94d7e59f0daae88023ac -(cherry picked from commit f90f8329fe5e95f25ba449e307fd40d56d68d3bb) ---- - sd/source/ui/view/DocumentRenderer.cxx | 41 ++++++++++++++++++++++++++++++---- - 1 file changed, 37 insertions(+), 4 deletions(-) - -diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx -index fd2b69c..d3b0a65 100644 ---- a/sd/source/ui/view/DocumentRenderer.cxx -+++ b/sd/source/ui/view/DocumentRenderer.cxx -@@ -33,10 +33,12 @@ - #include "FrameView.hxx" - #include "Outliner.hxx" - #include "OutlineViewShell.hxx" -+#include "SlideSorterViewShell.hxx" - - #include - #include - #include -+#include - #include - #include - #include -@@ -333,8 +335,9 @@ namespace { - class DialogCreator : Resource - { - public: -- DialogCreator (bool bImpress, sal_Int32 nCurPage) -+ DialogCreator (ViewShellBase &rBase, bool bImpress, sal_Int32 nCurPage) - : Resource(SdResId(_STR_IMPRESS_PRINT_UI_OPTIONS)) -+ , mrBase(rBase) - , mbImpress(bImpress) - , mnCurPage(nCurPage) - { -@@ -359,6 +362,7 @@ namespace { - } - - private: -+ ViewShellBase &mrBase; - std::vector maProperties; - std::vector maSlidesPerPage; - bool mbImpress; -@@ -584,19 +588,48 @@ namespace { - aWidgetIds[0] = "printallpages"; - aWidgetIds[1] = "printpages"; - aWidgetIds[2] = "printselection"; -+ -+ // check if there is a selection of slides -+ OUString aPageRange(OUString::number(mnCurPage + 1)); -+ int nPrintRange(0); -+ using sd::slidesorter::SlideSorterViewShell; -+ SlideSorterViewShell* const pSSViewSh(SlideSorterViewShell::GetSlideSorter(mrBase)); -+ if (pSSViewSh) -+ { -+ const std::shared_ptr pPageSelection(pSSViewSh->GetPageSelection()); -+ if (bool(pPageSelection) && pPageSelection->size() > 1) -+ { -+ OUStringBuffer aBuf; -+ // TODO: this could be improved by writing ranges instead of consecutive page -+ // numbers if appropriate. Do we have a helper function for that somewhere? -+ bool bFirst(true); -+ for (auto pPage: *pPageSelection) -+ { -+ if (!bFirst) -+ { -+ aBuf.append(','); -+ bFirst = false; -+ } -+ aBuf.append(OUString::number(pPage->GetPageNum() / 2 + 1)); -+ } -+ aPageRange = aBuf.getStr(); -+ nPrintRange = 1; -+ } -+ } -+ - AddDialogControl( vcl::PrinterOptionsHelper::setChoiceRadiosControlOpt(aWidgetIds, "", - aHelpIds, - aPrintRangeName, - CreateChoice(mbImpress - ? _STR_IMPRESS_PRINT_UI_PAGE_RANGE_CHOICE - : _STR_DRAW_PRINT_UI_PAGE_RANGE_CHOICE), -- 0 ) -+ nPrintRange ) - ); - // create a an Edit dependent on "Pages" selected - vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, true ); - AddDialogControl(vcl::PrinterOptionsHelper::setEditControlOpt("pagerange", "", - ".HelpID:vcl:PrintDialog:PageRange:Edit", "PageRange", -- OUString::number(mnCurPage + 1), aPageRangeOpt)); -+ aPageRange, aPageRangeOpt)); - - FreeResource(); - } -@@ -1140,7 +1173,7 @@ public: - , mpPrintView() - , mbHasOrientationWarningBeenShown(false) - { -- DialogCreator aCreator( mrBase.GetDocShell()->GetDocumentType() == DOCUMENT_TYPE_IMPRESS, GetCurrentPageIndex() ); -+ DialogCreator aCreator( mrBase, mrBase.GetDocShell()->GetDocumentType() == DOCUMENT_TYPE_IMPRESS, GetCurrentPageIndex() ); - m_aUIProperties = aCreator.GetDialogControls(); - maSlidesPerPage = aCreator.GetSlidesPerPage(); - --- -2.5.0 - diff --git a/0001-tdf-39271-allow-to-export-only-notes-pages.patch b/0001-tdf-39271-allow-to-export-only-notes-pages.patch deleted file mode 100644 index c106e72..0000000 --- a/0001-tdf-39271-allow-to-export-only-notes-pages.patch +++ /dev/null @@ -1,346 +0,0 @@ -From a8abbc28deebd6a9642033a47676ae9ba1900b05 Mon Sep 17 00:00:00 2001 -From: David Tardon -Date: Thu, 24 Mar 2016 14:52:35 +0100 -Subject: [PATCH] tdf#39271 allow to export only notes pages - -Change-Id: Ia03062cf31b6bab8196dc317a7e8fbcfc86fadf0 ---- - filter/source/pdf/impdialog.cxx | 22 +++++++++++++ - filter/source/pdf/impdialog.hxx | 4 +++ - filter/source/pdf/pdfexport.cxx | 18 ++++++---- - filter/source/pdf/pdfexport.hxx | 1 + - filter/uiconfig/ui/pdfgeneralpage.ui | 38 +++++++++++++++++----- - .../schema/org/openoffice/Office/Common.xcs | 7 ++++ - 6 files changed, 75 insertions(+), 15 deletions(-) - -diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx -index 1fe1474..d51770c 100644 ---- a/filter/source/pdf/impdialog.cxx -+++ b/filter/source/pdf/impdialog.cxx -@@ -84,6 +84,7 @@ ImpPDFTabDialog::ImpPDFTabDialog(vcl::Window* pParent, Sequence< PropertyValue > - mbExportNotes( true ), - mbViewPDF( false ), - mbExportNotesPages( false ), -+ mbExportOnlyNotesPages( false ), - mbUseTransitionEffects( false ), - mbIsSkipEmptyPages( true ), - mbAddStream( false ), -@@ -191,7 +192,10 @@ ImpPDFTabDialog::ImpPDFTabDialog(vcl::Window* pParent, Sequence< PropertyValue > - mbUseTaggedPDF = maConfigItem.ReadBool( "UseTaggedPDF", false ); - mnPDFTypeSelection = maConfigItem.ReadInt32( "SelectPdfVersion", 0 ); - if ( mbIsPresentation ) -+ { - mbExportNotesPages = maConfigItem.ReadBool( "ExportNotesPages", false ); -+ mbExportOnlyNotesPages = maConfigItem.ReadBool( "ExportOnlyNotesPages", false ); -+ } - mbExportNotes = maConfigItem.ReadBool( "ExportNotes", false ); - mbViewPDF = maConfigItem.ReadBool( "ViewPDFAfterExport", false ); - -@@ -392,7 +396,10 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData() - maConfigItem.WriteInt32("SelectPdfVersion", mnPDFTypeSelection ); - - if ( mbIsPresentation ) -+ { - maConfigItem.WriteBool( "ExportNotesPages", mbExportNotesPages ); -+ maConfigItem.WriteBool( "ExportOnlyNotesPages", mbExportOnlyNotesPages ); -+ } - maConfigItem.WriteBool( "ExportNotes", mbExportNotes ); - maConfigItem.WriteBool( "ViewPDFAfterExport", mbViewPDF ); - -@@ -540,6 +547,7 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage(vcl::Window* pParent, const SfxItemSe - get(mpCbExportHiddenSlides, "hiddenpages"); - get(mpCbExportNotes, "comments"); - get(mpCbExportNotesPages, "notes"); -+ get(mpCbExportOnlyNotesPages, "onlynotes"); - get(mpCbExportEmptyPages, "emptypages"); - get(mpCbViewPDF, "viewpdf"); - -@@ -577,6 +585,7 @@ void ImpPDFTabGeneralPage::dispose() - mpCbExportNotes.clear(); - mpCbViewPDF.clear(); - mpCbExportNotesPages.clear(); -+ mpCbExportOnlyNotesPages.clear(); - mpCbExportEmptyPages.clear(); - mpCbAddStream.clear(); - mpCbWatermark.clear(); -@@ -658,6 +667,10 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( ImpPDFTabDialog* paParent ) - mpRbRange->SetText(get("slides")->GetText()); - mpCbExportNotesPages->Show(); - mpCbExportNotesPages->Check(paParent->mbExportNotesPages); -+ mpCbExportNotesPages->SetToggleHdl( LINK(this, ImpPDFTabGeneralPage, ToggleExportNotesPagesHdl ) ); -+ mpCbExportOnlyNotesPages->Show(); -+ mpCbExportOnlyNotesPages->Check(paParent->mbExportOnlyNotesPages); -+ mpCbExportOnlyNotesPages->Enable(paParent->mbExportNotesPages); - mpCbExportHiddenSlides->Show(); - mpCbExportHiddenSlides->Check(paParent->mbExportHiddenSlides); - } -@@ -665,6 +678,8 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( ImpPDFTabDialog* paParent ) - { - mpCbExportNotesPages->Show(false); - mpCbExportNotesPages->Check(false); -+ mpCbExportOnlyNotesPages->Show(false); -+ mpCbExportOnlyNotesPages->Check(false); - mpCbExportHiddenSlides->Show(false); - mpCbExportHiddenSlides->Check(false); - } -@@ -690,7 +705,10 @@ void ImpPDFTabGeneralPage::GetFilterConfigItem( ImpPDFTabDialog* paParent ) - paParent->mbExportNotes = mpCbExportNotes->IsChecked(); - paParent->mbViewPDF = mpCbViewPDF->IsChecked(); - if ( mbIsPresentation ) -+ { - paParent->mbExportNotesPages = mpCbExportNotesPages->IsChecked(); -+ paParent->mbExportOnlyNotesPages = mpCbExportOnlyNotesPages->IsChecked(); -+ } - paParent->mbExportBookmarks = mpCbExportBookmarks->IsChecked(); - if ( mbIsPresentation ) - paParent->mbExportHiddenSlides = mpCbExportHiddenSlides->IsChecked(); -@@ -758,6 +776,10 @@ IMPL_LINK_NOARG_TYPED(ImpPDFTabGeneralPage, ToggleExportFormFieldsHdl, CheckBox& - mpFormsFrame->Enable(mpCbExportFormFields->IsChecked()); - } - -+IMPL_LINK_NOARG_TYPED(ImpPDFTabGeneralPage, ToggleExportNotesPagesHdl, CheckBox&, void) -+{ -+ mpCbExportOnlyNotesPages->Enable(mpCbExportNotesPages->IsChecked()); -+} - - IMPL_LINK_NOARG_TYPED(ImpPDFTabGeneralPage, ToggleCompressionHdl, RadioButton&, void) - { -diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx -index f4d916e..c1e80d5 100644 ---- a/filter/source/pdf/impdialog.hxx -+++ b/filter/source/pdf/impdialog.hxx -@@ -104,6 +104,7 @@ protected: - bool mbExportNotes; - bool mbViewPDF; - bool mbExportNotesPages; -+ bool mbExportOnlyNotesPages; - bool mbUseTransitionEffects; - bool mbIsSkipEmptyPages; - bool mbAddStream; -@@ -218,6 +219,7 @@ class ImpPDFTabGeneralPage : public SfxTabPage - VclPtr mpCbExportNotes; - VclPtr mpCbViewPDF; - VclPtr mpCbExportNotesPages; -+ VclPtr mpCbExportOnlyNotesPages; - - VclPtr mpCbExportEmptyPages; - VclPtr mpCbAddStream; -@@ -237,6 +239,8 @@ class ImpPDFTabGeneralPage : public SfxTabPage - DECL_LINK_TYPED( ToggleWatermarkHdl, CheckBox&, void ); - DECL_LINK_TYPED( ToggleAddStreamHdl, CheckBox&, void ); - DECL_LINK_TYPED( ToggleExportFormFieldsHdl, CheckBox&, void ); -+ DECL_LINK_TYPED( ToggleExportNotesPagesHdl, CheckBox&, void ); -+ - void TogglePagesHdl(); - - public: -diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx -index 5a67041..c5f8f5a 100644 ---- a/filter/source/pdf/pdfexport.cxx -+++ b/filter/source/pdf/pdfexport.cxx -@@ -100,6 +100,7 @@ PDFExport::PDFExport( const Reference< XComponent >& rxSrcDoc, - mbExportNotes ( true ), - mbViewPDF ( true ), - mbExportNotesPages ( false ), -+ mbExportOnlyNotesPages ( false ), - mbUseTransitionEffects ( true ), - mbExportBookmarks ( true ), - mbExportHiddenSlides ( false ), -@@ -464,6 +465,8 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >& - rFilterData[ nData ].Value >>= mbViewPDF; - else if ( rFilterData[ nData ].Name == "ExportNotesPages" ) - rFilterData[ nData ].Value >>= mbExportNotesPages; -+ else if ( rFilterData[ nData ].Name == "ExportOnlyNotesPages" ) -+ rFilterData[ nData ].Value >>= mbExportOnlyNotesPages; - else if ( rFilterData[ nData ].Name == "UseTransitionEffects" ) - rFilterData[ nData ].Value >>= mbUseTransitionEffects; - else if ( rFilterData[ nData ].Name == "ExportFormFields" ) -@@ -840,7 +843,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >& - aSelection = Any(); - aSelection <<= mxSrcDoc; - } -- bool bSecondPassForImpressNotes = false; -+ bool bExportNotesPages = false; - bool bReChangeToNormalView = false; - const OUString sShowOnlineLayout( "ShowOnlineLayout" ); - bool bReHideWhitespace = false; -@@ -879,8 +882,9 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >& - { - uno::Reference< drawing::XShapes > xShapes; // sj: do not allow to export notes when - if ( ! ( aSelection >>= xShapes ) ) // exporting a selection -> todo: in the dialog -- bSecondPassForImpressNotes = true; // the export notes checkbox needs to be disabled -+ bExportNotesPages = true; - } -+ const bool bExportPages = bExportNotesPages ? !mbExportOnlyNotesPages : true; - - if( aPageRange.isEmpty() ) - { -@@ -894,18 +898,18 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >& - if ( pResMgr ) - { - sal_Int32 nTotalPageCount = aRangeEnum.size(); -- if ( bSecondPassForImpressNotes ) -+ if ( bExportPages && bExportNotesPages ) - nTotalPageCount *= 2; - mxStatusIndicator->start( ResId( PDF_PROGRESS_BAR, *pResMgr ), nTotalPageCount ); - } - } - -- if( nPageCount > 0 ) -+ bRet = nPageCount > 0; -+ -+ if ( bRet && bExportPages ) - bRet = ExportSelection( *pPDFWriter, xRenderable, aSelection, aRangeEnum, aRenderOptions, nPageCount ); -- else -- bRet = false; - -- if ( bRet && bSecondPassForImpressNotes ) -+ if ( bRet && bExportNotesPages ) - { - rExportNotesValue <<= sal_True; - bRet = ExportSelection( *pPDFWriter, xRenderable, aSelection, aRangeEnum, aRenderOptions, nPageCount ); -diff --git a/filter/source/pdf/pdfexport.hxx b/filter/source/pdf/pdfexport.hxx -index 75ac0aa4..8754729 100644 ---- a/filter/source/pdf/pdfexport.hxx -+++ b/filter/source/pdf/pdfexport.hxx -@@ -49,6 +49,7 @@ private: - bool mbExportNotes; - bool mbViewPDF; - bool mbExportNotesPages; -+ bool mbExportOnlyNotesPages; - bool mbUseTransitionEffects; - bool mbExportBookmarks; - bool mbExportHiddenSlides; -diff --git a/filter/uiconfig/ui/pdfgeneralpage.ui b/filter/uiconfig/ui/pdfgeneralpage.ui -index 7ba4a25..52314ac 100644 ---- a/filter/uiconfig/ui/pdfgeneralpage.ui -+++ b/filter/uiconfig/ui/pdfgeneralpage.ui -@@ -1,5 +1,5 @@ - -- -+ - - - -@@ -111,8 +111,8 @@ - - False - True -- 0 - Slides: -+ 0 - - - 0 -@@ -191,9 +191,9 @@ - - True - False -- 0 - _Quality: - True -+ 0 - - - -@@ -378,10 +378,10 @@ - - True - False -- 0 - Text: - True - watermarkentry -+ 0 - - - -@@ -512,10 +512,10 @@ - - True - False -- 0 - Submit _format: - True - format -+ 0 - - - 0 -@@ -604,7 +604,7 @@ - - - 0 -- 9 -+ 10 - - - -@@ -619,7 +619,7 @@ - - - 0 -- 10 -+ 11 - - - -@@ -634,7 +634,7 @@ - - - 0 -- 8 -+ 9 - - - -@@ -652,6 +652,28 @@ - 7 - - -+ -+ -+ True -+ False -+ 12 -+ -+ -+ Export onl_y notes pages -+ True -+ True -+ False -+ True -+ 0 -+ True -+ -+ -+ -+ -+ 0 -+ 8 -+ -+ - - - -diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs -index 6adfa44a..9fce3d7 100644 ---- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs -+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs -@@ -5135,6 +5135,13 @@ - - false - -+ -+ -+ Specifies if only notes pages (i.e., not slides) are exported to PDF. (Notes pages -+ are available in Impress documents only). -+ -+ false -+ - - - Specifies slide transitions are exported to PDF. This option --- -2.5.0 - diff --git a/0001-tdf-95450-avoid-double-swap-on-big-endian-arches.patch b/0001-tdf-95450-avoid-double-swap-on-big-endian-arches.patch deleted file mode 100644 index 4ee1943..0000000 --- a/0001-tdf-95450-avoid-double-swap-on-big-endian-arches.patch +++ /dev/null @@ -1,91 +0,0 @@ -From e1f3d2cce6e2717189ab8a1e85b98f28df05734b Mon Sep 17 00:00:00 2001 -From: David Tardon -Date: Tue, 15 Dec 2015 20:46:54 +0100 -Subject: [PATCH] tdf#95450 avoid double swap on big endian arches - -AFAICS the swapping is already done at basebmp::BitmapDevice level. - -Change-Id: Ie82f2610b4415ed11fc1164a54bc1fe183f523ed ---- - vcl/headless/svpbmp.cxx | 28 ---------------------------- - 1 file changed, 28 deletions(-) - -diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx -index e6d962f..a3ff4d7 100644 ---- a/vcl/headless/svpbmp.cxx -+++ b/vcl/headless/svpbmp.cxx -@@ -202,17 +202,10 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( BitmapAccessMode ) - { - nBitCount = 32; - pBuf->mnFormat = BMP_FORMAT_32BIT_TC_MASK; --#ifdef OSL_BIGENDIAN -- ColorMaskElement aRedMask(0x0000ff00); -- ColorMaskElement aGreenMask(0x00ff0000); -- ColorMaskElement aBlueMask(0xff000000); -- sal_uInt32 nAlphaChannel(0x000000ff); --#else - ColorMaskElement aRedMask(0x00ff0000); - ColorMaskElement aGreenMask(0x0000ff00); - ColorMaskElement aBlueMask(0x000000ff); - sal_uInt32 nAlphaChannel(0xff000000); --#endif - aBlueMask.CalcMaskShift(); - aRedMask.CalcMaskShift(); - aGreenMask.CalcMaskShift(); -@@ -223,17 +216,10 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( BitmapAccessMode ) - { - nBitCount = 32; - pBuf->mnFormat = BMP_FORMAT_32BIT_TC_MASK; --#ifdef OSL_BIGENDIAN -- ColorMaskElement aRedMask(0x00ff0000); -- ColorMaskElement aGreenMask(0x0000ff00); -- ColorMaskElement aBlueMask(0x000000ff); -- sal_uInt32 nAlphaChannel(0xff000000); --#else - ColorMaskElement aRedMask(0x0000ff00); - ColorMaskElement aGreenMask(0x00ff0000); - ColorMaskElement aBlueMask(0xff000000); - sal_uInt32 nAlphaChannel(0x000000ff); --#endif - aBlueMask.CalcMaskShift(); - aRedMask.CalcMaskShift(); - aGreenMask.CalcMaskShift(); -@@ -244,17 +230,10 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( BitmapAccessMode ) - { - nBitCount = 32; - pBuf->mnFormat = BMP_FORMAT_32BIT_TC_MASK; --#ifdef OSL_BIGENDIAN -- ColorMaskElement aRedMask(0x000000ff); -- ColorMaskElement aGreenMask(0x0000ff00); -- ColorMaskElement aBlueMask(0x00ff0000); -- sal_uInt32 nAlphaChannel(0xff000000); --#else - ColorMaskElement aRedMask(0xff000000); - ColorMaskElement aGreenMask(0x00ff0000); - ColorMaskElement aBlueMask(0x0000ff00); - sal_uInt32 nAlphaChannel(0x000000ff); --#endif - aBlueMask.CalcMaskShift(); - aRedMask.CalcMaskShift(); - aGreenMask.CalcMaskShift(); -@@ -265,17 +244,10 @@ BitmapBuffer* SvpSalBitmap::AcquireBuffer( BitmapAccessMode ) - { - nBitCount = 32; - pBuf->mnFormat = BMP_FORMAT_32BIT_TC_MASK; --#ifdef OSL_BIGENDIAN -- ColorMaskElement aRedMask(0xff000000); -- ColorMaskElement aGreenMask(0x00ff0000); -- ColorMaskElement aBlueMask(0x0000ff00); -- sal_uInt32 nAlphaChannel(0x000000ff); --#else - ColorMaskElement aRedMask(0x000000ff); - ColorMaskElement aGreenMask(0x0000ff00); - ColorMaskElement aBlueMask(0x00ff0000); - sal_uInt32 nAlphaChannel(0xff000000); --#endif - aBlueMask.CalcMaskShift(); - aRedMask.CalcMaskShift(); - aGreenMask.CalcMaskShift(); --- -2.5.0 - diff --git a/0001-tdf-97665-Let-s-hope-that-over-activation-isn-t-real.patch b/0001-tdf-97665-Let-s-hope-that-over-activation-isn-t-real.patch deleted file mode 100644 index a8f7756..0000000 --- a/0001-tdf-97665-Let-s-hope-that-over-activation-isn-t-real.patch +++ /dev/null @@ -1,329 +0,0 @@ -From e51b78efcdd8e55727fb3b75165b11a30bf6a83a Mon Sep 17 00:00:00 2001 -From: Maxim Monastirsky -Date: Sun, 7 Feb 2016 17:53:40 +0200 -Subject: [PATCH] tdf#97665 Let's hope that over activation isn't really needed - -- MenuBarManager::Activate has a check for duplicate activation, - which makes the second activation attempt fail. Removing this - check or deactivating after each activation will likely affect - performance even more, but on the other hand should solve - lp#1296715, which was the main reason of the over activation - in the first place. So let's activate only one menu at a time, - and do full activation only on the initial update. - -- Unfortunately the HUD activation callback doesn't work, so - we still have to keep active status listener for all menu - items. (Which is BTW against the recommendation in - XPopupMenuController::updatePopupMenu IDL doc. Fortunately - the performance problem hardly noticeable on modern hw.) - -Reviewed-on: https://gerrit.libreoffice.org/22369 -Tested-by: Jenkins -Reviewed-by: Maxim Monastirsky -(cherry picked from commit 2abdcfd641883f246fe78f2fbe38499c9382c059) - -Change-Id: I96affa72412f3f38160fdca4b6efd20ca68d059f ---- - framework/source/uielement/menubarmanager.cxx | 11 ++--- - include/vcl/menu.hxx | 9 +--- - vcl/inc/salmenu.hxx | 1 + - vcl/inc/unx/gtk/gtksalmenu.hxx | 4 +- - vcl/source/window/menu.cxx | 46 +++---------------- - vcl/unx/gtk/gloactiongroup.cxx | 2 +- - vcl/unx/gtk/gtkdata.cxx | 18 -------- - vcl/unx/gtk/gtksalmenu.cxx | 64 +++++++-------------------- - 8 files changed, 33 insertions(+), 122 deletions(-) - -diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx -index 6bb58db..fc80c3e 100644 ---- a/framework/source/uielement/menubarmanager.cxx -+++ b/framework/source/uielement/menubarmanager.cxx -@@ -386,10 +386,6 @@ throw ( RuntimeException, std::exception ) - OUString aFeatureURL = Event.FeatureURL.Complete; - - SolarMutexGuard aSolarGuard; -- if ( m_bHasMenuBar ) -- { -- vcl::MenuInvalidator::Invalidated(); -- } - { - if ( m_bDisposed ) - return; -@@ -488,6 +484,8 @@ throw ( RuntimeException, std::exception ) - pMenuItemHandler->xMenuItemDispatch.clear(); - } - } -+ if ( m_bHasMenuBar && !m_bActive ) -+ m_pVCLMenu->UpdateNativeMenu(); - } - } - -@@ -893,9 +891,8 @@ IMPL_LINK_TYPED( MenuBarManager, Activate, Menu *, pMenu, bool ) - if ( !bPopupMenu ) - { - xMenuItemDispatch->addStatusListener( static_cast< XStatusListener* >( this ), aTargetURL ); -- xMenuItemDispatch->removeStatusListener( static_cast< XStatusListener* >( this ), aTargetURL ); -- if ( m_bHasMenuBar ) -- xMenuItemDispatch->addStatusListener( static_cast< XStatusListener* >( this ), aTargetURL ); -+ if ( !m_bHasMenuBar ) -+ xMenuItemDispatch->removeStatusListener( static_cast< XStatusListener* >( this ), aTargetURL ); - } - } - else if ( !bPopupMenu ) -diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx -index ade703b..0d6e16a 100644 ---- a/include/vcl/menu.hxx -+++ b/include/vcl/menu.hxx -@@ -313,6 +313,8 @@ public: - void RemoveDisabledEntries( bool bCheckPopups = true, bool bRemoveEmptyPopups = false ); - bool HasValidEntries( bool bCheckPopups = true ); - -+ void UpdateNativeMenu(); -+ - void SetItemText( sal_uInt16 nItemId, const OUString& rStr ); - OUString GetItemText( sal_uInt16 nItemId ) const; - -@@ -407,13 +409,6 @@ public: - }; - - --namespace vcl { namespace MenuInvalidator { -- --VCL_DLLPUBLIC void AddMenuInvalidateListener(const Link&); --VCL_DLLPUBLIC void Invalidated(); -- --}} -- - class VCL_DLLPUBLIC MenuBar : public Menu - { - Link maCloseHdl; -diff --git a/vcl/inc/salmenu.hxx b/vcl/inc/salmenu.hxx -index 287e19e..468994a 100644 ---- a/vcl/inc/salmenu.hxx -+++ b/vcl/inc/salmenu.hxx -@@ -80,6 +80,7 @@ public: - virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, FloatWinPopupFlags nFlags); - virtual bool AddMenuBarButton( const SalMenuButtonItem& ); // return false if not implemented or failure - virtual void RemoveMenuBarButton( sal_uInt16 nId ); -+ virtual void Update() {} - - // TODO: implement show/hide for the Win/Mac VCL native backends - virtual void ShowItem( unsigned nPos, bool bShow ) { EnableItem( nPos, bShow ); } -diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx -index 011c3e4..93259f1 100644 ---- a/vcl/inc/unx/gtk/gtksalmenu.hxx -+++ b/vcl/inc/unx/gtk/gtksalmenu.hxx -@@ -96,11 +96,11 @@ public: - void NativeSetAccelerator( unsigned nSection, unsigned nItemPos, const vcl::KeyCode& rKeyCode, const OUString& rKeyName ); - - void DispatchCommand( gint itemId, const gchar* aCommand ); -- void Activate(); -+ void Activate( const gchar* aMenuCommand = nullptr ); - void Deactivate( const gchar* aMenuCommand ); - void Display( bool bVisible ); - bool PrepUpdate(); -- void Update(); // Update this menu only. -+ virtual void Update() override; // Update this menu only. - void UpdateFull(); // Update full menu hierarchy from this menu. - }; - -diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx -index 3a6e54c..4aa7d41 100644 ---- a/vcl/source/window/menu.cxx -+++ b/vcl/source/window/menu.cxx -@@ -2314,6 +2314,12 @@ sal_uLong Menu::DeactivateMenuBar(sal_uLong nFocusId) - return nFocusId; - } - -+void Menu::UpdateNativeMenu() -+{ -+ if ( ImplGetSalMenu() ) -+ ImplGetSalMenu()->Update(); -+} -+ - void Menu::MenuBarKeyInput(const KeyEvent&) - { - } -@@ -3251,44 +3257,4 @@ ImplMenuDelData::~ImplMenuDelData() - const_cast< Menu* >( mpMenu )->ImplRemoveDel( *this ); - } - --namespace vcl { namespace MenuInvalidator { -- --struct MenuInvalidateListeners : public vcl::DeletionNotifier --{ -- std::vector> m_aListeners; --}; -- --static MenuInvalidateListeners* pMenuInvalidateListeners = nullptr; -- --void AddMenuInvalidateListener(const Link& rLink) --{ -- if(!pMenuInvalidateListeners) -- pMenuInvalidateListeners = new MenuInvalidateListeners(); -- // ensure uniqueness -- auto& rListeners = pMenuInvalidateListeners->m_aListeners; -- if (std::find(rListeners.begin(), rListeners.end(), rLink) == rListeners.end()) -- rListeners.push_back( rLink ); --} -- --void Invalidated() --{ -- if(!pMenuInvalidateListeners) -- return; -- -- vcl::DeletionListener aDel( pMenuInvalidateListeners ); -- -- auto& rYieldListeners = pMenuInvalidateListeners->m_aListeners; -- // Copy the list, because this can be destroyed when calling a Link... -- std::vector> aCopy( rYieldListeners ); -- for( Link& rLink : aCopy ) -- { -- if (aDel.isDeleted()) break; -- // check this hasn't been removed in some re-enterancy scenario fdo#47368 -- if( std::find(rYieldListeners.begin(), rYieldListeners.end(), rLink) != rYieldListeners.end() ) -- rLink.Call( nullptr ); -- } --}; -- --} } // namespace vcl::MenuInvalidator -- - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -diff --git a/vcl/unx/gtk/gloactiongroup.cxx b/vcl/unx/gtk/gloactiongroup.cxx -index 8385388..e710809 100644 ---- a/vcl/unx/gtk/gloactiongroup.cxx -+++ b/vcl/unx/gtk/gloactiongroup.cxx -@@ -201,7 +201,7 @@ g_lo_action_group_perform_submenu_action (GLOActionGroup *group, - SAL_INFO("vcl.unity", "g_lo_action_group_perform_submenu_action on " << group << " to " << bState); - - if (bState) -- pSalMenu->Activate(); -+ pSalMenu->Activate (action_name); - else - pSalMenu->Deactivate (action_name); - } -diff --git a/vcl/unx/gtk/gtkdata.cxx b/vcl/unx/gtk/gtkdata.cxx -index b5c64e0..9ea6dc9 100644 ---- a/vcl/unx/gtk/gtkdata.cxx -+++ b/vcl/unx/gtk/gtkdata.cxx -@@ -1030,22 +1030,4 @@ void GtkSalDisplay::deregisterFrame( SalFrame* pFrame ) - SalGenericDisplay::deregisterFrame( pFrame ); - } - --#if GTK_CHECK_VERSION(3,0,0) --void GtkSalDisplay::RefreshMenusUnity() --{ --#ifdef ENABLE_GMENU_INTEGRATION -- for(auto pSalFrame : m_aFrames) { -- auto pGtkSalFrame( static_cast(pSalFrame)); -- GtkSalMenu* pSalMenu = static_cast(pGtkSalFrame->GetMenu()); -- if(pSalMenu) { -- pSalMenu->Activate(); -- pSalMenu->UpdateFull(); -- } -- } --#else -- (void) this; --#endif --} --#endif -- - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx -index b6295fa..5c16c39 100644 ---- a/vcl/unx/gtk/gtksalmenu.cxx -+++ b/vcl/unx/gtk/gtksalmenu.cxx -@@ -372,54 +372,9 @@ void GtkSalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsig - pItem->mpSubMenu = pGtkSubMenu; - } - --static bool bInvalidMenus = false; --static gboolean RefreshMenusUnity(gpointer) --{ -- SolarMutexGuard g; --#if GTK_CHECK_VERSION(3,0,0) -- GetGtkSalData()->GetGtkDisplay()->RefreshMenusUnity(); --#else -- SalDisplay* pSalDisplay = vcl_sal::getSalDisplay(GetGenericData()); -- std::list< SalFrame* >::const_iterator pSalFrame = pSalDisplay->getFrames().begin(); -- std::list< SalFrame* >::const_iterator pEndSalFrame = pSalDisplay->getFrames().end(); -- for(; pSalFrame != pEndSalFrame; ++pSalFrame) { -- const GtkSalFrame* pGtkSalFrame = static_cast< const GtkSalFrame* >( *pSalFrame ); -- GtkSalFrame* pFrameNonConst = const_cast(pGtkSalFrame); -- GtkSalMenu* pSalMenu = static_cast(pFrameNonConst->GetMenu()); -- if(pSalMenu) { -- pSalMenu->Activate(); -- pSalMenu->UpdateFull(); -- } -- } --#endif -- bInvalidMenus = false; -- return FALSE; --} -- --static void RefreshMenusUnity(void*, LinkParamNone*) --{ -- if(!bInvalidMenus) { -- g_timeout_add(10, &RefreshMenusUnity, nullptr); -- bInvalidMenus = true; -- } --} -- --static Link* getRefreshLinkInstance() --{ -- static Link* pLink = nullptr; -- if(!pLink) { -- pLink = new Link(nullptr, &RefreshMenusUnity); -- } -- return pLink; --} -- - void GtkSalMenu::SetFrame( const SalFrame* pFrame ) - { - SolarMutexGuard aGuard; -- { -- vcl::MenuInvalidator::AddMenuInvalidateListener(*getRefreshLinkInstance()); -- } -- - assert(mbMenuBar); - SAL_INFO("vcl.unity", "GtkSalMenu set to frame"); - mpFrame = static_cast< const GtkSalFrame* >( pFrame ); -@@ -706,6 +661,7 @@ void GtkSalMenu::DispatchCommand( gint itemId, const gchar *aCommand ) - void GtkSalMenu::ActivateAllSubmenus(MenuBar* pMenuBar) - { - pMenuBar->HandleMenuActivateEvent(mpVCLMenu); -+ pMenuBar->HandleMenuDeActivateEvent(mpVCLMenu); - for ( size_t nPos = 0; nPos < maItems.size(); nPos++ ) - { - GtkSalMenuItem *pSalItem = maItems[ nPos ]; -@@ -717,11 +673,25 @@ void GtkSalMenu::ActivateAllSubmenus(MenuBar* pMenuBar) - } - } - --void GtkSalMenu::Activate() -+void GtkSalMenu::Activate( const gchar* aMenuCommand ) - { - if ( !mbMenuBar ) - return; -- ActivateAllSubmenus(static_cast(mpVCLMenu)); -+ -+ if ( !aMenuCommand ) { -+ ActivateAllSubmenus( static_cast< MenuBar* >( mpVCLMenu ) ); -+ return; -+ } -+ -+ int nDupsToSkip; -+ aMenuCommand = DetermineDupIndex(aMenuCommand, nDupsToSkip); -+ GtkSalMenu* pSalSubMenu = GetMenuForItemCommand( const_cast(aMenuCommand), nDupsToSkip, TRUE ); -+ -+ if ( pSalSubMenu != nullptr ) { -+ MenuBar* pMenuBar = static_cast< MenuBar* >( mpVCLMenu ); -+ pMenuBar->HandleMenuActivateEvent( pSalSubMenu->mpVCLMenu ); -+ pSalSubMenu->Update(); -+ } - } - - void GtkSalMenu::Deactivate( const gchar* aMenuCommand ) --- -2.5.0 - diff --git a/0001-these-popups-should-start-invisible-and-take-default.patch b/0001-these-popups-should-start-invisible-and-take-default.patch deleted file mode 100644 index be6a440..0000000 --- a/0001-these-popups-should-start-invisible-and-take-default.patch +++ /dev/null @@ -1,49 +0,0 @@ -From bd8559a4722825b4a1fdb33042b90b63295ef835 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Thu, 17 Dec 2015 16:33:41 +0000 -Subject: [PATCH 1/2] these popups should start invisible and take default - popup menu bits - -so they can position correctly under wayland - -Change-Id: Idf65c0ef27be5aa6027a516207fd34c2e03407ca ---- - svx/uiconfig/ui/floatingundoredo.ui | 1 - - svx/uiconfig/ui/paralinespacingcontrol.ui | 2 -- - 2 files changed, 3 deletions(-) - -diff --git a/svx/uiconfig/ui/floatingundoredo.ui b/svx/uiconfig/ui/floatingundoredo.ui -index 66f30a6..2c48f82 100644 ---- a/svx/uiconfig/ui/floatingundoredo.ui -+++ b/svx/uiconfig/ui/floatingundoredo.ui -@@ -11,7 +11,6 @@ - True - popup-menu - True -- False - False - - -diff --git a/svx/uiconfig/ui/paralinespacingcontrol.ui b/svx/uiconfig/ui/paralinespacingcontrol.ui -index 5d7402b..67ca9c1 100644 ---- a/svx/uiconfig/ui/paralinespacingcontrol.ui -+++ b/svx/uiconfig/ui/paralinespacingcontrol.ui -@@ -45,7 +45,6 @@ - 1 - - -- True - False - True - True -@@ -54,7 +53,6 @@ - True - popup-menu - True -- False - False - - --- -2.5.0 - diff --git a/0002-disable-tearability-of-color-window.patch b/0002-disable-tearability-of-color-window.patch deleted file mode 100644 index 8dc0268..0000000 --- a/0002-disable-tearability-of-color-window.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 011f42c0c6104228f5c15daae58e432ccf2be69d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Thu, 17 Dec 2015 17:04:52 +0000 -Subject: [PATCH 2/2] disable tearability of color window - -the new popup controllers take care to destroy the popup -and recreate a non-popup and move the contents into it - -so we should re-implement the color popup as one of those -in the meantime, turn it into a non-tearable thing - -Change-Id: I6ba26bf19badcbf910b7200b7e1b8b2a64ce4eec ---- - svx/source/tbxctrls/tbcontrl.cxx | 3 +-- - svx/uiconfig/ui/colorwindow.ui | 1 - - 2 files changed, 1 insertion(+), 3 deletions(-) - -diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx -index ae696ae..28691dc 100644 ---- a/svx/source/tbxctrls/tbcontrl.cxx -+++ b/svx/source/tbxctrls/tbcontrl.cxx -@@ -2659,8 +2659,7 @@ VclPtr SvxColorToolBoxControl::CreatePopupWindow() - break; - } - -- pColorWin->StartPopupMode( &GetToolBox(), -- FloatWinPopupFlags::AllowTearOff|FloatWinPopupFlags::NoAppFocusClose ); -+ pColorWin->StartPopupMode( &GetToolBox(), FloatWinPopupFlags::NoAppFocusClose ); - pColorWin->StartSelection(); - SetPopupWindow( pColorWin ); - if ( !bSidebarType ) -diff --git a/svx/uiconfig/ui/colorwindow.ui b/svx/uiconfig/ui/colorwindow.ui -index 9482562..702bee3 100644 ---- a/svx/uiconfig/ui/colorwindow.ui -+++ b/svx/uiconfig/ui/colorwindow.ui -@@ -25,7 +25,6 @@ - True - popup-menu - True -- False - False - - --- -2.5.0 - diff --git a/0002-gtk3-some-changes-towards-enabling-native-gtk3-popup.patch b/0002-gtk3-some-changes-towards-enabling-native-gtk3-popup.patch deleted file mode 100644 index 17aca2d..0000000 --- a/0002-gtk3-some-changes-towards-enabling-native-gtk3-popup.patch +++ /dev/null @@ -1,173 +0,0 @@ -From 7e0dcbd97a7ec6e9d39a8b74980421a6b33132ff Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Mon, 22 Feb 2016 20:57:52 +0000 -Subject: [PATCH] gtk3: some changes towards enabling native gtk3 popup menus - -these menubar things can be menu things and can then do -away with the casting, no logic changes intended - -Change-Id: Ibb1b5354d5e1483327f172d6890e134f1e4b9ee4 -(cherry picked from commit c13a0b1f9e76584a4ffaea0ba754c8f9a01793d8) ---- - include/vcl/menu.hxx | 8 ++++---- - vcl/inc/unx/gtk/gtksalmenu.hxx | 4 ++-- - vcl/source/window/menu.cxx | 15 +++++++-------- - vcl/unx/gtk/gtksalmenu.cxx | 13 +++++-------- - 4 files changed, 18 insertions(+), 22 deletions(-) - -diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx -index 0d6e16a..1dbd85e 100644 ---- a/include/vcl/menu.hxx -+++ b/include/vcl/menu.hxx -@@ -406,8 +406,11 @@ public: - - void HighlightItem( sal_uInt16 nItemPos ); - void DeHighlight() { HighlightItem( 0xFFFF ); } // MENUITEMPOS_INVALID --}; - -+ bool HandleMenuCommandEvent(Menu *pMenu, sal_uInt16 nEventId) const; -+ bool HandleMenuActivateEvent(Menu *pMenu) const; -+ bool HandleMenuDeActivateEvent(Menu *pMenu) const; -+}; - - class VCL_DLLPUBLIC MenuBar : public Menu - { -@@ -458,10 +461,7 @@ public: - void ShowButtons( bool bClose, bool bFloat, bool bHide ); - - virtual void SelectItem(sal_uInt16 nId) override; -- bool HandleMenuActivateEvent(Menu *pMenu) const; -- bool HandleMenuDeActivateEvent(Menu *pMenu) const; - bool HandleMenuHighlightEvent(Menu *pMenu, sal_uInt16 nEventId) const; -- bool HandleMenuCommandEvent(Menu *pMenu, sal_uInt16 nEventId) const; - bool HandleMenuButtonEvent(Menu *pMenu, sal_uInt16 nEventId); - - void SetCloseButtonClickHdl( const Link& rLink ) { maCloseHdl = rLink; } -diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx -index 93259f1..ffda51a 100644 ---- a/vcl/inc/unx/gtk/gtksalmenu.hxx -+++ b/vcl/inc/unx/gtk/gtksalmenu.hxx -@@ -42,7 +42,7 @@ class GtkSalMenu : public SalMenu - private: - std::vector< GtkSalMenuItem* > maItems; - -- bool mbMenuBar; -+ bool mbMenuBar; - Menu* mpVCLMenu; - GtkSalMenu* mpParentSalMenu; - const GtkSalFrame* mpFrame; -@@ -53,7 +53,7 @@ private: - - GtkSalMenu* GetMenuForItemCommand( gchar* aCommand, int& rDupsToSkip, gboolean bGetSubmenu ); - void ImplUpdate( gboolean bRecurse ); -- void ActivateAllSubmenus(MenuBar* pMenuBar); -+ void ActivateAllSubmenus(Menu* pMenuBar); - - public: - GtkSalMenu( bool bMenuBar ); -diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx -index 4aa7d41..999085e 100644 ---- a/vcl/source/window/menu.cxx -+++ b/vcl/source/window/menu.cxx -@@ -2679,14 +2679,13 @@ void MenuBar::SelectItem(sal_uInt16 nId) - } - - // handler for native menu selection and command events -- --bool MenuBar::HandleMenuActivateEvent( Menu *pMenu ) const -+bool Menu::HandleMenuActivateEvent( Menu *pMenu ) const - { - if( pMenu ) - { - ImplMenuDelData aDelData( this ); - -- pMenu->pStartedFrom = const_cast(this); -+ pMenu->pStartedFrom = const_cast(this); - pMenu->bInCallback = true; - pMenu->Activate(); - -@@ -2696,13 +2695,13 @@ bool MenuBar::HandleMenuActivateEvent( Menu *pMenu ) const - return true; - } - --bool MenuBar::HandleMenuDeActivateEvent( Menu *pMenu ) const -+bool Menu::HandleMenuDeActivateEvent( Menu *pMenu ) const - { - if( pMenu ) - { - ImplMenuDelData aDelData( this ); - -- pMenu->pStartedFrom = const_cast(this); -+ pMenu->pStartedFrom = const_cast(this); - pMenu->bInCallback = true; - pMenu->Deactivate(); - if( !aDelData.isDeleted() ) -@@ -2735,14 +2734,14 @@ bool MenuBar::HandleMenuHighlightEvent( Menu *pMenu, sal_uInt16 nHighlightEventI - return false; - } - --bool MenuBar::HandleMenuCommandEvent( Menu *pMenu, sal_uInt16 nCommandEventId ) const -+bool Menu::HandleMenuCommandEvent( Menu *pMenu, sal_uInt16 nCommandEventId ) const - { - if( !pMenu ) -- pMenu = const_cast(this)->ImplFindMenu(nCommandEventId); -+ pMenu = const_cast(this)->ImplFindMenu(nCommandEventId); - if( pMenu ) - { - pMenu->nSelectedId = nCommandEventId; -- pMenu->pStartedFrom = const_cast(this); -+ pMenu->pStartedFrom = const_cast(this); - pMenu->ImplSelect(); - return true; - } -diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx -index 507d529..9b590dd 100644 ---- a/vcl/unx/gtk/gtksalmenu.cxx -+++ b/vcl/unx/gtk/gtksalmenu.cxx -@@ -654,11 +654,10 @@ void GtkSalMenu::DispatchCommand( gint itemId, const gchar *aCommand ) - GtkSalMenu* pSalSubMenu = GetMenuForItemCommand( const_cast(aCommand), nDupsToSkip, FALSE ); - Menu* pSubMenu = ( pSalSubMenu != nullptr ) ? pSalSubMenu->GetMenu() : nullptr; - -- MenuBar* pMenuBar = static_cast< MenuBar* >( mpVCLMenu ); -- pMenuBar->HandleMenuCommandEvent( pSubMenu, itemId ); -+ mpVCLMenu->HandleMenuCommandEvent( pSubMenu, itemId ); - } - --void GtkSalMenu::ActivateAllSubmenus(MenuBar* pMenuBar) -+void GtkSalMenu::ActivateAllSubmenus(Menu* pMenuBar) - { - pMenuBar->HandleMenuActivateEvent(mpVCLMenu); - pMenuBar->HandleMenuDeActivateEvent(mpVCLMenu); -@@ -679,17 +678,16 @@ void GtkSalMenu::Activate( const gchar* aMenuCommand ) - return; - - if ( !aMenuCommand ) { -- ActivateAllSubmenus( static_cast< MenuBar* >( mpVCLMenu ) ); -+ ActivateAllSubmenus(mpVCLMenu); - return; - } - - int nDupsToSkip; - aMenuCommand = DetermineDupIndex(aMenuCommand, nDupsToSkip); - GtkSalMenu* pSalSubMenu = GetMenuForItemCommand( const_cast(aMenuCommand), nDupsToSkip, TRUE ); - - if ( pSalSubMenu != nullptr ) { -- MenuBar* pMenuBar = static_cast< MenuBar* >( mpVCLMenu ); -- pMenuBar->HandleMenuActivateEvent( pSalSubMenu->mpVCLMenu ); -+ mpVCLMenu->HandleMenuActivateEvent( pSalSubMenu->mpVCLMenu ); - pSalSubMenu->Update(); - } - } -@@ -702,8 +700,7 @@ void GtkSalMenu::Deactivate( const gchar* aMenuCommand ) - GtkSalMenu* pSalSubMenu = GetMenuForItemCommand( const_cast(aMenuCommand), nDupsToSkip, TRUE ); - - if ( pSalSubMenu != nullptr ) { -- MenuBar* pMenuBar = static_cast< MenuBar* >( mpVCLMenu ); -- pMenuBar->HandleMenuDeActivateEvent( pSalSubMenu->mpVCLMenu ); -+ mpVCLMenu->HandleMenuDeActivateEvent( pSalSubMenu->mpVCLMenu ); - } - } - --- -2.5.0 - diff --git a/0002-reduce-copypasta.patch b/0002-reduce-copypasta.patch deleted file mode 100644 index a2d9b5f..0000000 --- a/0002-reduce-copypasta.patch +++ /dev/null @@ -1,156 +0,0 @@ -From 57c439a15e151fa9f7c298ceb15165749958c53c Mon Sep 17 00:00:00 2001 -From: David Tardon -Date: Tue, 8 Mar 2016 06:06:36 +0100 -Subject: [PATCH 2/4] reduce copypasta - -Change-Id: I5303caf69128a0a6d28fccfcf2ab63ed466e3853 ---- - RepositoryExternal.mk | 81 +++++++++++++-------------------------------------- - 1 file changed, 21 insertions(+), 60 deletions(-) - -diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk -index c8aab64..58f924d 100644 ---- a/RepositoryExternal.mk -+++ b/RepositoryExternal.mk -@@ -617,7 +617,7 @@ endif # SYSTEM_HUNSPELL - - ifneq ($(SYSTEM_BOOST),) - --define gb_LinkTarget__use_boostdatetime -+define gb_LinkTarget__use_boost_lib - $(call gb_LinkTarget_set_include,$(1),\ - $$(INCLUDE) \ - $(BOOST_CPPFLAGS) \ -@@ -627,43 +627,24 @@ $(call gb_LinkTarget_add_ldflags,$(1),\ - $(BOOST_LDFLAGS) \ - ) - --$(call gb_LinkTarget_add_libs,$(1),\ -- $(BOOST_DATE_TIME_LIB) \ --) -+$(call gb_LinkTarget_add_libs,$(1),$(2)) - - endef - --define gb_LinkTarget__use_boost_iostreams --$(call gb_LinkTarget_set_include,$(1),\ -- $$(INCLUDE) \ -- $(BOOST_CPPFLAGS) \ --) -+define gb_LinkTarget__use_boostdatetime -+$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB)) - --$(call gb_LinkTarget_add_ldflags,$(1),\ -- $(BOOST_LDFLAGS) \ --) -+endef - --$(call gb_LinkTarget_add_libs,$(1),\ -- $(BOOST_IOSTREAMS_LIB) \ --) -+define gb_LinkTarget__use_boost_iostreams -+$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB)) - - endef - - gb_ExternalProject__use_boost_iostreams := - - define gb_LinkTarget__use_boost_system --$(call gb_LinkTarget_set_include,$(1),\ -- $$(INCLUDE) \ -- $(BOOST_CPPFLAGS) \ --) -- --$(call gb_LinkTarget_add_ldflags,$(1),\ -- $(BOOST_LDFLAGS) \ --) -- --$(call gb_LinkTarget_add_libs,$(1),\ -- $(BOOST_SYSTEM_LIB) \ --) -+$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_SYSTEM_LIB)) - - endef - -@@ -681,37 +662,29 @@ gb_ExternalProject__use_boost_headers:= - - else # !SYSTEM_BOOST - --ifeq ($(OS),WNT) --define gb_LinkTarget__use_boostthread -+define gb_LinkTarget__use_boost_lib - $(call gb_LinkTarget_add_defs,$(1),\ - -DBOOST_ALL_NO_LIB \ - ) - --$(call gb_LinkTarget_use_static_libraries,$(1),\ -- boostthread \ --) -+$(call gb_LinkTarget_use_static_libraries,$(1),$(2)) -+ -+endef -+ -+ifeq ($(OS),WNT) -+define gb_LinkTarget__use_boostthread -+$(call gb_LinkTarget__use_boost_lib,$(1),boostthread) -+ - endef - endif - - define gb_LinkTarget__use_boostdatetime --$(call gb_LinkTarget_add_defs,$(1),\ -- -DBOOST_ALL_NO_LIB \ --) -- --$(call gb_LinkTarget_use_static_libraries,$(1),\ -- boostdatetime \ --) -+$(call gb_LinkTarget__use_boost_lib,$(1),boostdatetime) - - endef - - define gb_LinkTarget__use_boost_filesystem --$(call gb_LinkTarget_add_defs,$(1),\ -- -DBOOST_ALL_NO_LIB \ --) -- --$(call gb_LinkTarget_use_static_libraries,$(1),\ -- boost_filesystem \ --) -+$(call gb_LinkTarget__use_boost_lib,$(1),boost_filesystem) - - endef - -@@ -720,13 +693,7 @@ $(call gb_ExternalProject_use_static_libraries,$(1),boost_filesystem) - endef - - define gb_LinkTarget__use_boost_iostreams --$(call gb_LinkTarget_add_defs,$(1),\ -- -DBOOST_ALL_NO_LIB \ --) -- --$(call gb_LinkTarget_use_static_libraries,$(1),\ -- boost_iostreams \ --) -+$(call gb_LinkTarget__use_boost_lib,$(1),boost_iostreams) - - endef - -@@ -735,13 +702,7 @@ $(call gb_ExternalProject_use_static_libraries,$(1),boost_iostreams) - endef - - define gb_LinkTarget__use_boost_system --$(call gb_LinkTarget_add_defs,$(1),\ -- -DBOOST_ALL_NO_LIB \ --) -- --$(call gb_LinkTarget_use_static_libraries,$(1),\ -- boost_system \ --) -+$(call gb_LinkTarget__use_boost_lib,$(1),boost_system) - - endef - --- -2.5.0 - diff --git a/0003-detect-Boost.Filesystem.patch b/0003-detect-Boost.Filesystem.patch deleted file mode 100644 index 0af4601..0000000 --- a/0003-detect-Boost.Filesystem.patch +++ /dev/null @@ -1,164 +0,0 @@ -From ed41a33ca22f46b123df4132d376247682af07af Mon Sep 17 00:00:00 2001 -From: David Tardon -Date: Tue, 8 Mar 2016 06:23:24 +0100 -Subject: [PATCH 3/4] detect Boost.Filesystem - -Change-Id: I86c268f49f44bd1e208a9de781a16bf19450c64c ---- - config_host.mk.in | 1 + - configure.ac | 1 + - m4/ax_boost_filesystem.m4 | 118 ++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 120 insertions(+) - create mode 100644 m4/ax_boost_filesystem.m4 - -diff --git a/config_host.mk.in b/config_host.mk.in -index 89081ca..0a2ec0b 100644 ---- a/config_host.mk.in -+++ b/config_host.mk.in -@@ -37,6 +37,7 @@ export BARCODE_EXTENSION_PACK=@BARCODE_EXTENSION_PACK@ - export BOOST_CPPFLAGS=@BOOST_CPPFLAGS@ - export BOOST_CXXFLAGS=@BOOST_CXXFLAGS@ - export BOOST_DATE_TIME_LIB=@BOOST_DATE_TIME_LIB@ -+export BOOST_FILESYSTEM_LIB=@BOOST_FILESYSTEM_LIB@ - export BOOST_IOSTREAMS_LIB=@BOOST_IOSTREAMS_LIB@ - export BOOST_LDFLAGS=@BOOST_LDFLAGS@ - export BOOST_SYSTEM_LIB=@BOOST_SYSTEM_LIB@ -diff --git a/configure.ac b/configure.ac -index dab1919..7b5cedd 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -8836,6 +8836,7 @@ if test "$with_system_boost" = "yes"; then - SYSTEM_BOOST=TRUE - AX_BOOST_BASE(1.47) - AX_BOOST_DATE_TIME -+ AX_BOOST_FILESYSTEM - AX_BOOST_IOSTREAMS - mingw_boost_date_time_dll=`echo $BOOST_DATE_TIME_LIB | sed -e 's/^-l//' -e 's/\.dll$//'` - libo_MINGW_TRY_DLL([$mingw_boost_date_time_dll]) -diff --git a/m4/ax_boost_filesystem.m4 b/m4/ax_boost_filesystem.m4 -new file mode 100644 -index 0000000..f162163 ---- /dev/null -+++ b/m4/ax_boost_filesystem.m4 -@@ -0,0 +1,118 @@ -+# =========================================================================== -+# http://www.gnu.org/software/autoconf-archive/ax_boost_filesystem.html -+# =========================================================================== -+# -+# SYNOPSIS -+# -+# AX_BOOST_FILESYSTEM -+# -+# DESCRIPTION -+# -+# Test for Filesystem library from the Boost C++ libraries. The macro -+# requires a preceding call to AX_BOOST_BASE. Further documentation is -+# available at . -+# -+# This macro calls: -+# -+# AC_SUBST(BOOST_FILESYSTEM_LIB) -+# -+# And sets: -+# -+# HAVE_BOOST_FILESYSTEM -+# -+# LICENSE -+# -+# Copyright (c) 2009 Thomas Porschberg -+# Copyright (c) 2009 Michael Tindal -+# Copyright (c) 2009 Roman Rybalko -+# -+# Copying and distribution of this file, with or without modification, are -+# permitted in any medium without royalty provided the copyright notice -+# and this notice are preserved. This file is offered as-is, without any -+# warranty. -+ -+#serial 26 -+ -+AC_DEFUN([AX_BOOST_FILESYSTEM], -+[ -+ AC_ARG_WITH([boost-filesystem], -+ AS_HELP_STRING([--with-boost-filesystem@<:@=special-lib@:>@], -+ [use the Filesystem library from boost - it is possible to specify a certain library for the linker -+ e.g. --with-boost-filesystem=boost_filesystem-gcc-mt ]), -+ [ -+ if test "$withval" = "no"; then -+ want_boost="no" -+ elif test "$withval" = "yes"; then -+ want_boost="yes" -+ ax_boost_user_filesystem_lib="" -+ else -+ want_boost="yes" -+ ax_boost_user_filesystem_lib="$withval" -+ fi -+ ], -+ [want_boost="yes"] -+ ) -+ -+ if test "x$want_boost" = "xyes"; then -+ AC_REQUIRE([AC_PROG_CC]) -+ CPPFLAGS_SAVED="$CPPFLAGS" -+ CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" -+ export CPPFLAGS -+ -+ LDFLAGS_SAVED="$LDFLAGS" -+ LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" -+ export LDFLAGS -+ -+ LIBS_SAVED=$LIBS -+ LIBS="$LIBS $BOOST_SYSTEM_LIB" -+ export LIBS -+ -+ AC_CACHE_CHECK(whether the Boost::Filesystem library is available, -+ ax_cv_boost_filesystem, -+ [AC_LANG_PUSH([C++]) -+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include ]], -+ [[using namespace boost::filesystem; -+ path my_path( "foo/bar/data.txt" ); -+ return 0;]])], -+ ax_cv_boost_filesystem=yes, ax_cv_boost_filesystem=no) -+ AC_LANG_POP([C++]) -+ ]) -+ if test "x$ax_cv_boost_filesystem" = "xyes"; then -+ AC_DEFINE(HAVE_BOOST_FILESYSTEM,,[define if the Boost::Filesystem library is available]) -+ BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` -+ if test "x$ax_boost_user_filesystem_lib" = "x"; then -+ for libextension in `ls -r $BOOSTLIBDIR/libboost_filesystem* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do -+ ax_lib=${libextension} -+ AC_CHECK_LIB($ax_lib, exit, -+ [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break], -+ [link_filesystem="no"]) -+ done -+ if test "x$link_filesystem" != "xyes"; then -+ for libextension in `ls -r $BOOSTLIBDIR/boost_filesystem* 2>/dev/null | sed 's,.*/,,' | sed -e 's,\..*,,'` ; do -+ ax_lib=${libextension} -+ AC_CHECK_LIB($ax_lib, exit, -+ [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break], -+ [link_filesystem="no"]) -+ done -+ fi -+ else -+ for ax_lib in $ax_boost_user_filesystem_lib boost_filesystem-$ax_boost_user_filesystem_lib; do -+ AC_CHECK_LIB($ax_lib, exit, -+ [BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break], -+ [link_filesystem="no"]) -+ done -+ -+ fi -+ if test "x$ax_lib" = "x"; then -+ AC_MSG_ERROR(Could not find a version of the library!) -+ fi -+ if test "x$link_filesystem" != "xyes"; then -+ AC_MSG_ERROR(Could not link against $ax_lib !) -+ fi -+ fi -+ -+ CPPFLAGS="$CPPFLAGS_SAVED" -+ LDFLAGS="$LDFLAGS_SAVED" -+ LIBS="$LIBS_SAVED" -+ fi -+]) --- -2.5.0 - diff --git a/0003-gtk3-vcl-popups-flush-any-unexecuted-Select-events-o.patch b/0003-gtk3-vcl-popups-flush-any-unexecuted-Select-events-o.patch deleted file mode 100644 index 62bda65..0000000 --- a/0003-gtk3-vcl-popups-flush-any-unexecuted-Select-events-o.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 67d1d0061c1cf5bb8aba0de75776435150c8559e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Tue, 23 Feb 2016 14:42:29 +0000 -Subject: [PATCH 3/8] gtk3: vcl popups flush any unexecuted Select events on - popdown - -so if the gtksalmenu integration wants to drive popups by setting a selection -on the vcl popup, then the same flush is needed after ShowNativePopupMenu - -(cherry picked from commit 3cb62eacae001df546c2a8f39ae4d37c33791d0b) - -Change-Id: I59be60de5742d1e382cabefcbf0d8cdd5fc30b00 ---- - include/vcl/menu.hxx | 1 + - vcl/source/window/menu.cxx | 24 +++++++++++++++--------- - 2 files changed, 16 insertions(+), 9 deletions(-) - -diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx -index 1dbd85e..f10141b 100644 ---- a/include/vcl/menu.hxx -+++ b/include/vcl/menu.hxx -@@ -515,6 +515,7 @@ private: - - protected: - SAL_DLLPRIVATE sal_uInt16 ImplExecute( vcl::Window* pWindow, const Rectangle& rRect, FloatWinPopupFlags nPopupFlags, Menu* pStaredFrom, bool bPreSelectFirst ); -+ SAL_DLLPRIVATE void ImplFlushPendingSelect(); - SAL_DLLPRIVATE long ImplCalcHeight( sal_uInt16 nEntries ) const; - SAL_DLLPRIVATE sal_uInt16 ImplCalcVisEntries( long nMaxHeight, sal_uInt16 nStartEntry = 0, sal_uInt16* pLastVisible = nullptr ) const; - -diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx -index 999085e..b753fac 100644 ---- a/vcl/source/window/menu.cxx -+++ b/vcl/source/window/menu.cxx -@@ -2933,6 +2933,19 @@ sal_uInt16 PopupMenu::Execute( vcl::Window* pExecWindow, const Rectangle& rRect, - return ImplExecute( pExecWindow, rRect, nPopupModeFlags, nullptr, false ); - } - -+void PopupMenu::ImplFlushPendingSelect() -+{ -+ // is there still Select? -+ Menu* pSelect = ImplFindSelectMenu(); -+ if (pSelect) -+ { -+ // Select should be called prior to leaving execute in a popup menu! -+ Application::RemoveUserEvent( pSelect->nEventId ); -+ pSelect->nEventId = nullptr; -+ pSelect->Select(); -+ } -+} -+ - sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, FloatWinPopupFlags nPopupModeFlags, Menu* pSFrom, bool bPreSelectFirst ) - { - if ( !pSFrom && ( PopupMenu::IsInExecute() || !GetItemCount() ) ) -@@ -3097,6 +3110,7 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, Floa - SalMenu* pMenu = ImplGetSalMenu(); - if( pMenu && bRealExecute && pMenu->ShowNativePopupMenu( pWin, aRect, nPopupModeFlags | FloatWinPopupFlags::GrabFocus ) ) - { -+ ImplFlushPendingSelect(); - pWin->StopExecute(); - pWin->doShutdown(); - pWindow->doLazyDelete(); -@@ -3180,15 +3194,7 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, Floa - pWindow->doLazyDelete(); - pWindow = nullptr; - -- // is there still Select? -- Menu* pSelect = ImplFindSelectMenu(); -- if ( pSelect ) -- { -- // Select should be called prior to leaving execute in a popup menu! -- Application::RemoveUserEvent( pSelect->nEventId ); -- pSelect->nEventId = nullptr; -- pSelect->Select(); -- } -+ ImplFlushPendingSelect(); - } - - return bRealExecute ? nSelectedId : 0; --- -2.7.1 - diff --git a/0003-gtk3-wayland-start-floating-windows-hidden.patch b/0003-gtk3-wayland-start-floating-windows-hidden.patch deleted file mode 100644 index 94af791..0000000 --- a/0003-gtk3-wayland-start-floating-windows-hidden.patch +++ /dev/null @@ -1,56 +0,0 @@ -From dab2582f05979cd99a5937cb95a387cfed70bb8d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Wed, 16 Dec 2015 14:18:11 +0000 -Subject: [PATCH 3/3] gtk3+wayland: start floating windows hidden - -once they are visible we can't move them under wayland, so -start then hidden, move them and then show - -these floating windows are very delicate. - -Change-Id: Ia233c23f25cec453df79ef70cab6210dbdd280a0 ---- - sfx2/uiconfig/ui/floatingrecord.ui | 1 - - svx/uiconfig/ui/colorwindow.ui | 1 - - svx/uiconfig/ui/floatingundoredo.ui | 1 - - 3 files changed, 3 deletions(-) - -diff --git a/sfx2/uiconfig/ui/floatingrecord.ui b/sfx2/uiconfig/ui/floatingrecord.ui -index 653867a..9136b38 100644 ---- a/sfx2/uiconfig/ui/floatingrecord.ui -+++ b/sfx2/uiconfig/ui/floatingrecord.ui -@@ -3,7 +3,6 @@ - - - -- True - False - True - 6 -diff --git a/svx/uiconfig/ui/colorwindow.ui b/svx/uiconfig/ui/colorwindow.ui -index 71cda63..9482562 100644 ---- a/svx/uiconfig/ui/colorwindow.ui -+++ b/svx/uiconfig/ui/colorwindow.ui -@@ -17,7 +17,6 @@ - 1 - - -- True - False - True - True -diff --git a/svx/uiconfig/ui/floatingundoredo.ui b/svx/uiconfig/ui/floatingundoredo.ui -index 10491f8..66f30a6 100644 ---- a/svx/uiconfig/ui/floatingundoredo.ui -+++ b/svx/uiconfig/ui/floatingundoredo.ui -@@ -3,7 +3,6 @@ - - - -- True - False - True - True --- -2.5.0 - diff --git a/0004-define-boost_filestystem-external-for-system-boost-t.patch b/0004-define-boost_filestystem-external-for-system-boost-t.patch deleted file mode 100644 index 5897665..0000000 --- a/0004-define-boost_filestystem-external-for-system-boost-t.patch +++ /dev/null @@ -1,31 +0,0 @@ -From b4339fa7eee12f173b2273aed5dc6b8abae528f4 Mon Sep 17 00:00:00 2001 -From: David Tardon -Date: Tue, 8 Mar 2016 06:08:36 +0100 -Subject: [PATCH 4/4] define boost_filestystem external for system boost too - -Change-Id: Ie9bfc6a5f3e1862acbd1bb08c6f2bb0b63f2587e ---- - RepositoryExternal.mk | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk -index 58f924d..ca7cdf8 100644 ---- a/RepositoryExternal.mk -+++ b/RepositoryExternal.mk -@@ -636,6 +636,13 @@ $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_DATE_TIME_LIB)) - - endef - -+define gb_LinkTarget__use_boost_filesystem -+$(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_FILESYSTEM_LIB)) -+ -+endef -+ -+gb_ExternalProject__use_boost_filesystem := -+ - define gb_LinkTarget__use_boost_iostreams - $(call gb_LinkTarget__use_boost_lib,$(1),$(BOOST_IOSTREAMS_LIB)) - --- -2.5.0 - diff --git a/0004-gtk3-replace-old-action-if-same-command-is-added.patch b/0004-gtk3-replace-old-action-if-same-command-is-added.patch deleted file mode 100644 index d0537d7..0000000 --- a/0004-gtk3-replace-old-action-if-same-command-is-added.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 1d40ccd2f55173f954e596ce59bc4307eceae453 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Wed, 24 Feb 2016 10:40:10 +0000 -Subject: [PATCH 4/8] gtk3: replace old action if same command is added - -i.e. originally we preferred the old action, now -prefer the new action because e.g. wrap items in -writer only contain their "checkable" state on -their update - -Change-Id: I6a6ce94126253396cc273834a7e8a4fb0a56921d -(cherry picked from commit 36bddcbaa2d1673c1331c788eae9534aca2c5ec3) ---- - vcl/unx/gtk/gtksalmenu.cxx | 45 +++++++++++++++++++++++---------------------- - 1 file changed, 23 insertions(+), 22 deletions(-) - -diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx -index 6887ade..a9a0932 100644 ---- a/vcl/unx/gtk/gtksalmenu.cxx -+++ b/vcl/unx/gtk/gtksalmenu.cxx -@@ -530,30 +530,31 @@ void GtkSalMenu::NativeSetItemCommand( unsigned nSection, - - GVariant *pTarget = nullptr; - -- if ( g_action_group_has_action( mpActionGroup, aCommand ) == FALSE ) { -- if ( ( nBits & MenuItemBits::CHECKABLE ) || bIsSubmenu ) -- { -- // Item is a checkmark button. -- GVariantType* pStateType = g_variant_type_new( reinterpret_cast(G_VARIANT_TYPE_BOOLEAN) ); -- GVariant* pState = g_variant_new_boolean( bChecked ); -+ if (g_action_group_has_action(mpActionGroup, aCommand)) -+ g_lo_action_group_remove(pActionGroup, aCommand); - -- g_lo_action_group_insert_stateful( pActionGroup, aCommand, nId, bIsSubmenu, nullptr, pStateType, nullptr, pState ); -- } -- else if ( nBits & MenuItemBits::RADIOCHECK ) -- { -- // Item is a radio button. -- GVariantType* pParameterType = g_variant_type_new( reinterpret_cast(G_VARIANT_TYPE_STRING) ); -- GVariantType* pStateType = g_variant_type_new( reinterpret_cast(G_VARIANT_TYPE_STRING) ); -- GVariant* pState = g_variant_new_string( "" ); -- pTarget = g_variant_new_string( aCommand ); -+ if ( ( nBits & MenuItemBits::CHECKABLE ) || bIsSubmenu ) -+ { -+ // Item is a checkmark button. -+ GVariantType* pStateType = g_variant_type_new( reinterpret_cast(G_VARIANT_TYPE_BOOLEAN) ); -+ GVariant* pState = g_variant_new_boolean( bChecked ); - -- g_lo_action_group_insert_stateful( pActionGroup, aCommand, nId, FALSE, pParameterType, pStateType, nullptr, pState ); -- } -- else -- { -- // Item is not special, so insert a stateless action. -- g_lo_action_group_insert( pActionGroup, aCommand, nId, FALSE ); -- } -+ g_lo_action_group_insert_stateful( pActionGroup, aCommand, nId, bIsSubmenu, nullptr, pStateType, nullptr, pState ); -+ } -+ else if ( nBits & MenuItemBits::RADIOCHECK ) -+ { -+ // Item is a radio button. -+ GVariantType* pParameterType = g_variant_type_new( reinterpret_cast(G_VARIANT_TYPE_STRING) ); -+ GVariantType* pStateType = g_variant_type_new( reinterpret_cast(G_VARIANT_TYPE_STRING) ); -+ GVariant* pState = g_variant_new_string( "" ); -+ pTarget = g_variant_new_string( aCommand ); -+ -+ g_lo_action_group_insert_stateful( pActionGroup, aCommand, nId, FALSE, pParameterType, pStateType, nullptr, pState ); -+ } -+ else -+ { -+ // Item is not special, so insert a stateless action. -+ g_lo_action_group_insert( pActionGroup, aCommand, nId, FALSE ); - } - - GLOMenu* pMenu = G_LO_MENU( mpMenuModel ); --- -2.7.1 - diff --git a/0005-gtk3-handle-items-without-commands.patch b/0005-gtk3-handle-items-without-commands.patch deleted file mode 100644 index d7b22f5..0000000 --- a/0005-gtk3-handle-items-without-commands.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 33d05b5ca87d1ddb76fef373a92833d07c00cb15 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Wed, 24 Feb 2016 12:19:49 +0000 -Subject: [PATCH 5/8] gtk3: handle items without commands - -e.g. the draw/impress context menus. Handle these like -MenuManager::Activate does - -Change-Id: I02a0e377a2d3a57ac7ac9239aaa75dbb856489d2 -(cherry picked from commit b8ee342576b707dbffe877f5c225b640ee65276d) ---- - vcl/unx/gtk/gtksalmenu.cxx | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx -index a9a0932..346e42d 100644 ---- a/vcl/unx/gtk/gtksalmenu.cxx -+++ b/vcl/unx/gtk/gtksalmenu.cxx -@@ -52,7 +52,9 @@ static gchar* GetCommandForItem( GtkSalMenuItem* pSalMenuItem, gchar* aCurrentCo - if ( !pMenu ) - return nullptr; - -- OUString aMenuCommand = pMenu->GetItemCommand( nId ); -+ OUString aMenuCommand = pMenu->GetItemCommand(nId); -+ if (aMenuCommand.isEmpty()) -+ aMenuCommand = "slot:" + OUString::number(nId); - gchar* aCommandStr = g_strdup( OUStringToOString( aMenuCommand, RTL_TEXTENCODING_UTF8 ).getStr() ); - aCommand = g_strdup( aCommandStr ); - --- -2.7.1 - diff --git a/0006-mark-checkable-toolbox-menu-entries-as-checkable.patch b/0006-mark-checkable-toolbox-menu-entries-as-checkable.patch deleted file mode 100644 index bb422f3..0000000 --- a/0006-mark-checkable-toolbox-menu-entries-as-checkable.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 7dc5977edb7e34aed68aeb68846dee227f1a32de Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Wed, 24 Feb 2016 13:02:40 +0000 -Subject: [PATCH 6/8] mark checkable toolbox menu entries as checkable - -e.g. the toplevel toolbars put excess entries in -menus. If the entry is not marked as checkable then -a native gtk menu entry will appear to be stateless -when it actually does have a toggle state - -Change-Id: I7168b44d59fd64dfe264ed8ca26355252d697251 -(cherry picked from commit 13917e0755bb864f22d0cf75a43854acbdb1eaec) ---- - vcl/source/window/toolbox2.cxx | 20 ++++++++++++++++++-- - 1 file changed, 18 insertions(+), 2 deletions(-) - -diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx -index 0c916f6..663b7d6 100644 ---- a/vcl/source/window/toolbox2.cxx -+++ b/vcl/source/window/toolbox2.cxx -@@ -1791,6 +1791,20 @@ bool ToolBox::ImplHasClippedItems() - return false; - } - -+namespace -+{ -+ MenuItemBits ConvertBitsFromToolBoxToMenu(ToolBoxItemBits nToolItemBits) -+ { -+ MenuItemBits nMenuItemBits = MenuItemBits::NONE; -+ if ((nToolItemBits & ToolBoxItemBits::CHECKABLE) || -+ (nToolItemBits & ToolBoxItemBits::DROPDOWN)) -+ { -+ nMenuItemBits |= MenuItemBits::CHECKABLE; -+ } -+ return nMenuItemBits; -+ } -+} -+ - void ToolBox::UpdateCustomMenu() - { - // fill clipped items into menu -@@ -1826,7 +1840,8 @@ void ToolBox::UpdateCustomMenu() - if( it->IsClipped() ) - { - sal_uInt16 id = it->mnId + TOOLBOX_MENUITEM_START; -- pMenu->InsertItem( id, it->maText, it->maImageOriginal, MenuItemBits::NONE, OString()); -+ MenuItemBits nMenuItemBits = ConvertBitsFromToolBoxToMenu(it->mnBits); -+ pMenu->InsertItem( id, it->maText, it->maImageOriginal, nMenuItemBits, OString()); - pMenu->SetItemCommand( id, it->maCommandStr ); - pMenu->EnableItem( id, it->mbEnabled ); - pMenu->CheckItem ( id, it->meState == TRISTATE_TRUE ); -@@ -1843,7 +1858,8 @@ void ToolBox::UpdateCustomMenu() - if( it->IsItemHidden() ) - { - sal_uInt16 id = it->mnId + TOOLBOX_MENUITEM_START; -- pMenu->InsertItem( id, it->maText, it->maImageOriginal, MenuItemBits::NONE, OString() ); -+ MenuItemBits nMenuItemBits = ConvertBitsFromToolBoxToMenu(it->mnBits); -+ pMenu->InsertItem( id, it->maText, it->maImageOriginal, nMenuItemBits, OString() ); - pMenu->SetItemCommand( id, it->maCommandStr ); - pMenu->EnableItem( id, it->mbEnabled ); - pMenu->CheckItem( id, it->meState == TRISTATE_TRUE ); --- -2.7.1 - diff --git a/0007-set-gtk-layout-direction-to-match-ours.patch b/0007-set-gtk-layout-direction-to-match-ours.patch deleted file mode 100644 index c74771b..0000000 --- a/0007-set-gtk-layout-direction-to-match-ours.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 205dd9979f77c709cf36b92da1836ce5374879ab Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Wed, 24 Feb 2016 15:24:53 +0000 -Subject: [PATCH 7/8] set gtk layout direction to match ours - -Change-Id: I27610f28f42368355bef1b3461fc3ccea1b07218 -(cherry picked from commit b50071c817657866f8b22873be26d34970005a2d) ---- - vcl/unx/gtk/gtkdata.cxx | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/vcl/unx/gtk/gtkdata.cxx b/vcl/unx/gtk/gtkdata.cxx -index 9ea6dc9..f15cce2 100644 ---- a/vcl/unx/gtk/gtkdata.cxx -+++ b/vcl/unx/gtk/gtkdata.cxx -@@ -110,6 +110,7 @@ GtkSalDisplay::GtkSalDisplay( GdkDisplay* pDisplay ) : - #endif - #endif - -+ gtk_widget_set_default_direction(AllSettings::GetLayoutRTL() ? GTK_TEXT_DIR_RTL : GTK_TEXT_DIR_LTR); - } - - GtkSalDisplay::~GtkSalDisplay() --- -2.7.1 - diff --git a/0008-gtk3-implement-native-context-menus.patch b/0008-gtk3-implement-native-context-menus.patch deleted file mode 100644 index a4ff7b6..0000000 --- a/0008-gtk3-implement-native-context-menus.patch +++ /dev/null @@ -1,552 +0,0 @@ -From b265bcddde36bea2f5b31ce5df407301cbfe82b5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Tue, 23 Feb 2016 15:57:11 +0000 -Subject: [PATCH 8/8] gtk3: implement native context menus - -This reuses lots of the unity machinery which is similar -to the mac concept of a single toplevel menubar. - -So to drive popup menus, part of this is a rework that does away with the idea -that the "menubar" is the controller of the hierarchy, and instead the top -element becomes the controller - -Change-Id: I4336391718844bc73cfc47c1043f99f0e3b812d8 -(cherry picked from commit a0c700b1493c7b51540d1e77b44d1edd9bf920f0) ---- - vcl/inc/unx/gtk/gloactiongroup.h | 3 + - vcl/inc/unx/gtk/gtksalmenu.hxx | 9 +- - vcl/unx/gtk/gloactiongroup.cxx | 43 ++++---- - vcl/unx/gtk/gtksalmenu.cxx | 228 +++++++++++++++++++++++++++++---------- - 4 files changed, 203 insertions(+), 80 deletions(-) - -diff --git a/vcl/inc/unx/gtk/gloactiongroup.h b/vcl/inc/unx/gtk/gloactiongroup.h -index 080b679..ec6bd39 100644 ---- a/vcl/inc/unx/gtk/gloactiongroup.h -+++ b/vcl/inc/unx/gtk/gloactiongroup.h -@@ -46,6 +46,9 @@ GType g_lo_action_group_get_type (void) G_GNUC_CONST; - - GLOActionGroup * g_lo_action_group_new (gpointer frame); - -+void g_lo_action_group_set_top_menu (GLOActionGroup *group, -+ gpointer top_menu); -+ - void g_lo_action_group_insert (GLOActionGroup *group, - const gchar *action_name, - gint item_id, -diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx -index 1d58b7a..d95d25c 100644 ---- a/vcl/inc/unx/gtk/gtksalmenu.hxx -+++ b/vcl/inc/unx/gtk/gtksalmenu.hxx -@@ -43,16 +43,17 @@ private: - std::vector< GtkSalMenuItem* > maItems; - - bool mbMenuBar; -+ bool mbMenuVisibility; - Menu* mpVCLMenu; - GtkSalMenu* mpParentSalMenu; -- const GtkSalFrame* mpFrame; -+ GtkSalFrame* mpFrame; - - // GMenuModel and GActionGroup attributes - GMenuModel* mpMenuModel; - GActionGroup* mpActionGroup; - - GtkSalMenu* GetMenuForItemCommand( gchar* aCommand, int& rDupsToSkip, gboolean bGetSubmenu ); -- void ImplUpdate( gboolean bRecurse ); -+ void ImplUpdate(bool bRecurse, bool bRemoveDisabledEntries); - void ActivateAllSubmenus(Menu* pMenuBar); - - public: -@@ -77,7 +78,7 @@ public: - - void SetMenu( Menu* pMenu ) { mpVCLMenu = pMenu; } - Menu* GetMenu() { return mpVCLMenu; } -- void SetMenuModel( GMenuModel* pMenuModel ) { mpMenuModel = pMenuModel; } -+ void SetMenuModel(GMenuModel* pMenuModel); - unsigned GetItemCount() { return maItems.size(); } - GtkSalMenuItem* GetItemAtPos( unsigned nPos ) { return maItems[ nPos ]; } - void SetActionGroup( GActionGroup* pActionGroup ) { mpActionGroup = pActionGroup; } -@@ -102,6 +103,8 @@ public: - bool PrepUpdate(); - virtual void Update() override; // Update this menu only. - void UpdateFull(); // Update full menu hierarchy from this menu. -+ -+ virtual bool ShowNativePopupMenu(FloatingWindow * pWin, const Rectangle& rRect, FloatWinPopupFlags nFlags) override; - }; - - class GtkSalMenuItem : public SalMenuItem -diff --git a/vcl/unx/gtk/gloactiongroup.cxx b/vcl/unx/gtk/gloactiongroup.cxx -index e710809..110e0dc 100644 ---- a/vcl/unx/gtk/gloactiongroup.cxx -+++ b/vcl/unx/gtk/gloactiongroup.cxx -@@ -100,8 +100,9 @@ g_lo_action_class_init (GLOActionClass *klass) - - struct _GLOActionGroupPrivate - { -- GHashTable *table; /* string -> GLOAction */ -- GtkSalFrame *frame; /* Frame to which GActionGroup is associated. */ -+ GHashTable *table; /* string -> GLOAction */ -+ GtkSalFrame *frame; /* Frame to which GActionGroup is associated. */ -+ GtkSalMenu *topmenu; /* TopLevel Menu to which GActionGroup is associated. */ - }; - - static void g_lo_action_group_iface_init (GActionGroupInterface *); -@@ -187,13 +188,7 @@ g_lo_action_group_perform_submenu_action (GLOActionGroup *group, - GVariant *state) - { - -- GtkSalFrame* pFrame = group->priv->frame; -- SAL_INFO("vcl.unity", "g_lo_action_group_perform_submenu_action on " << group << " for frame " << pFrame); -- -- if (pFrame == nullptr) -- return; -- -- GtkSalMenu* pSalMenu = static_cast (pFrame->GetMenu()); -+ GtkSalMenu* pSalMenu = group->priv->topmenu; - SAL_INFO("vcl.unity", "g_lo_action_group_perform_submenu_action on " << group << " for menu " << pSalMenu); - - if (pSalMenu != nullptr) { -@@ -263,23 +258,18 @@ g_lo_action_group_activate (GActionGroup *group, - GVariant *parameter) - { - GLOActionGroup *lo_group = G_LO_ACTION_GROUP (group); -- GtkSalFrame *pFrame = lo_group->priv->frame; -- SAL_INFO("vcl.unity", "g_lo_action_group_activate on group " << group << " for frame " << pFrame << " with parameter " << parameter); -+ GtkSalMenu* pSalMenu = lo_group->priv->topmenu; - - if ( parameter != nullptr ) - g_action_group_change_action_state( group, action_name, parameter ); - -- if ( pFrame != nullptr ) -- { -- GtkSalMenu* pSalMenu = static_cast< GtkSalMenu* >( pFrame->GetMenu() ); -- SAL_INFO("vcl.unity", "g_lo_action_group_activate for menu " << pSalMenu); -+ SAL_INFO("vcl.unity", "g_lo_action_group_activate for menu " << pSalMenu); - -- if ( pSalMenu != nullptr ) -- { -- GLOAction* action = G_LO_ACTION (g_hash_table_lookup (lo_group->priv->table, action_name)); -- SAL_INFO("vcl.unity", "g_lo_action_group_activate dispatching action " << action << " named " << action_name << " on menu " << pSalMenu); -- pSalMenu->DispatchCommand( action->item_id, action_name ); -- } -+ if ( pSalMenu != nullptr ) -+ { -+ GLOAction* action = G_LO_ACTION (g_hash_table_lookup (lo_group->priv->table, action_name)); -+ SAL_INFO("vcl.unity", "g_lo_action_group_activate dispatching action " << action << " named " << action_name << " on menu " << pSalMenu); -+ pSalMenu->DispatchCommand( action->item_id, action_name ); - } - } - -@@ -355,6 +345,17 @@ g_lo_action_group_init (GLOActionGroup *group) - group->priv->table = g_hash_table_new_full (g_str_hash, g_str_equal, - g_free, g_object_unref); - group->priv->frame = nullptr; -+ group->priv->topmenu = nullptr; -+} -+ -+void -+g_lo_action_group_set_top_menu (GLOActionGroup *group, -+ gpointer top_menu) -+{ -+ group->priv = G_TYPE_INSTANCE_GET_PRIVATE (group, -+ G_TYPE_LO_ACTION_GROUP, -+ GLOActionGroupPrivate); -+ group->priv->topmenu = static_cast(top_menu); - } - - static void -diff --git a/vcl/unx/gtk/gtksalmenu.cxx b/vcl/unx/gtk/gtksalmenu.cxx -index 346e42d..7bc9232 100644 ---- a/vcl/unx/gtk/gtksalmenu.cxx -+++ b/vcl/unx/gtk/gtksalmenu.cxx -@@ -16,6 +16,7 @@ - #include - #include - #include -+#include - #include - #include - -@@ -24,6 +25,7 @@ - #endif - - #include -+#include - - // FIXME Copied from framework/inc/framework/menuconfiguration.hxx to - // avoid circular dependency between modules. It should be in a common -@@ -31,8 +33,6 @@ - const sal_uInt16 START_ITEMID_WINDOWLIST = 4600; - const sal_uInt16 END_ITEMID_WINDOWLIST = 4699; - --static bool bMenuVisibility = false; -- - /* - * This function generates the proper command name for all actions, including - * duplicated or special ones. -@@ -77,20 +77,17 @@ static gchar* GetCommandForItem( GtkSalMenuItem* pSalMenuItem, gchar* aCurrentCo - - bool GtkSalMenu::PrepUpdate() - { -- const GtkSalFrame* pFrame = GetFrame(); -- if (pFrame) -- { -- GtkSalFrame* pNonConstFrame = const_cast(pFrame); -- GtkSalMenu* pSalMenu = this; -- -- if ( !pNonConstFrame->GetMenu() ) -- pNonConstFrame->SetMenu( pSalMenu ); -+ bool bMenuVisibility; - -- if ( bMenuVisibility && mpMenuModel && mpActionGroup ) -- return true; -- } -+ //get top level visibility -+ const GtkSalMenu* pMenu = this; -+ do -+ { -+ bMenuVisibility = pMenu->mbMenuVisibility; -+ pMenu = pMenu->mpParentSalMenu; -+ } while (pMenu); - -- return false; -+ return bMenuVisibility && mpMenuModel && mpActionGroup; - } - - /* -@@ -114,14 +111,58 @@ void RemoveSpareItemsFromNativeMenu( GLOMenu* pMenu, GList** pOldCommandList, un - } - } - --void RemoveSpareSectionsFromNativeMenu( GLOMenu* pMenu, GList** pOldCommandList, unsigned nLastSection ) -+void RemoveDisabledItemsFromNativeMenu(GLOMenu* pMenu, GList** pOldCommandList, -+ sal_Int32 nSection, GActionGroup* pActionGroup) -+{ -+ while (nSection >= 0) -+ { -+ sal_Int32 nSectionItems = g_lo_menu_get_n_items_from_section( pMenu, nSection ); -+ while (nSectionItems--) -+ { -+ gchar* pCommand = g_lo_menu_get_command_from_item_in_section(pMenu, nSection, nSectionItems); -+ // remove disabled entries -+ bool bRemove = g_action_group_get_action_enabled(pActionGroup, pCommand) == false; -+ if (!bRemove) -+ { -+ //also remove any empty submenus -+ GLOMenu* pSubMenuModel = g_lo_menu_get_submenu_from_item_in_section(pMenu, nSection, nSectionItems); -+ if (pSubMenuModel) -+ { -+ gint nSubMenuSections = g_menu_model_get_n_items(G_MENU_MODEL(pSubMenuModel)); -+ bRemove = (nSubMenuSections == 0 || -+ (nSubMenuSections == 1 && g_lo_menu_get_n_items_from_section(pSubMenuModel, 0) == 0)); -+ } -+ } -+ -+ if (bRemove) -+ { -+ //but tdf#86850 Always display clipboard functions -+ bRemove = g_strcmp0(pCommand, ".uno:Cut") && -+ g_strcmp0(pCommand, ".uno:Copy") && -+ g_strcmp0(pCommand, ".uno:Paste"); -+ } -+ -+ if (bRemove) -+ { -+ if (pCommand != nullptr && pOldCommandList != nullptr) -+ *pOldCommandList = g_list_append(*pOldCommandList, g_strdup(pCommand)); -+ g_lo_menu_remove_from_section(pMenu, nSection, nSectionItems); -+ } -+ -+ g_free(pCommand); -+ } -+ --nSection; -+ } -+} -+ -+void RemoveSpareSectionsFromNativeMenu( GLOMenu* pMenu, GList** pOldCommandList, sal_Int32 nLastSection ) - { - if ( pMenu == nullptr || pOldCommandList == nullptr ) - return; - - sal_Int32 n = g_menu_model_get_n_items( G_MENU_MODEL( pMenu ) ) - 1; - -- for ( ; n > (sal_Int32) nLastSection; n-- ) -+ for ( ; n > nLastSection; n--) - { - RemoveSpareItemsFromNativeMenu( pMenu, pOldCommandList, n, 0 ); - g_lo_menu_remove( pMenu, n ); -@@ -173,7 +214,7 @@ void RemoveUnusedCommands( GLOActionGroup* pActionGroup, GList* pOldCommandList, - } - } - --void GtkSalMenu::ImplUpdate( gboolean bRecurse ) -+void GtkSalMenu::ImplUpdate(bool bRecurse, bool bRemoveDisabledEntries) - { - SolarMutexGuard aGuard; - -@@ -277,7 +318,7 @@ void GtkSalMenu::ImplUpdate( gboolean bRecurse ) - SAL_INFO("vcl.unity", "preparing submenu " << pSubMenuModel << " to menu model " << G_MENU_MODEL(pSubMenuModel) << " and action group " << G_ACTION_GROUP(pActionGroup)); - pSubmenu->SetMenuModel( G_MENU_MODEL( pSubMenuModel ) ); - pSubmenu->SetActionGroup( G_ACTION_GROUP( pActionGroup ) ); -- pSubmenu->ImplUpdate( bRecurse ); -+ pSubmenu->ImplUpdate(bRecurse, bRemoveDisabledEntries); - } - } - -@@ -287,6 +328,12 @@ void GtkSalMenu::ImplUpdate( gboolean bRecurse ) - ++validItems; - } - -+ if (bRemoveDisabledEntries) -+ { -+ // Delete disabled items in last section. -+ RemoveDisabledItemsFromNativeMenu(pLOMenu, &pOldCommandList, nSection, G_ACTION_GROUP(pActionGroup)); -+ } -+ - // Delete extra items in last section. - RemoveSpareItemsFromNativeMenu( pLOMenu, &pOldCommandList, nSection, validItems ); - -@@ -299,12 +346,89 @@ void GtkSalMenu::ImplUpdate( gboolean bRecurse ) - - void GtkSalMenu::Update() - { -- ImplUpdate( FALSE ); -+ //find out if top level is a menubar or not, if not, then its a popup menu -+ //hierarchy and in those we hide (most) disabled entries -+ const GtkSalMenu* pMenu = this; -+ while (pMenu->mpParentSalMenu) -+ pMenu = pMenu->mpParentSalMenu; -+ ImplUpdate(false, !pMenu->mbMenuBar); - } - - void GtkSalMenu::UpdateFull() - { -- ImplUpdate( TRUE ); -+ //find out if top level is a menubar or not, if not, then its a popup menu -+ //hierarchy and in those we hide (most) disabled entries -+ const GtkSalMenu* pMenu = this; -+ while (pMenu->mpParentSalMenu) -+ pMenu = pMenu->mpParentSalMenu; -+ ImplUpdate(true, !pMenu->mbMenuBar); -+} -+ -+bool GtkSalMenu::ShowNativePopupMenu(FloatingWindow* pWin, const Rectangle& /*rRect*/, -+ FloatWinPopupFlags /*nFlags*/) -+{ -+#if GTK_CHECK_VERSION(3,0,0) -+ guint nButton; -+ guint32 nTime; -+ -+ //typically there is an event, and we can then distinguish if this was -+ //launched from the keyboard (gets auto-mnemoniced) or the mouse (which -+ //doesn't) -+ GdkEvent *pEvent = gtk_get_current_event(); -+ if (pEvent) -+ { -+ gdk_event_get_button(pEvent, &nButton); -+ nTime = gdk_event_get_time(pEvent); -+ } -+ else -+ { -+ nButton = 0; -+ nTime = gtk_get_current_event_time(); -+ } -+ -+ Display(true); -+ -+ mpFrame = static_cast(pWin->ImplGetWindowImpl()->mpRealParent->ImplGetFrame()); -+ -+ GLOActionGroup* pActionGroup = g_lo_action_group_new(static_cast(mpFrame)); -+ g_lo_action_group_set_top_menu(pActionGroup, static_cast(this)); -+ -+ mpActionGroup = G_ACTION_GROUP(pActionGroup); -+ mpMenuModel = G_MENU_MODEL(g_lo_menu_new()); -+ // Generate the main menu structure, populates mpMenuModel -+ UpdateFull(); -+ -+ GtkWidget *pWidget = gtk_menu_new_from_model(mpMenuModel); -+ gtk_menu_attach_to_widget(GTK_MENU(pWidget), mpFrame->getMouseEventWidget(), nullptr); -+ -+ gtk_widget_insert_action_group(mpFrame->getMouseEventWidget(), "win", mpActionGroup); -+ -+ //run in a sub main loop because we need to keep vcl PopupMenu alive to use -+ //it during DispatchCommand, returning now to the outer loop causes the -+ //launching PopupMenu to be destroyed, instead run the subloop here -+ //until the gtk menu is destroyed -+ GMainLoop* pLoop = g_main_loop_new(nullptr, true); -+ g_signal_connect_swapped(G_OBJECT(pWidget), "deactivate", G_CALLBACK(g_main_loop_quit), pLoop); -+ gtk_menu_popup(GTK_MENU(pWidget), nullptr, nullptr, nullptr, nullptr, nButton, nTime); -+ if (g_main_loop_is_running(pLoop)) -+ { -+ gdk_threads_leave(); -+ g_main_loop_run(pLoop); -+ gdk_threads_enter(); -+ } -+ g_main_loop_unref(pLoop); -+ -+ gtk_widget_insert_action_group(mpFrame->getMouseEventWidget(), "win", nullptr); -+ -+ gtk_widget_destroy(pWidget); -+ -+ g_object_unref(mpActionGroup); -+ -+ return true; -+#else -+ (void)pWin; -+ return false; -+#endif - } - - /* -@@ -313,6 +437,7 @@ void GtkSalMenu::UpdateFull() - - GtkSalMenu::GtkSalMenu( bool bMenuBar ) : - mbMenuBar( bMenuBar ), -+ mbMenuVisibility( false ), - mpVCLMenu( nullptr ), - mpParentSalMenu( nullptr ), - mpFrame( nullptr ), -@@ -321,25 +446,28 @@ GtkSalMenu::GtkSalMenu( bool bMenuBar ) : - { - } - -+void GtkSalMenu::SetMenuModel(GMenuModel* pMenuModel) -+{ -+ if (mpMenuModel) -+ g_object_unref(mpMenuModel); -+ mpMenuModel = pMenuModel; -+ if (mpMenuModel) -+ g_object_ref(mpMenuModel); -+} -+ - GtkSalMenu::~GtkSalMenu() - { - SolarMutexGuard aGuard; - -- if ( mbMenuBar ) -- { -- if ( mpMenuModel ) -- { --// g_lo_menu_remove( G_LO_MENU( mpMenuModel ), 0 ); -- g_object_unref( mpMenuModel ); -- } -- } -+ if (mpMenuModel) -+ g_object_unref(mpMenuModel); - - maItems.clear(); - } - - bool GtkSalMenu::VisibleMenuBar() - { -- return bMenuVisibility; -+ return mbMenuBar && mbMenuVisibility; - } - - void GtkSalMenu::InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ) -@@ -374,22 +502,21 @@ void GtkSalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsig - pItem->mpSubMenu = pGtkSubMenu; - } - --void GtkSalMenu::SetFrame( const SalFrame* pFrame ) -+void GtkSalMenu::SetFrame(const SalFrame* pFrame) - { - SolarMutexGuard aGuard; - assert(mbMenuBar); - SAL_INFO("vcl.unity", "GtkSalMenu set to frame"); -- mpFrame = static_cast< const GtkSalFrame* >( pFrame ); -- GtkSalFrame* pFrameNonConst = const_cast(mpFrame); -+ mpFrame = const_cast(static_cast(pFrame)); - - // if we had a menu on the GtkSalMenu we have to free it as we generate a - // full menu anyway and we might need to reuse an existing model and - // actiongroup -- pFrameNonConst->SetMenu( this ); -- pFrameNonConst->EnsureAppMenuWatch(); -+ mpFrame->SetMenu( this ); -+ mpFrame->EnsureAppMenuWatch(); - - // Clean menu model and action group if needed. -- GtkWidget* pWidget = pFrameNonConst->getWindow(); -+ GtkWidget* pWidget = mpFrame->getWindow(); - GdkWindow* gdkWindow = gtk_widget_get_window( pWidget ); - - GLOMenu* pMenuModel = G_LO_MENU( g_object_get_data( G_OBJECT( gdkWindow ), "g-lo-menubar" ) ); -@@ -407,11 +534,12 @@ void GtkSalMenu::SetFrame( const SalFrame* pFrame ) - if ( pActionGroup ) - { - g_lo_action_group_clear( pActionGroup ); -+ g_lo_action_group_set_top_menu(pActionGroup, static_cast(this)); - mpActionGroup = G_ACTION_GROUP( pActionGroup ); - } - - // Generate the main menu structure. -- if (bMenuVisibility) -+ if (mbMenuVisibility) - UpdateFull(); - - g_lo_menu_insert_section( pMenuModel, 0, nullptr, mpMenuModel ); -@@ -618,16 +746,11 @@ GtkSalMenu* GtkSalMenu::GetMenuForItemCommand( gchar* aCommand, gboolean bGetSub - void GtkSalMenu::DispatchCommand( gint itemId, const gchar *aCommand ) - { - SolarMutexGuard aGuard; -- // Only the menubar is allowed to dispatch commands. -- if ( !mbMenuBar ) -- return; -- - int nDupsToSkip; - aCommand = DetermineDupIndex(aCommand, nDupsToSkip); - GtkSalMenu* pSalSubMenu = GetMenuForItemCommand( const_cast(aCommand), nDupsToSkip, FALSE ); - Menu* pSubMenu = ( pSalSubMenu != nullptr ) ? pSalSubMenu->GetMenu() : nullptr; -- -- mpVCLMenu->HandleMenuCommandEvent( pSubMenu, itemId ); -+ mpVCLMenu->HandleMenuCommandEvent(pSubMenu, itemId); - } - - void GtkSalMenu::ActivateAllSubmenus(Menu* pMenuBar) -@@ -645,9 +768,6 @@ void GtkSalMenu::ActivateAllSubmenus(Menu* pMenuBar) - - void GtkSalMenu::Activate( const gchar* aMenuCommand ) - { -- if ( !mbMenuBar ) -- return; -- - if ( !aMenuCommand ) { - ActivateAllSubmenus(mpVCLMenu); - return; -@@ -663,9 +783,6 @@ void GtkSalMenu::Activate( const gchar* aMenuCommand ) - - void GtkSalMenu::Deactivate( const gchar* aMenuCommand ) - { -- if ( !mbMenuBar ) -- return; -- - int nDupsToSkip; - aMenuCommand = DetermineDupIndex(aMenuCommand, nDupsToSkip); - GtkSalMenu* pSalSubMenu = GetMenuForItemCommand( const_cast(aMenuCommand), nDupsToSkip, TRUE ); -@@ -675,15 +792,14 @@ void GtkSalMenu::Deactivate( const gchar* aMenuCommand ) - - void GtkSalMenu::Display( bool bVisible ) - { -- if ( !mbMenuBar || mpVCLMenu == nullptr ) -- return; -+ mbMenuVisibility = bVisible; - -- bMenuVisibility = bVisible; -- -- bool bVCLMenuVisible = !bVisible; -- -- MenuBar* pMenuBar = static_cast< MenuBar* >( mpVCLMenu ); -- pMenuBar->SetDisplayable( bVCLMenuVisible ); -+ if (mbMenuBar) -+ { -+ bool bVCLMenuVisible = !bVisible; -+ MenuBar* pMenuBar = static_cast(mpVCLMenu); -+ pMenuBar->SetDisplayable(bVCLMenuVisible); -+ } - } - - bool GtkSalMenu::IsItemVisible( unsigned nPos ) --- -2.7.1 - diff --git a/libreoffice.spec b/libreoffice.spec index b3c38dc..d18fedd 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -1,9 +1,9 @@ # download path contains version without the last (fourth) digit -%define libo_version 5.1.3 +%define libo_version 5.2.0 # Should contain .alphaX / .betaX, if this is pre-release (actually # pre-RC) version. The pre-release string is part of tarball file names, # so we need a way to define it easily at one place. -%define libo_prerelease %{nil} +%define libo_prerelease .alpha1 # Should contain any suffix of release tarball name, e.g., -buildfix1. %define libo_buildfix %{nil} # rhbz#715152 state vendor @@ -57,7 +57,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 -Version: %{libo_version}.1 +Version: %{libo_version}.0 Release: 1%{?libo_prerelease}%{?dist} License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic and MPLv2.0 and CC0 URL: http://www.libreoffice.org/ @@ -68,7 +68,7 @@ Source2: %{source_url}/libreoffice-translations-%{version}%{?libo_prerele Source3: http://dev-www.libreoffice.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll Source4: libreoffice-multiliblauncher.sh Source5: %{external_url}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip -Source6: %{external_url}/1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz +Source6: %{external_url}/ce12af00283eb90d9281956524250d6e-xmlsec1-1.2.20.tar.gz Source7: %{external_url}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip Source8: %{external_url}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip #Unfortunately later versions of hsqldb changed the file format, so if we use a later version we loose @@ -239,36 +239,8 @@ Patch5: 0001-never-run-autogen.sh.patch Patch6: 0001-add-X-TryExec-entries-to-desktop-files.patch # not upstreamed Patch7: 0001-disable-PSD-import-test-which-deadlocks-on-ARM.patch -Patch8: 0001-but-only-for-dialog.patch -Patch9: 0003-gtk3-wayland-start-floating-windows-hidden.patch -Patch10: 0001-tdf-95450-avoid-double-swap-on-big-endian-arches.patch -Patch11: 0001-these-popups-should-start-invisible-and-take-default.patch -Patch12: 0002-disable-tearability-of-color-window.patch -Patch13: 0001-rhbz-1168757-propagate-selected-slides-to-print-dial.patch -Patch14: 0001-hack-out-optimization-to-build.patch -Patch15: 0001-generate-better-unit-test-assert-message.patch -Patch16: 0001-tdf-97665-Let-s-hope-that-over-activation-isn-t-real.patch -Patch17: 0002-gtk3-some-changes-towards-enabling-native-gtk3-popup.patch -Patch18: 0003-gtk3-vcl-popups-flush-any-unexecuted-Select-events-o.patch -Patch19: 0004-gtk3-replace-old-action-if-same-command-is-added.patch -Patch20: 0005-gtk3-handle-items-without-commands.patch -Patch21: 0006-mark-checkable-toolbox-menu-entries-as-checkable.patch -Patch22: 0007-set-gtk-layout-direction-to-match-ours.patch -Patch23: 0008-gtk3-implement-native-context-menus.patch -Patch24: 0001-Resolves-rhbz-1315385-use-preferred-size-if-widget-s.patch -Patch25: 0001-gtk3-various-bits-means-different-things-again.patch -Patch26: 0001-Resolves-tdf-98638-sometimes-menu-grab-doesn-t-take.patch -Patch27: 0001-Resolves-tdf-98636.patch -Patch28: 0001-tdf-39271-allow-to-export-only-notes-pages.patch -Patch29: 0001-Resolves-tdf-91778-drawing-the-background-over-an-ac.patch - -%if ! 0%{?rhel} -Patch400: 0001-Update-liborcus-to-0.11.0.patch -Patch401: 0001-reorder.patch -Patch402: 0002-reduce-copypasta.patch -Patch403: 0003-detect-Boost.Filesystem.patch -Patch404: 0004-define-boost_filestystem-external-for-system-boost-t.patch -%endif +Patch8: 0001-hack-out-optimization-to-build.patch +Patch9: 0001-pass-original-CFLAGS.patch %if 0%{?rhel} # not upstreamed @@ -1256,6 +1228,10 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/sandbox.jar #remove dummy .dat files rm -f %{buildroot}%{baseinstdir}/program/root?.dat +# I don't think we need this... +rm -f %{buildroot}%{baseinstdir}/share/classification/example.xml +rmdir %{buildroot}%{baseinstdir}/share/classification + #set standard permissions for rpmlint find %{buildroot}%{baseinstdir} -exec chmod +w {} \; find %{buildroot}%{baseinstdir} -type d -exec chmod 0755 {} \; @@ -1496,12 +1472,10 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar %{baseinstdir}/program/gdbtrace %{baseinstdir}/program/gengal %{baseinstdir}/program/gengal.bin -%{baseinstdir}/program/gnome-open-url %{baseinstdir}/program/libi18nsearchlo.so %{baseinstdir}/program/libldapbe2lo.so %{baseinstdir}/program/libacclo.so %{baseinstdir}/program/libavmedia*.so -%{baseinstdir}/program/libbasebmplo.so %{baseinstdir}/program/libbasctllo.so %{baseinstdir}/program/libbiblo.so %{baseinstdir}/program/libcached1.so @@ -1675,7 +1649,6 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar %{baseinstdir}/program/opengl/textureFragmentShader.glsl %{baseinstdir}/program/opengl/textureVertexShader.glsl %{baseinstdir}/program/opengl/transformedTextureVertexShader.glsl -%{baseinstdir}/program/open-url %{baseinstdir}/program/types/offapi.rdb %{baseinstdir}/program/libpasswordcontainerlo.so %{baseinstdir}/program/pagein-common @@ -1717,6 +1690,7 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar %{baseinstdir}/program/resource/uuien-US.res %{baseinstdir}/program/resource/upden-US.res %{baseinstdir}/program/resource/vclen-US.res +%{baseinstdir}/program/resource/writerperfecten-US.res %{baseinstdir}/program/resource/wzien-US.res %{baseinstdir}/program/resource/xmlsecen-US.res %{baseinstdir}/program/resource/xsltdlgen-US.res @@ -2268,7 +2242,6 @@ done %if 0%{?fedora} %files kde4 -%{baseinstdir}/program/kde4-open-url %{baseinstdir}/program/libkde4be1lo.so %{baseinstdir}/program/libvclplug_kde4lo.so @@ -2276,6 +2249,7 @@ done %{baseinstdir}/program/libvclplug_gtk3lo.so %files -n libreofficekit +%{baseinstdir}/share/libreofficekit %{_libdir}/girepository-1.0/LOKDocView-%{girapiversion}.typelib %{_libdir}/liblibreofficekitgtk.so @@ -2285,6 +2259,9 @@ done %endif %changelog +* Fri Apr 22 2016 David Tardon - 1:5.2.0.0-1.alpha1 +- update to 5.2.0 alpha1 + * Thu Apr 21 2016 David Tardon - 1:5.1.3.1-1 - update to 5.1.3 rc1 - Resolves: tdf#91778 drawing the background over an active cursor diff --git a/sources b/sources index c8cb6b2..1611eeb 100644 --- a/sources +++ b/sources @@ -3,10 +3,10 @@ 17410483b5b5f267aa18b7e00b65e6e0 17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip 185d60944ea767075d27247c3162b3bc 185d60944ea767075d27247c3162b3bc-unowinreg.dll a7983f859eafb2677d7ff386a023bc40 a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip -1f24ab1d39f4a51faf22244c94a6203f 1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz 0168229624cfac409e766913506961a8 0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz 12fb8b5b0d5132726e57b9b9fc7e22c4 libreoffice-multiliblauncher.sh 4b87018f7fff1d054939d19920b751a0 4b87018f7fff1d054939d19920b751a0-collada2gltf-master-cb1d97788a.tar.bz2 -19816183ae38a770d7bdefdb5e6b9e2a libreoffice-5.1.3.1.tar.xz -901d61d6e93cee2140af0869bef196de libreoffice-help-5.1.3.1.tar.xz -1aac76707472700fcb32bd5cf33c3834 libreoffice-translations-5.1.3.1.tar.xz +ba58bf0be24ef20e3e77d19e595c5e3d libreoffice-5.2.0.0.alpha1.tar.xz +4d71c1d2d265a022eb522be9de7ef62e libreoffice-help-5.2.0.0.alpha1.tar.xz +e5fac1dd61b67cbb0c38c427023a4907 libreoffice-translations-5.2.0.0.alpha1.tar.xz +ce12af00283eb90d9281956524250d6e ce12af00283eb90d9281956524250d6e-xmlsec1-1.2.20.tar.gz