Accepting request 592099 from LibreOffice:Factory

Resubmit same source, in the hope to cheat legal-auto

OBS-URL: https://build.opensuse.org/request/show/592099
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libreoffice?expand=0&rev=151
This commit is contained in:
Dominique Leuenberger 2018-03-29 09:49:22 +00:00 committed by Git OBS Bridge
commit 4a3b5a48a7
12 changed files with 32 additions and 466 deletions

View File

@ -1,29 +0,0 @@
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 128a166c..4e789f9 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -2930,6 +2930,24 @@
FSHelperPtr pFS = GetFS();
pFS->startElement(FSNS(XML_c, XML_dLbls), FSEND);
+ bool bLinkedNumFmt = true;
+ if (GetProperty(xPropSet, "LinkNumberFormatToSource"))
+ mAny >>= bLinkedNumFmt;
+
+ if (GetProperty(xPropSet, "NumberFormat"))
+ {
+ sal_Int32 nKey = 0;
+ mAny >>= nKey;
+
+ OUString aNumberFormatString = getNumberFormatCode(nKey);
+ OString sNumberFormatString = OUStringToOString(aNumberFormatString, RTL_TEXTENCODING_UTF8);
+
+ pFS->singleElement(FSNS(XML_c, XML_numFmt),
+ XML_formatCode, sNumberFormatString.getStr(),
+ XML_sourceLinked, bLinkedNumFmt ? "1" : "0",
+ FSEND);
+ }
+
uno::Sequence<sal_Int32> aAttrLabelIndices;
xPropSet->getPropertyValue("AttributedDataPoints") >>= aAttrLabelIndices;

View File

