mirror of
https://abf.rosa.ru/djam/libreoffice.git
synced 2025-02-23 18:43:00 +00:00
LOG Add some bugfix patches, more spec cleanups
This commit is contained in:
parent
4ea8f99e30
commit
e47a645fb4
4 changed files with 216 additions and 21 deletions
|
@ -0,0 +1,36 @@
|
|||
From 3750deae3e2d8fcf8bcf795fe327e1da370a2c4d Mon Sep 17 00:00:00 2001
|
||||
From: Katarina Behrens <bubli@bubli.org>
|
||||
Date: Fri, 13 Sep 2013 17:29:12 +0200
|
||||
Subject: [PATCH] Avoid crash when a comment contains data, but no text
|
||||
|
||||
calling back() on empty vector results in undef behaviour
|
||||
|
||||
Crash originally reported here:
|
||||
http://lists.freedesktop.org/archives/libreoffice/2013-September/055827.html
|
||||
|
||||
Change-Id: Ibefdc7e2495fc31d748c16fedd3cee5eb957bfa2
|
||||
---
|
||||
oox/source/ppt/presentationfragmenthandler.cxx | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx
|
||||
index 247b81b..826130c 100644
|
||||
--- a/oox/source/ppt/presentationfragmenthandler.cxx
|
||||
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
|
||||
@@ -323,8 +323,12 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, sal_Bool bFirst
|
||||
//set comment chars for last comment on slide
|
||||
SlideFragmentHandler* comment_handler =
|
||||
dynamic_cast<SlideFragmentHandler*>(xCommentsFragmentHandler.get());
|
||||
+ // some comments have no text -> set empty string as text to avoid
|
||||
+ // crash (back() on empty vector is undefined) and losing other
|
||||
+ // comment data that might be there (author, position, timestamp etc.)
|
||||
pCommentsPersistPtr->getCommentsList().cmLst.back().setText(
|
||||
- comment_handler->getCharVector().back() );
|
||||
+ comment_handler->getCharVector().empty() ? "" :
|
||||
+ comment_handler->getCharVector().back() );
|
||||
pCommentsPersistPtr->getCommentAuthors().setValues(maAuthorList);
|
||||
|
||||
//insert all comments from commentsList
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
From b73dec8a06ef762098e642b2c37e4baad780b11a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
||||
Date: Thu, 12 Sep 2013 10:56:37 +0100
|
||||
Subject: [PATCH] Resolves: rhbz#1006850 crash in
|
||||
SwCommentRuler::GetCommentControlRegion
|
||||
|
||||
Change-Id: Ic846da3b22391d724da6f8df94dd771e89d2efb4
|
||||
---
|
||||
sw/source/ui/misc/swruler.cxx | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/sw/source/ui/misc/swruler.cxx b/sw/source/ui/misc/swruler.cxx
|
||||
index a41fc0b..76fb8be 100644
|
||||
--- a/sw/source/ui/misc/swruler.cxx
|
||||
+++ b/sw/source/ui/misc/swruler.cxx
|
||||
@@ -247,6 +247,13 @@ void SwCommentRuler::UpdateCommentHelpText()
|
||||
Rectangle SwCommentRuler::GetCommentControlRegion()
|
||||
{
|
||||
SwPostItMgr *pPostItMgr = mpViewShell->GetPostItMgr();
|
||||
+
|
||||
+ //rhbz#1006850 When the SwPostItMgr ctor is called from SwView::SwView it
|
||||
+ //triggers an update of the uiview, but the result of the ctor hasn't been
|
||||
+ //set into the mpViewShell yet, so GetPostItMgr is temporarily still NULL
|
||||
+ if (!pPostItMgr)
|
||||
+ return Rectangle();
|
||||
+
|
||||
//FIXME When the page width is larger then screen, the ruler is misplaced by one pixel
|
||||
long nLeft = GetWinOffset() + GetPageOffset() + mpSwWin->LogicToPixel(Size(GetPageWidth(), 0)).Width();
|
||||
long nTop = 0 + 4; // Ruler::ImplDraw uses RULER_OFF (value: 3px) as offset, and Ruler::ImplFormat adds one extra pixel
|
||||
--
|
||||
1.8.3.1
|
||||
|
138
0001-Resolves-rhbz-968892-force-render-full-grapheme-with.patch
Normal file
138
0001-Resolves-rhbz-968892-force-render-full-grapheme-with.patch
Normal file
|
@ -0,0 +1,138 @@
|
|||
From 78f93c2ef1acd324c289286fe3c13a429340839b Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
||||
Date: Tue, 4 Jun 2013 15:48:23 +0100
|
||||
Subject: [PATCH] Resolves: rhbz#968892 force render full grapheme with
|
||||
fallback font
|
||||
|
||||
Change-Id: I5bb98c61d047e69d74666261b2c489d80f344502
|
||||
---
|
||||
vcl/generic/glyphs/gcach_layout.cxx | 61 ++++++++++++++++++++++---------------
|
||||
vcl/inc/generic/glyphcache.hxx | 5 +++
|
||||
2 files changed, 42 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx
|
||||
index 4fd4cf4..3c3c6de 100644
|
||||
--- a/vcl/generic/glyphs/gcach_layout.cxx
|
||||
+++ b/vcl/generic/glyphs/gcach_layout.cxx
|
||||
@@ -41,6 +41,10 @@
|
||||
#include <unicode/uscript.h>
|
||||
#include <unicode/ubidi.h>
|
||||
|
||||
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
|
||||
+#include <com/sun/star/i18n/CharacterIteratorMode.hpp>
|
||||
+#include <comphelper/processfactory.hxx>
|
||||
+
|
||||
// =======================================================================
|
||||
// layout implementation for ServerFont
|
||||
// =======================================================================
|
||||
@@ -90,23 +94,42 @@ void ServerFontLayout::AdjustLayout( ImplLayoutArgs& rArgs )
|
||||
}
|
||||
}
|
||||
|
||||
-// =======================================================================
|
||||
-
|
||||
-static bool lcl_CharIsJoiner(sal_Unicode cChar)
|
||||
+void ServerFontLayout::setNeedFallback(ImplLayoutArgs& rArgs, sal_Int32 nCharPos,
|
||||
+ bool bRightToLeft)
|
||||
{
|
||||
- return ((cChar == 0x200C) || (cChar == 0x200D));
|
||||
-}
|
||||
+ if (nCharPos < 0)
|
||||
+ return;
|
||||
|
||||
-static bool needPreviousCode(sal_Unicode cChar)
|
||||
-{
|
||||
- return lcl_CharIsJoiner(cChar) || U16_IS_LEAD(cChar);
|
||||
-}
|
||||
+ using namespace ::com::sun::star;
|
||||
|
||||
-static bool needNextCode(sal_Unicode cChar)
|
||||
-{
|
||||
- return lcl_CharIsJoiner(cChar) || U16_IS_TRAIL(cChar);
|
||||
+ if (!mxBreak.is())
|
||||
+ {
|
||||
+ uno::Reference< lang::XMultiServiceFactory > xFactory =
|
||||
+ comphelper::getProcessServiceFactory();
|
||||
+ mxBreak = uno::Reference< i18n::XBreakIterator >(xFactory->createInstance(
|
||||
+ "com.sun.star.i18n.BreakIterator"), uno::UNO_QUERY);
|
||||
+ }
|
||||
+
|
||||
+ LanguageTag aLangTag(rArgs.meLanguage);
|
||||
+ lang::Locale aLocale(aLangTag.getLocale());
|
||||
+
|
||||
+ //if position nCharPos is missing in the font, grab the entire grapheme and
|
||||
+ //mark all glyphs as missing so the whole thing is rendered with the same
|
||||
+ //font
|
||||
+ OUString aRun(rArgs.mpStr);
|
||||
+ sal_Int32 nDone;
|
||||
+ sal_Int32 nGraphemeStartPos =
|
||||
+ mxBreak->previousCharacters(aRun, nCharPos+1, aLocale,
|
||||
+ i18n::CharacterIteratorMode::SKIPCELL, 1, nDone);
|
||||
+ sal_Int32 nGraphemeEndPos =
|
||||
+ mxBreak->nextCharacters(aRun, nCharPos, aLocale,
|
||||
+ i18n::CharacterIteratorMode::SKIPCELL, 1, nDone);
|
||||
+
|
||||
+ rArgs.NeedFallback(nGraphemeStartPos, nGraphemeEndPos, bRightToLeft);
|
||||
}
|
||||
|
||||
+// =======================================================================
|
||||
+
|
||||
std::ostream &operator <<(std::ostream& s, ServerFont* pFont)
|
||||
{
|
||||
#ifndef SAL_LOG_INFO
|
||||
@@ -401,9 +424,7 @@ bool HbLayoutEngine::layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs)
|
||||
// if needed request glyph fallback by updating LayoutArgs
|
||||
if (!nGlyphIndex)
|
||||
{
|
||||
- if (nCharPos >= 0)
|
||||
- rArgs.NeedFallback(nCharPos, bRightToLeft);
|
||||
-
|
||||
+ rLayout.setNeedFallback(rArgs, nCharPos, bRightToLeft);
|
||||
if (SAL_LAYOUT_FOR_FALLBACK & rArgs.mnFlags)
|
||||
continue;
|
||||
}
|
||||
@@ -1006,15 +1027,7 @@ bool IcuLayoutEngine::layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs)
|
||||
// if needed request glyph fallback by updating LayoutArgs
|
||||
if( !nGlyphIndex )
|
||||
{
|
||||
- if( nCharPos >= 0 )
|
||||
- {
|
||||
- rArgs.NeedFallback( nCharPos, bRightToLeft );
|
||||
- if ( (nCharPos > 0) && needPreviousCode(rArgs.mpStr[nCharPos-1]) )
|
||||
- rArgs.NeedFallback( nCharPos-1, bRightToLeft );
|
||||
- else if ( (nCharPos + 1 < nEndRunPos) && needNextCode(rArgs.mpStr[nCharPos+1]) )
|
||||
- rArgs.NeedFallback( nCharPos+1, bRightToLeft );
|
||||
- }
|
||||
-
|
||||
+ rLayout.setNeedFallback(rArgs, nCharPos, bRightToLeft);
|
||||
if( SAL_LAYOUT_FOR_FALLBACK & rArgs.mnFlags )
|
||||
continue;
|
||||
}
|
||||
diff --git a/vcl/inc/generic/glyphcache.hxx b/vcl/inc/generic/glyphcache.hxx
|
||||
index a7363f9..d6cdee1 100644
|
||||
--- a/vcl/inc/generic/glyphcache.hxx
|
||||
+++ b/vcl/inc/generic/glyphcache.hxx
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <boost/unordered_map.hpp>
|
||||
#include <boost/unordered_set.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
+#include <com/sun/star/i18n/XBreakIterator.hpp>
|
||||
|
||||
namespace basegfx { class B2DPolyPolygon; }
|
||||
|
||||
@@ -311,6 +312,7 @@
|
||||
{
|
||||
private:
|
||||
ServerFont& mrServerFont;
|
||||
+ com::sun::star::uno::Reference<com::sun::star::i18n::XBreakIterator> mxBreak;
|
||||
|
||||
// enforce proper copy semantic
|
||||
SAL_DLLPRIVATE ServerFontLayout( const ServerFontLayout& );
|
||||
@@ -324,5 +326,7 @@
|
||||
virtual void AdjustLayout( ImplLayoutArgs& );
|
||||
virtual void DrawText( SalGraphics& ) const;
|
||||
+ void setNeedFallback(ImplLayoutArgs& rArgs, sal_Int32 nIndex,
|
||||
+ bool bRightToLeft);
|
||||
ServerFont& GetServerFont() const { return mrServerFont; }
|
||||
};
|
||||
|
|
@ -72,6 +72,7 @@ Source37: %{devurl}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
|
|||
Source40: http://hg.services.openoffice.org/binaries/1756c4fa6c616ae15973c104cd8cb256-Adobe-Core35_AFMs-314.tar.gz
|
||||
Source100: libreoffice.rpmlintrc
|
||||
|
||||
# Build specific patches
|
||||
Patch0: libreoffice-4.1.0.1-non-fatal-error-during-test.patch
|
||||
Patch1: libreoffice-3.5.2.2-icu-49.patch
|
||||
Patch2: help-images-mdv64789.patch
|
||||
|
@ -80,6 +81,11 @@ Patch3: libreoffice-4.1-libcmis-0.4.patch
|
|||
# ROSA vendor patch
|
||||
Patch100: libreoffice-4.1-vendor.patch
|
||||
|
||||
# Bugfix patches, including upstream
|
||||
Patch200: 0001-Avoid-crash-when-a-comment-contains-data-but-no-text.patch
|
||||
Patch201: 0001-Resolves-rhbz-1006850-crash-in-SwCommentRuler-GetCom.patch
|
||||
Patch202: 0001-Resolves-rhbz-968892-force-render-full-grapheme-with.patch
|
||||
|
||||
%if %{use_icecream}
|
||||
BuildRequires: icecream
|
||||
%endif
|
||||
|
@ -2782,26 +2788,9 @@ mkdir -p ~/tmp
|
|||
chmod 777 ~/tmp
|
||||
|
||||
%build
|
||||
|
||||
# Workaround for bug http://qa.mandriva.com/show_bug.cgi?id=27771
|
||||
# if [ -z $QTDIR ]; then
|
||||
# . /etc/profile.d/60qt4.sh
|
||||
# fi
|
||||
export QT4DIR=%{_libdir}/qt4
|
||||
%ifarch X86_64
|
||||
export QT4INC=/usr/lib/qt4/include
|
||||
%else
|
||||
export QT4INC=%{_libdir}/qt4/include
|
||||
%endif
|
||||
export QT4LIB=%{_libdir}/qt4/lib
|
||||
|
||||
export KDE4DIR=%{_libdir}/kde4
|
||||
%ifarch X86_64
|
||||
export KDE4INC=/usr/lib/kde4/include
|
||||
%else
|
||||
export KDE4INC=%{_libdir}/kde4/include
|
||||
%endif
|
||||
export KDE4LIB=%{_libdir}/kde4/lib
|
||||
export QT4DIR=%{qt4dir}
|
||||
export KDE4DIR=%{_kde_prefix}
|
||||
export PATH=$QT4DIR/bin:$PATH
|
||||
|
||||
%if !%{use_icecream}
|
||||
# sbin due to icu stuff there
|
||||
|
|
Loading…
Add table
Reference in a new issue