[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - 6 commits - configure.ac sal/rtl sc/source sd/source sfx2/source vcl/unx
Andras Timar
andras.timar at collabora.com
Sat Oct 1 21:03:41 UTC 2016
configure.ac | 2
sal/rtl/strtmpl.cxx | 9 +--
sc/source/core/data/colorscale.cxx | 4 -
sd/source/core/drawdoc3.cxx | 7 ++
sfx2/source/sidebar/Sidebar.cxx | 20 +++----
vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 88 ++++++++++++++++---------------
6 files changed, 70 insertions(+), 60 deletions(-)
New commits:
commit c04a23b0735c128b395d74924de9a716fc77fab5
Author: Andras Timar <andras.timar at collabora.com>
Date: Sat Oct 1 23:01:40 2016 +0200
Bump version to 5.1-8
Change-Id: Icf141e8e23b7b1c6b9bd726a72a92441eb3cd50d
diff --git a/configure.ac b/configure.ac
index 0b1097a..6536f9b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
# several non-alphanumeric characters, those are split off and used only for the
# ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea.
-AC_INIT([Collabora Office],[5.1.10.7],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[5.1.10.8],[],[],[https://collaboraoffice.com/])
AC_PREREQ([2.59])
commit d378460184924ab63997e0ac220569363b4427aa
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Sep 29 13:26:19 2016 +0200
tdf#83306: sal: fix compare of rtl::OUString/OString containing '\0'
For whatever reason oox shape import code uses OUStrings that contain
'\0' characters.
The rtl_uString / rtl_String are allowed to contain '\0' but the
strncmp/wcsncmp functions stop comparing on the first '\0', so use
memcmp/wmemcmp instead.
(regression from 281989007fd7dea997ed9a65f513f80b1aff67dd)
Change-Id: If148927f19d065a21f32f3c14433b0bda7ae9301
Reviewed-on: https://gerrit.libreoffice.org/29384
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit de7ed418e7813c85f192b558ff06e976eccaa54d)
Reviewed-on: https://gerrit.libreoffice.org/29388
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 7bc09f32ce86c6ed0df00ad72451b41204e0162f)
diff --git a/sal/rtl/strtmpl.cxx b/sal/rtl/strtmpl.cxx
index 41ab63f..8370c94 100644
--- a/sal/rtl/strtmpl.cxx
+++ b/sal/rtl/strtmpl.cxx
@@ -127,14 +127,15 @@ sal_Int32 SAL_CALL IMPL_RTL_STRNAME( compare_WithLength )( const IMPL_RTL_STRCOD
#if !IMPL_RTL_IS_USTRING
// take advantage of builtin optimisations
sal_Int32 nMin = std::min(nStr1Len, nStr2Len);
- sal_Int32 nRet = strncmp(pStr1, pStr2, nMin);
+ sal_Int32 nRet = memcmp(pStr1, pStr2, nMin);
return nRet == 0 ? nStr1Len - nStr2Len : nRet;
#else
if (sizeof(IMPL_RTL_STRCODE) == sizeof(wchar_t))
{
// take advantage of builtin optimisations
sal_Int32 nMin = std::min(nStr1Len, nStr2Len);
- sal_Int32 nRet = wcsncmp(reinterpret_cast<wchar_t const *>(pStr1), reinterpret_cast<wchar_t const *>(pStr2), nMin);
+ sal_Int32 nRet = wmemcmp(reinterpret_cast<wchar_t const *>(pStr1),
+ reinterpret_cast<wchar_t const *>(pStr2), nMin);
return nRet == 0 ? nStr1Len - nStr2Len : nRet;
}
else
@@ -170,7 +171,7 @@ sal_Int32 SAL_CALL IMPL_RTL_STRNAME( shortenedCompare_WithLength )( const IMPL_R
#if !IMPL_RTL_IS_USTRING
// take advantage of builtin optimisations
sal_Int32 nMin = std::min(std::min(nStr1Len, nStr2Len), nShortenedLength);
- sal_Int32 nRet = strncmp(pStr1, pStr2, nMin);
+ sal_Int32 nRet = memcmp(pStr1, pStr2, nMin);
if (nRet == 0 && nShortenedLength > std::min(nStr1Len, nStr2Len))
return nStr1Len - nStr2Len;
return nRet;
@@ -179,7 +180,7 @@ sal_Int32 SAL_CALL IMPL_RTL_STRNAME( shortenedCompare_WithLength )( const IMPL_R
{
// take advantage of builtin optimisations
sal_Int32 nMin = std::min(std::min(nStr1Len, nStr2Len), nShortenedLength);
- sal_Int32 nRet = wcsncmp(reinterpret_cast<wchar_t const *>(pStr1), reinterpret_cast<wchar_t const *>(pStr2), nMin);
+ sal_Int32 nRet = wmemcmp(reinterpret_cast<wchar_t const *>(pStr1), reinterpret_cast<wchar_t const *>(pStr2), nMin);
if (nRet == 0 && nShortenedLength > std::min(nStr1Len, nStr2Len))
return nStr1Len - nStr2Len;
return nRet;
commit a0af2e154dea2ec5c59de556e2a654dba7e97cad
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Tue Sep 27 00:11:32 2016 +0200
tdf#101104 this paranoid safety check actually causes a bug
Change-Id: Id31f98f5f84eabf603045e4d9f7ebd448689eed5
Reviewed-on: https://gerrit.libreoffice.org/29308
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 6d66c353fb7ea7d47af2404e7e66cef0f6a690c3)
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index bfa1c4d..d7db548 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -993,10 +993,6 @@ ScIconSetInfo* ScIconSetFormat::GetIconSetInfo(const ScAddress& rAddr) const
double nMin = GetMinValue();
double nMax = GetMaxValue();
- // this check is for safety
- if(nMin > nMax)
- return nullptr;
-
sal_Int32 nIndex = 0;
const_iterator itr = begin();
++itr;
commit ff0ff83f05f613a4e0e4c321a92a4c6aa725aaa6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Sep 19 12:24:02 2016 +0100
Related: rhbz#1353069 don't clear XATTR_FILL* from stylesheet if...
This is similar to de4908eb4d2f1f2ce38a37eea18a9efc4a0073b1 where
the master page is not the sole owner. Which happens when copying
and pasting slides which bring along a duplicate master page to
an already existing one, and the attempt to remove the duplicate
strips the fill properties from the shared stylesheet in use by
the other
regression from...
commit b876bbe2cacce8af379b10d82da6c7e7d229b361
Author: David Tardon <dtardon at redhat.com>
Date: Tue Apr 26 09:17:11 2016 +0200
rbhz#1326602 avoid exp. bg bitmaps from deleted slides
Change-Id: I0a3a34ade2ad8464b1edb67a6e28dab45c761a2c
(cherry picked from commit 914d72ee1edb351e4975a516240a38696f619217)
Reviewed-on: https://gerrit.libreoffice.org/29020
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit 19c191a0a92b6ae9ca86aa4ee7afb887fd42a209)
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 7817f75..8b0c53d 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -1249,6 +1249,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl
{
// Do not delete master pages that have their precious flag set
bool bDeleteMaster = !pMaster->IsPrecious();
+ bool bSoleOwnerOfStyleSheet = true;
OUString aLayoutName = pMaster->GetLayoutName();
if(bOnlyDuplicatePages )
@@ -1263,6 +1264,10 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl
{
// duplicate page found -> remove it
bDeleteMaster = true;
+
+ const SfxStyleSheet* pRefSheet = pMaster->getSdrPageProperties().GetStyleSheet();
+ const SfxStyleSheet* pTestSheet = pMPg->getSdrPageProperties().GetStyleSheet();
+ bSoleOwnerOfStyleSheet = pRefSheet != pTestSheet;
}
}
}
@@ -1296,7 +1301,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl
delete pNotesMaster;
if( bUndo )
- AddUndo(GetSdrUndoFactory().CreateUndoDeletePage(*pMaster));
+ AddUndo(GetSdrUndoFactory().CreateUndoDeletePage(*pMaster, bSoleOwnerOfStyleSheet));
RemoveMasterPage( pMaster->GetPageNum() );
commit f9d7f2da7ed9aec4912565961be8cca28d27ef6e
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Fri Sep 23 22:10:29 2016 +0100
tdf#91043 - vcl: gtk file picker should tolerate empty filter list.
Apparently LibreLex creates a dialog through UNO and sets no filters.
Change-Id: I518beef6f9c6ebab0d2e49bda78a33a283ad93d3
Reviewed-on: https://gerrit.libreoffice.org/29238
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
(cherry picked from commit 3be5deadcb46e09d84d99b2b108b65b06ff356e9)
Reviewed-on: https://gerrit.libreoffice.org/29302
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 651c6aaa44c9748d6900296b1227c89c2a43e3ed)
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 65d0843..25bf2bd 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -575,13 +575,16 @@ void SAL_CALL SalGtkFilePicker::setCurrentFilter( const OUString& aTitle )
void SalGtkFilePicker::updateCurrentFilterFromName(const gchar* filtername)
{
OUString aFilterName(filtername, strlen(filtername), RTL_TEXTENCODING_UTF8);
- FilterList::iterator aEnd = m_pFilterList->end();
- for (FilterList::iterator aIter = m_pFilterList->begin(); aIter != aEnd; ++aIter)
+ if (m_pFilterList)
{
- if (aFilterName == shrinkFilterName( aIter->getTitle()))
+ FilterList::iterator aEnd = m_pFilterList->end();
+ for (FilterList::iterator aIter = m_pFilterList->begin(); aIter != aEnd; ++aIter)
{
- m_aCurrentFilter = aIter->getTitle();
- break;
+ if (aFilterName == shrinkFilterName( aIter->getTitle()))
+ {
+ m_aCurrentFilter = aIter->getTitle();
+ break;
+ }
}
}
}
@@ -793,10 +796,11 @@ uno::Sequence<OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw( uno
OUString aNewFilter;
OUString aOldFilter = getCurrentFilter();
bool bChangeFilter = true;
- for ( FilterList::iterator aListIter = m_pFilterList->begin();
- aListIter != m_pFilterList->end();
- ++aListIter
- )
+ if ( m_pFilterList )
+ for ( FilterList::iterator aListIter = m_pFilterList->begin();
+ aListIter != m_pFilterList->end();
+ ++aListIter
+ )
{
if( lcl_matchFilter( aListIter->getFilter(), aStarDot+sExtension ) )
{
@@ -830,47 +834,49 @@ uno::Sequence<OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw( uno
OSL_TRACE( "2: current filter is %s\n",
OUStringToOString( sFilterName, RTL_TEXTENCODING_UTF8 ).getStr() );
- FilterList::iterator aListIter = ::std::find_if(
- m_pFilterList->begin(), m_pFilterList->end(), FilterTitleMatch(sFilterName) );
-
- OUString aFilter;
- if (aListIter != m_pFilterList->end())
- aFilter = aListIter->getFilter();
+ if (m_pFilterList)
+ {
+ FilterList::iterator aListIter = ::std::find_if(
+ m_pFilterList->begin(), m_pFilterList->end(), FilterTitleMatch(sFilterName) );
- OSL_TRACE( "turned into %s\n",
- OUStringToOString( aFilter, RTL_TEXTENCODING_UTF8 ).getStr() );
+ OUString aFilter;
+ if (aListIter != m_pFilterList->end())
+ aFilter = aListIter->getFilter();
- nTokenIndex = 0;
- OUString sToken;
- // OUString strExt;
- do
- {
- sToken = aFilter.getToken( 0, '.', nTokenIndex );
+ OSL_TRACE( "turned into %s\n",
+ OUStringToOString( aFilter, RTL_TEXTENCODING_UTF8 ).getStr() );
- if ( sToken.lastIndexOf( ';' ) != -1 )
+ nTokenIndex = 0;
+ OUString sToken;
+ do
{
- sal_Int32 nZero = 0;
- OUString aCurrentToken = sToken.getToken( 0, ';', nZero);
+ sToken = aFilter.getToken( 0, '.', nTokenIndex );
- sToken = aCurrentToken;
- break;
+ if ( sToken.lastIndexOf( ';' ) != -1 )
+ {
+ sal_Int32 nZero = 0;
+ OUString aCurrentToken = sToken.getToken( 0, ';', nZero);
+
+ sToken = aCurrentToken;
+ break;
+ }
}
- }
- while( nTokenIndex >= 0 );
+ while( nTokenIndex >= 0 );
- if( !bExtensionTypedIn && ( sToken != "*" ) )
- {
- //if the filename does not already have the auto extension, stick it on
- OUString sExtension = "." + sToken;
- OUString &rBase = aSelectedFiles[nIndex];
- sal_Int32 nExtensionIdx = rBase.getLength() - sExtension.getLength();
- SAL_INFO(
- "vcl.gtk",
- "idx are " << rBase.lastIndexOf(sExtension) << " "
+ if( !bExtensionTypedIn && ( sToken != "*" ) )
+ {
+ //if the filename does not already have the auto extension, stick it on
+ OUString sExtension = "." + sToken;
+ OUString &rBase = aSelectedFiles[nIndex];
+ sal_Int32 nExtensionIdx = rBase.getLength() - sExtension.getLength();
+ SAL_INFO(
+ "vcl.gtk",
+ "idx are " << rBase.lastIndexOf(sExtension) << " "
<< nExtensionIdx);
- if( rBase.lastIndexOf( sExtension ) != nExtensionIdx )
- rBase += sExtension;
+ if( rBase.lastIndexOf( sExtension ) != nExtensionIdx )
+ rBase += sExtension;
+ }
}
}
commit af65965d4fafabe93213c1f8bbf6fc5cf628dc7e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Sep 22 09:19:09 2016 +0100
Resolves: tdf#100670 Crash in: sfx2::sidebar::Panel::SetExpanded(bool)
partial backport of
commit e964c55f463c5b9daeb41dbed6c330b40911c313
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jan 29 18:52:34 2016 +0000
implement missing FID_FUNCTION_BOX GetState
since it was turned into a sidebar thing
exact how-to-reproduce of tdf#102045 is currently avoided because of...
commit e1e61bf5e5f368fc1ea579f8ae5eec9faafbd599
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jun 3 11:06:22 2016 +0100
Resolves: tdf#88396 switching to sidebar panel will toggle it *off*...
if its already visible.
Change-Id: I17827488e49338a77ae55ba32a06415067123be8
Reviewed-on: https://gerrit.libreoffice.org/29170
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
(cherry picked from commit 6de338782529f65e3adb945a5e48cc6eb4f60603)
diff --git a/sfx2/source/sidebar/Sidebar.cxx b/sfx2/source/sidebar/Sidebar.cxx
index 02a17f4..2fa29f4 100644
--- a/sfx2/source/sidebar/Sidebar.cxx
+++ b/sfx2/source/sidebar/Sidebar.cxx
@@ -30,19 +30,21 @@ void Sidebar::ShowPanel (
const css::uno::Reference<frame::XFrame>& rxFrame)
{
SidebarController* pController = SidebarController::GetSidebarControllerForFrame(rxFrame);
+ if (!pController)
+ return;
std::shared_ptr<PanelDescriptor> xPanelDescriptor = pController->GetResourceManager()->GetPanelDescriptor(rsPanelId);
- if (pController && xPanelDescriptor)
- {
- // This should be a lot more sophisticated:
- // - Make the deck switching asynchronous
- // - Make sure to use a context that really shows the panel
+ if (!xPanelDescriptor)
+ return;
+
+ // This should be a lot more sophisticated:
+ // - Make the deck switching asynchronous
+ // - Make sure to use a context that really shows the panel
- // All that is not necessary for the current use cases so lets
- // keep it simple for the time being.
- pController->OpenThenSwitchToDeck(xPanelDescriptor->msDeckId);
- }
+ // All that is not necessary for the current use cases so lets
+ // keep it simple for the time being.
+ pController->OpenThenSwitchToDeck(xPanelDescriptor->msDeckId);
}
void Sidebar::TogglePanel (
More information about the Libreoffice-commits
mailing list