@ -1,309 +0,0 @@
commit d2437852097ba042dd5445800505bb7942006759
Author: Miklos Vajna <vmiklos@collabora.co.uk>
Date: Wed Feb 21 17:27:53 2018 +0100
tdf#115873 sd navigator: allow selecting but not focusing on objects
There were also two cases here:
- changing the selection with the keyboard or single-click only updated
the selection in the navigator
- pressing enter or double-click also selected the shape in the main
window and gave the focus away
Introduce a 3rd case for single-click: update the shape selection but
doesn't give the focus away. This way double-click is not needed to sync
navigator -> main doc selection but keyboard navigation should still
work.
An additional trick is to make sure that the current shell is the draw
shell (and not the slide sorter) after navigation, so follow-up
operations work with the selected object and not with the whole slide.
Finally, a third related problem was that the selection jumped back to
the item of the slide after clicking on a shape in the navigator. The
reason for this was the navigator list was constantly cleared and
re-filled in SdNavigatorWin::InitTreeLB(), as
SdPageObjsTLB::IsEqualToDoc() returned false (even if the list was up to
date) in case of shapes which had children but no name. Fix this by
using the same SdrIterMode::Flat iteration mode that
SdPageObjsTLB::AddShapeList() does, so the fill and the equality check
of the navigator iterates the same way.
Conflicts:
sd/qa/unit/tiledrendering/tiledrendering.cxx
(cherry picked from commit f3c68cdf8f6a0273c62b493552f78af0138a44e8)
Change-Id: I0bfc3e8b49f7ef01d5797a68284616dcd2a81c5d
Reviewed-on: https://gerrit.libreoffice.org/50158
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 4552f262c7a1..53526c95473b 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -54,6 +54,7 @@
#include <slideshow.hxx>
#include <FrameView.hxx>
#include <helpids.h>
+#include <Window.hxx>
namespace {
static const sal_uInt16 nShowNamedShapesFilter=1;
@@ -215,6 +216,11 @@ NavigatorDragType SdNavigatorWin::GetNavigatorDragType()
return eDT;
}
+VclPtr<SdPageObjsTLB> SdNavigatorWin::GetObjects()
+{
+ return maTlbObjects;
+}
+
IMPL_LINK_NOARG(SdNavigatorWin, SelectToolboxHdl, ToolBox *, void)
{
sal_uInt16 nId = maToolbox->GetCurItemId();
@@ -337,6 +343,27 @@ IMPL_LINK_NOARG(SdNavigatorWin, ClickObjectHdl, SvTreeListBox*, bool)
if ( pShellWnd )
pShellWnd->GrabFocus();
}
+
+ // We navigated to an object, but the current shell may be
+ // still the slide sorter. Explicitly try to grab the draw
+ // shell focus, so follow-up operations work with the object
+ // and not with the whole slide.
+ sd::DrawDocShell* pDocShell = pInfo->mpDocShell;
+ if (pDocShell)
+ {
+ sd::ViewShell* pViewShell = pDocShell->GetViewShell();
+ if (pViewShell)
+ {
+ vcl::Window* pWindow = pViewShell->GetActiveWindow();
+ if (pWindow)
+ pWindow->GrabFocus();
+ }
+ }
+
+ if (!maTlbObjects->IsNavigationGrabsFocus())
+ // This is the case when keyboard navigation inside the
+ // navigator should continue to work.
+ maTlbObjects->GrabFocus();
}
}
}
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 7667c66db132..d9d193e445c0 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -58,6 +58,7 @@
#include <comphelper/processfactory.hxx>
#include <tools/diagnose_ex.h>
#include <o3tl/make_unique.hxx>
+#include <comphelper/scopeguard.hxx>
using namespace com::sun::star;
@@ -205,6 +206,8 @@ SdPageObjsTLB::SdPageObjsTLB( vcl::Window* pParentWin, WinBits nStyle )
, mbSaveTreeItemState ( false )
, mbShowAllShapes ( false )
, mbShowAllPages ( false )
+, mbSelectionHandlerNavigates(false)
+, mbNavigationGrabsFocus(true)
{
// add lines to Tree-ListBox
SetStyle( GetStyle() | WB_TABSTOP | WB_BORDER | WB_HASLINES |
@@ -626,6 +629,52 @@ void SdPageObjsTLB::SetShowAllShapes (
}
}
+bool SdPageObjsTLB::IsEqualToShapeList(SvTreeListEntry*& pEntry, const SdrObjList& rList,
+ const OUString& rListName)
+{
+ if (!pEntry)
+ return false;
+ OUString aName = GetEntryText(pEntry);
+
+ if (rListName != aName)
+ return false;
+
+ pEntry = Next(pEntry);
+
+ SdrObjListIter aIter(rList,
+ !rList.HasObjectNavigationOrder() /* use navigation order, if available */,
+ SdrIterMode::Flat);
+
+ while (aIter.IsMore())
+ {
+ SdrObject* pObj = aIter.Next();
+
+ const OUString aObjectName(GetObjectName(pObj));
+
+ if (!aObjectName.isEmpty())
+ {
+ if (!pEntry)
+ return false;
+
+ aName = GetEntryText(pEntry);
+
+ if (aObjectName != aName)
+ return false;
+
+ if (pObj->IsGroupObject())
+ {
+ bool bRet = IsEqualToShapeList(pEntry, *pObj->GetSubList(), aObjectName);
+ if (!bRet)
+ return false;
+ }
+ else
+ pEntry = Next(pEntry);
+ }
+ }
+
+ return true;
+}
+
/**
* Checks if the pages (PageKind::Standard) of a doc and the objects on the pages
* are identical to the TreeLB.
@@ -640,9 +689,7 @@ bool SdPageObjsTLB::IsEqualToDoc( const SdDrawDocument* pInDoc )
if( !mpDoc )
return false;
- SdrObject* pObj = nullptr;
SvTreeListEntry* pEntry = First();
- OUString aName;
// compare all pages including the objects
sal_uInt16 nPage = 0;
@@ -653,39 +700,9 @@ bool SdPageObjsTLB::IsEqualToDoc( const SdDrawDocument* pInDoc )
const SdPage* pPage = static_cast<const SdPage*>( mpDoc->GetPage( nPage ) );
if( pPage->GetPageKind() == PageKind::Standard )
{
- if( !pEntry )
+ bool bRet = IsEqualToShapeList(pEntry, *pPage, pPage->GetName());
+ if (!bRet)
return false;
- aName = GetEntryText( pEntry );
-
- if( pPage->GetName() != aName )
- return false;
-
- pEntry = Next( pEntry );
-
- SdrObjListIter aIter(
- *pPage,
- !pPage->HasObjectNavigationOrder() /* use navigation order, if available */,
- SdrIterMode::DeepWithGroups );
-
- while( aIter.IsMore() )
- {
- pObj = aIter.Next();
-
- const OUString aObjectName( GetObjectName( pObj ) );
-
- if( !aObjectName.isEmpty() )
- {
- if( !pEntry )
- return false;
-
- aName = GetEntryText( pEntry );
-
- if( aObjectName != aName )
- return false;
-
- pEntry = Next( pEntry );
- }
- }
}
nPage++;
}
@@ -895,6 +912,9 @@ void SdPageObjsTLB::SelectHdl()
}
SvTreeListBox::SelectHdl();
+
+ if (mbSelectionHandlerNavigates)
+ DoubleClickHdl();
}
/**
@@ -939,6 +959,16 @@ void SdPageObjsTLB::KeyInput( const KeyEvent& rKEvt )
SvTreeListBox::KeyInput( rKEvt );
}
+void SdPageObjsTLB::MouseButtonDown(const MouseEvent& rMEvt)
+{
+ mbSelectionHandlerNavigates = rMEvt.GetClicks() == 1;
+ comphelper::ScopeGuard aNavigationGuard([this]() { this->mbSelectionHandlerNavigates = false; });
+ mbNavigationGrabsFocus = rMEvt.GetClicks() != 1;
+ comphelper::ScopeGuard aGrabGuard([this]() { this->mbNavigationGrabsFocus = true; });
+
+ SvTreeListBox::MouseButtonDown(rMEvt);
+}
+
/**
* StartDrag-Request
*/
diff --git a/sd/source/ui/inc/navigatr.hxx b/sd/source/ui/inc/navigatr.hxx
index cd487a249058..a9501c5236a4 100644
--- a/sd/source/ui/inc/navigatr.hxx
+++ b/sd/source/ui/inc/navigatr.hxx
@@ -76,7 +76,7 @@ private:
::sd::DrawDocShell* mpDocShell;
};
-class SdNavigatorWin : public PanelLayout
+class SD_DLLPUBLIC SdNavigatorWin : public PanelLayout
{
public:
typedef ::std::function<void ()> UpdateRequestFunctor;
@@ -101,6 +101,7 @@ public:
bool InsertFile(const OUString& rFileName);
NavigatorDragType GetNavigatorDragType();
+ VclPtr<SdPageObjsTLB> GetObjects();
protected:
virtual bool EventNotify(NotifyEvent& rNEvt) override;
diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx
index 6f9887ecd40e..b358e376672b 100644
--- a/sd/source/ui/inc/sdtreelb.hxx
+++ b/sd/source/ui/inc/sdtreelb.hxx
@@ -195,6 +195,7 @@ public:
OUString GetEntryLongDescription( SvTreeListEntry* pEntry ) const override;
virtual void SelectHdl() override;
virtual void KeyInput( const KeyEvent& rKEvt ) override;
+ void MouseButtonDown(const MouseEvent& rMEvt) override;
void SetViewFrame( SfxViewFrame* pViewFrame );
@@ -202,7 +203,11 @@ public:
void Fill( const SdDrawDocument*, SfxMedium* pSfxMedium, const OUString& rDocName );
void SetShowAllShapes (const bool bShowAllShapes, const bool bFill);
bool GetShowAllShapes() const { return mbShowAllShapes;}
+ bool IsNavigationGrabsFocus() const { return mbNavigationGrabsFocus; }
bool IsEqualToDoc( const SdDrawDocument* pInDoc );
+ /// Visits rList recursively and tries to advance pEntry accordingly.
+ bool IsEqualToShapeList(SvTreeListEntry*& pEntry, const SdrObjList& rList,
+ const OUString& rListName);
bool HasSelectedChildren( const OUString& rName );
bool SelectEntry( const OUString& rName );
OUString GetSelectedEntry();
@@ -247,6 +252,16 @@ private:
/** This flag controls whether to show all pages.
*/
bool mbShowAllPages;
+ /**
+ * If changing the selection should also result in navigating to the
+ * relevant shape.
+ */
+ bool mbSelectionHandlerNavigates;
+ /**
+ * If navigation should not only select the relevant shape but also change
+ * focus to it.
+ */
+ bool mbNavigationGrabsFocus;
/** Return <TRUE/> when the current transferable may be dropped at the
given list box entry.

View File

@ -1,37 +0,0 @@
Author: Adam Majer <amajer@suse.de>
Date: Sat Feb 17 12:13:32 CET 2018
Old boost seems to be missing some boost::optional functionality.
This patch is a simple fix for a few problem spots. If this
problem gets larger, it may need a more generic solution instead.
Index: libreoffice-6.0.1.1/sw/source/core/txtnode/txatbase.cxx
===================================================================
--- libreoffice-6.0.1.1.orig/sw/source/core/txtnode/txatbase.cxx
+++ libreoffice-6.0.1.1/sw/source/core/txtnode/txatbase.cxx
@@ -100,21 +100,21 @@ void SwTextAttr::dumpAsXml(xmlTextWriter
{
pWhich = "character format";
if (SwCharFormat* pCharFormat = GetCharFormat().GetCharFormat())
- oValue = "name: " + OUStringToOString(pCharFormat->GetName(), RTL_TEXTENCODING_UTF8);
+ *oValue = OString("name: " + OUStringToOString(pCharFormat->GetName(), RTL_TEXTENCODING_UTF8));
break;
}
case RES_TXTATR_INETFMT:
{
pWhich = "inet format";
const SwFormatINetFormat& rFormat = GetINetFormat();
- oValue = "url: " + rFormat.GetValue().toUtf8();
+ *oValue = OString("url: " + rFormat.GetValue().toUtf8());
break;
}
case RES_TXTATR_CJK_RUBY:
{
pWhich = "ruby";
const SwFormatRuby& rFormat = GetRuby();
- oValue = "rubytext: " + rFormat.GetText().toUtf8();
+ *oValue = OString("rubytext: " + rFormat.GetText().toUtf8());
break;
}
case RES_TXTATR_META:

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4dbbaebe888cd4d38aac79be2eff7fa42056a231f3b3d19f703201086900ea61
size 203783632

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2e7080e1ab540a8862bcde2a7502a8e4f8dc3f9b52a16748bf973f596ab23a48
size 203747340

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0a8d3dcac6ebd115d6a631d472913c03ecf578867f11550f2ded224528acf07e
size 2994936

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ea57a525470be8ad30c818b421d4a5307b6a0d3fc1acca91f10ae2f65e5b96eb
size 2973176

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:94cfd58fc68cc63ca63c2bf1f20f30f7cdb8b8c228b78fd63957dd1bdceca9bb
size 138826608

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c19a7b661f22662669f685e768279321e0cb4078ab3e455b11e32fe4b253fb6f
size 139130268

View File

@ -1,3 +1,22 @@
-------------------------------------------------------------------
Mon Mar 26 12:23:45 UTC 2018 - tchvatal@suse.com
- Disable firebird engine on SLE for now
-------------------------------------------------------------------
Mon Mar 26 08:09:03 UTC 2018 - tchvatal@suse.com
- Also drop boost_string_fixes.patch merged in upstream differently
-------------------------------------------------------------------
Thu Mar 22 11:46:48 UTC 2018 - tchvatal@suse.com
- Version update to 6.0.3.1:
* Another bugfix release milestone
- Drop patch orcus-0.13.3.patch merged upstream
- Drop patch bnc955545.patch merged upstream
- Drop patch bnc1081079.patch merged upstream
-------------------------------------------------------------------
Wed Mar 14 09:30:47 UTC 2018 - tchvatal@suse.com

View File

@ -22,15 +22,15 @@
%define numbertext_version 0.9.5
# Urls
%define external_url http://dev-www.libreoffice.org/src/
%define tarball_url http://download.documentfoundation.org/libreoffice/src/6.0.2
#%define tarball_url http://dev-builds.libreoffice.org/pre-releases/src/
#%define tarball_url http://download.documentfoundation.org/libreoffice/src/6.0.2
%define tarball_url http://dev-builds.libreoffice.org/pre-releases/src/
# Enable the kde integration on openSUSE only
%if 0%{?is_opensuse}
%bcond_without kdeintegration
%else
%bcond_with kdeintegration
%endif
%if 0%{?suse_version} > 1320
%if 0%{?suse_version} > 1320 && %{?is_opensuse}
%bcond_without firebird
%else
%bcond_with firebird
@ -46,7 +46,7 @@
%bcond_with system_gpgme
%endif
Name: libreoffice
Version: 6.0.2.1
Version: 6.0.3.1
Release: 0
Summary: A Free Office Suite (Framework)
License: LGPL-3.0-or-later AND MPL-2.0+
@ -91,16 +91,10 @@ Patch2: nlpsolver-no-broken-help.diff
Patch3: mediawiki-no-broken-help.diff
Patch4: kde5-configure-checks.patch
Patch5: 0001-Use-PYTHON_FOR_BUILD-instead-of-calling-python-direc.patch
Patch6: orcus-0.13.3.patch
# LO-L3: Wrong transition time
Patch7: bnc1039203.patch
# LO-L3: Slide with chart has some strange (too large?) elements (PPTX)
Patch8: bnc1060128.patch
# LO-L3: Cutting object (Rectangle) in Navigator cuts the whole slide instead
Patch11: bnc955545.patch
# LO-L3: Saving PPTX chart changes $12K to 12,345 format
Patch12: bnc1081079.patch
Patch500: boost_string_fixes.patch
# try to save space by using hardlinks
Patch990: install-with-hardlinks.diff
BuildRequires: %{name}-share-linker
@ -884,18 +878,13 @@ Provides additional %{langname} translations and resources for %{project}. \
%if 0%{?suse_version} < 1330
# The rename of the configdir is needed only on older than factory for compat
%patch1
# fixes to satisfy old boost versions
%patch500 -p1
%endif # Leap 42/SLE-12
%patch2
%patch3
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch11 -p1
%patch12 -p1
%patch990 -p1
# Disable some of the failing tests (some are random)

View File

@ -1,67 +0,0 @@
From 20945a9a4de6684010fd5b3603595e6da543807d Mon Sep 17 00:00:00 2001
From: Kohei Yoshida <kohei.yoshida@gmail.com>
Date: Wed, 31 Jan 2018 21:27:44 -0500
Subject: Correctly import solid fill color.
In orcus, a solid fill type uses the foreground color only and ignores
the background color. Also, let's not use the alpha component as it
would cause the color to not get rendered at all.
Some patches are applied against liborcus in order to adjust the ODF
styles import code for this change. These changes will be incorporated
in 0.13.3.
Change-Id: I9e8c243cc6a7f366de2393e7b7ecf77366f5f9ea
Reviewed-on: https://gerrit.libreoffice.org/49071
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Tested-by: Kohei Yoshida <libreoffice@kohei.us>
---
...-of-0-means-fully-transparent.-I-m-sure-2.patch | 50 ++++++++++++++++++++++
...osed-to-use-the-foreground-color-for-soli.patch | 49 +++++++++++++++++++++
external/liborcus/UnpackedTarball_liborcus.mk | 2 +
sc/source/filter/orcus/interface.cxx | 15 ++++---
4 files changed, 111 insertions(+), 5 deletions(-)
create mode 100644 external/liborcus/0001-Alpha-value-of-0-means-fully-transparent.-I-m-sure-2.patch
create mode 100644 external/liborcus/0002-We-are-supposed-to-use-the-foreground-color-for-soli.patch
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index e40a71b..4cfd844 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -1148,7 +1148,8 @@ void ScOrcusStyles::fill::applyToItemSet(SfxItemSet& rSet) const
return;
}
- rSet.Put(SvxBrushItem(maBgColor, ATTR_BACKGROUND));
+ if (maPattern.equalsIgnoreAsciiCase("solid"))
+ rSet.Put(SvxBrushItem(maFgColor, ATTR_BACKGROUND));
}
ScOrcusStyles::protection::protection():
@@ -1574,15 +1575,19 @@ void ScOrcusStyles::set_fill_pattern_type(const char* s, size_t n)
maCurrentFill.mbHasFillAttr = true;
}
-void ScOrcusStyles::set_fill_fg_color(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue)
+void ScOrcusStyles::set_fill_fg_color(
+ orcus::spreadsheet::color_elem_t /*alpha*/, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue)
{
- maCurrentFill.maFgColor = Color(alpha, red, green, blue);
+ // Ignore the alpha element for now.
+ maCurrentFill.maFgColor = Color(red, green, blue);
maCurrentFill.mbHasFillAttr = true;
}
-void ScOrcusStyles::set_fill_bg_color(orcus::spreadsheet::color_elem_t alpha, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue)
+void ScOrcusStyles::set_fill_bg_color(
+ orcus::spreadsheet::color_elem_t /*alpha*/, orcus::spreadsheet::color_elem_t red, orcus::spreadsheet::color_elem_t green, orcus::spreadsheet::color_elem_t blue)
{
- maCurrentFill.maBgColor = Color(alpha, red, green, blue);
+ // Ignore the alpha element for now.
+ maCurrentFill.maBgColor = Color(red, green, blue);
maCurrentFill.mbHasFillAttr = true;
}
--
cgit v1.1