parent
04a01b9ffa
commit
479766e735
@ -1,33 +0,0 @@
|
||||
From e90e00cb76bc16a562b34a56d5e74e974ca4c270 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Fri, 31 May 2013 12:27:49 +0200
|
||||
Subject: [PATCH] Resolves: rhbz#989686 Fix crash with ooo120774-1.doc
|
||||
|
||||
Do not try to remove line breaks from empty string
|
||||
|
||||
Reviewed-on: https://gerrit.libreoffice.org/4114
|
||||
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
|
||||
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
|
||||
(cherry picked from commit 2cb9aaf44dc589af79d62d7b1136b5d65e9f47d4)
|
||||
|
||||
Change-Id: Ieb12c541d42944aac813cee10ce479207b1c674b
|
||||
---
|
||||
sw/source/core/doc/doctxm.cxx | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
|
||||
index 2029d9f..6498585 100644
|
||||
--- a/sw/source/core/doc/doctxm.cxx
|
||||
+++ b/sw/source/core/doc/doctxm.cxx
|
||||
@@ -1536,6 +1536,8 @@ static String lcl_GetNumString( const SwTOXSortTabBase& rBase, bool bUsePrefix,
|
||||
/// to a single space, and trailing space removed.
|
||||
String lcl_RemoveLineBreaks( String sRet )
|
||||
{
|
||||
+ if (!sRet.Len())
|
||||
+ return sRet;
|
||||
xub_StrLen nOffset = 0;
|
||||
sRet.SearchAndReplaceAll('\n', ' ');
|
||||
for (xub_StrLen i = 1; i < sRet.Len(); i++)
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,50 +0,0 @@
|
||||
From 32afec7662fed6eea0714a8bf23e9f040672cb5a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Thu, 25 Jul 2013 15:43:58 +0200
|
||||
Subject: [PATCH] Use inconditionally the libwpd >= 0.9.5 path
|
||||
|
||||
Since libwpd does not output the version number anymore
|
||||
|
||||
Change-Id: I1bc3f7081552795fc2ed33f033a093fa5b40fda8
|
||||
(cherry picked from commit 93d0e38ccc06060f20073a9461c53f471a1b9c03)
|
||||
Reviewed-on: https://gerrit.libreoffice.org/5102
|
||||
Reviewed-by: David Tardon <dtardon@redhat.com>
|
||||
Tested-by: David Tardon <dtardon@redhat.com>
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
writerperfect/source/common/WPXSvStream.cxx | 4 ----
|
||||
2 files changed, 1 insertion(+), 5 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index b4ce4a2..03d2ef8 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -7221,7 +7221,7 @@ libo_CHECK_SYSTEM_MODULE([libcmis],[CMIS],[libcmis-0.3 >= 0.3.1])
|
||||
dnl ===================================================================
|
||||
dnl Check for system libwpd
|
||||
dnl ===================================================================
|
||||
-libo_CHECK_SYSTEM_MODULE([libwpd],[WPD],[libwpd-0.9 libwpd-stream-0.9],["-I${WORKDIR}/UnpackedTarball/libwpd/inc"],["-L${OUTDIR}/lib -lwpdlib"])
|
||||
+libo_CHECK_SYSTEM_MODULE([libwpd],[WPD],[libwpd-0.9 >= 0.9.5 libwpd-stream-0.9 >= 0.9.5],["-I${WORKDIR}/UnpackedTarball/libwpd/inc"],["-L${OUTDIR}/lib -lwpdlib"])
|
||||
|
||||
dnl ===================================================================
|
||||
dnl Check for system lcms2
|
||||
diff --git a/writerperfect/source/common/WPXSvStream.cxx b/writerperfect/source/common/WPXSvStream.cxx
|
||||
index a79ac6c..e0c8d8c 100644
|
||||
--- a/writerperfect/source/common/WPXSvStream.cxx
|
||||
+++ b/writerperfect/source/common/WPXSvStream.cxx
|
||||
@@ -134,12 +134,8 @@ int WPXSvInputStreamImpl::seek(long offset, WPX_SEEK_TYPE seekType)
|
||||
sal_Int64 tmpOffset = offset;
|
||||
if (seekType == WPX_SEEK_CUR)
|
||||
tmpOffset += tmpPosition;
|
||||
-#if defined(LIBWPD_STREAM_VERSION_MAJOR) && defined(LIBWPD_STREAM_VERSION_MINOR) && defined(LIBWPD_STREAM_VERSION_REVISION) \
|
||||
- && (LIBWPD_STREAM_VERSION_MAJOR > 0 || (LIBWPD_STREAM_VERSION_MAJOR == 0 && (LIBWPD_STREAM_VERSION_MINOR > 9 \
|
||||
- || (LIBWPD_STREAM_VERSION_MINOR == 9 && LIBWPD_STREAM_VERSION_REVISION >= 5))))
|
||||
if (seekType == WPX_SEEK_END)
|
||||
tmpOffset += mnLength;
|
||||
-#endif
|
||||
|
||||
int retVal = 0;
|
||||
if (tmpOffset < 0)
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,37 +0,0 @@
|
||||
From 37a3f9638315483114380a461f60abeab7809a3d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
||||
Date: Thu, 18 Jul 2013 09:43:39 +0100
|
||||
Subject: [PATCH] WaE: assuming signed overflow does not occur when assuming...
|
||||
|
||||
that (X + c) < X is always false [-Wstrict-overflow]
|
||||
|
||||
Change-Id: I63880bf27ab7e34eb9e0be682b39b80b71d65103
|
||||
---
|
||||
basebmp/source/bitmapdevice.cxx | 11 +++++++++--
|
||||
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx
|
||||
index fb08e32..00fc1c2 100644
|
||||
--- a/basebmp/source/bitmapdevice.cxx
|
||||
+++ b/basebmp/source/bitmapdevice.cxx
|
||||
@@ -339,8 +339,15 @@ namespace
|
||||
{
|
||||
if( !mpDamage )
|
||||
return;
|
||||
- basegfx::B2IPoint aEnd( rDamagePoint.getX() + 1,
|
||||
- rDamagePoint.getY() + 1 );
|
||||
+
|
||||
+ sal_Int32 nX(rDamagePoint.getX());
|
||||
+ sal_Int32 nY(rDamagePoint.getY());
|
||||
+ if (nX < SAL_MAX_INT32)
|
||||
+ ++nX;
|
||||
+ if (nY < SAL_MAX_INT32)
|
||||
+ ++nY;
|
||||
+
|
||||
+ basegfx::B2IPoint aEnd( nX, nY );
|
||||
damaged( basegfx::B2IBox( rDamagePoint, aEnd ) );
|
||||
}
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,252 +0,0 @@
|
||||
From 94dd6a449fe3c17f97264dd01bf263eb268ac19d Mon Sep 17 00:00:00 2001
|
||||
From: Michael Meeks <michael.meeks@suse.com>
|
||||
Date: Thu, 18 Jul 2013 14:51:29 +0100
|
||||
Subject: [PATCH] fdo#67045 - fix several nasty screen selection issues with
|
||||
presenter console.
|
||||
|
||||
Also add the ability to select the external screen (whatever it is) to the
|
||||
configuration dialog.
|
||||
|
||||
Change-Id: I2c81175143ba8fdd7c9aee1dac433742c2a0ba69
|
||||
Reviewed-on: https://gerrit.libreoffice.org/4971
|
||||
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
|
||||
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
|
||||
---
|
||||
.../schema/org/openoffice/Office/Impress.xcs | 5 +-
|
||||
sd/source/ui/dlg/present.cxx | 63 +++++++++++++++-------
|
||||
sd/source/ui/inc/present.hxx | 4 +-
|
||||
sd/source/ui/slideshow/slideshow.cxx | 28 ++++------
|
||||
sdext/source/presenter/PresenterScreen.cxx | 13 +++--
|
||||
5 files changed, 70 insertions(+), 43 deletions(-)
|
||||
|
||||
diff --git a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
|
||||
index 8161806..410a869 100644
|
||||
--- a/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
|
||||
+++ b/officecfg/registry/schema/org/openoffice/Office/Impress.xcs
|
||||
@@ -504,7 +504,10 @@
|
||||
<!-- OldLocation: -->
|
||||
<!-- UIHints: slide show settings display listbox -->
|
||||
<info>
|
||||
- <desc>Number of the display used for full screen slide show mode.</desc>
|
||||
+ <desc>Offset number of the display used for full screen slide show mode;
|
||||
+ -1 means all screens,
|
||||
+ 0 means default external screen,
|
||||
+ N>0 means real-screen number + 1.</desc>
|
||||
<label>Display for full screen slide show mode</label>
|
||||
</info>
|
||||
<value>0</value>
|
||||
diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx
|
||||
index 9fce09b..6aec289 100644
|
||||
--- a/sd/source/ui/dlg/present.cxx
|
||||
+++ b/sd/source/ui/dlg/present.cxx
|
||||
@@ -149,6 +149,26 @@ SdStartPresentationDlg::SdStartPresentationDlg( Window* pWindow,
|
||||
ChangePauseHdl( NULL );
|
||||
}
|
||||
|
||||
+String SdStartPresentationDlg::GetDisplayName( sal_Int32 nDisplay, bool bExternal )
|
||||
+{
|
||||
+ String aName( bExternal ? msExternalMonitor->GetText() :
|
||||
+ msMonitor->GetText() );
|
||||
+ const String aNumber( OUString::number( nDisplay ) );
|
||||
+ aName.SearchAndReplace( String("%1"), aNumber );
|
||||
+ return aName;
|
||||
+}
|
||||
+
|
||||
+/// Store display index together with name in user data
|
||||
+sal_Int32 SdStartPresentationDlg::InsertDisplayEntry(const rtl::OUString &aName,
|
||||
+ sal_Int32 nDisplay)
|
||||
+{
|
||||
+ maLBMonitor->InsertEntry( aName );
|
||||
+ const sal_uInt32 nEntryIndex = maLBMonitor->GetEntryCount() - 1;
|
||||
+ maLBMonitor->SetEntryData( nEntryIndex, (void*)(sal_IntPtr)nDisplay );
|
||||
+
|
||||
+ return nEntryIndex;
|
||||
+}
|
||||
+
|
||||
void SdStartPresentationDlg::InitMonitorSettings()
|
||||
{
|
||||
try
|
||||
@@ -172,36 +192,39 @@ void SdStartPresentationDlg::InitMonitorSettings()
|
||||
sal_Int32 nDefaultExternalIndex (-1);
|
||||
const sal_Int32 nDefaultSelectedDisplay (
|
||||
( ( const SfxInt32Item& ) rOutAttrs.Get( ATTR_PRESENT_DISPLAY ) ).GetValue());
|
||||
- const String sPlaceHolder( RTL_CONSTASCII_USTRINGPARAM( "%1" ) );
|
||||
+
|
||||
+ // Un-conditionally add a version for '0' the default external display
|
||||
+ sal_Int32 nInsertedEntry;
|
||||
+
|
||||
+ // FIXME: string-freeze this should really be 'External (display %)'
|
||||
+ String aName = GetDisplayName( nExternalIndex + 1, true);
|
||||
+ nInsertedEntry = InsertDisplayEntry( aName, 0 );
|
||||
+ if( nDefaultSelectedDisplay == 0)
|
||||
+ nSelectedIndex = nInsertedEntry;
|
||||
+
|
||||
+ // The user data contains the real setting
|
||||
for( sal_Int32 nDisplay = 0; nDisplay < mnMonitors; nDisplay++ )
|
||||
{
|
||||
- String aName( nDisplay == nExternalIndex ?
|
||||
- msExternalMonitor->GetText() :
|
||||
- msMonitor->GetText() );
|
||||
- const String aNumber( OUString::number( nDisplay + 1 ) );
|
||||
- aName.SearchAndReplace( sPlaceHolder, aNumber );
|
||||
- maLBMonitor->InsertEntry( aName );
|
||||
-
|
||||
- // Store display index together with name.
|
||||
- const sal_uInt32 nEntryIndex (maLBMonitor->GetEntryCount()-1);
|
||||
- maLBMonitor->SetEntryData(nEntryIndex, (void*)(sal_IntPtr)nDisplay);
|
||||
+ bool bIsExternal = nDisplay == nExternalIndex;
|
||||
+ // FIXME: string-freeze, use true to denote external for now
|
||||
+ bIsExternal = false;
|
||||
+ aName = GetDisplayName( nDisplay + 1, bIsExternal );
|
||||
+ nInsertedEntry = InsertDisplayEntry( aName, nDisplay + 1 );
|
||||
|
||||
// Remember the index of the default selection.
|
||||
- if (nDefaultSelectedDisplay == nDisplay)
|
||||
- nSelectedIndex = nEntryIndex;
|
||||
+ if( nDisplay + 1 == nDefaultSelectedDisplay )
|
||||
+ nSelectedIndex = nInsertedEntry;
|
||||
|
||||
// Remember index of the default display.
|
||||
- if (nDisplay == nExternalIndex)
|
||||
- nDefaultExternalIndex = nEntryIndex;
|
||||
+ if( nDisplay == nExternalIndex )
|
||||
+ nDefaultExternalIndex = nInsertedEntry;
|
||||
}
|
||||
|
||||
if( bUnifiedDisplay )
|
||||
{
|
||||
- maLBMonitor->InsertEntry( msAllMonitors->GetText() );
|
||||
- const sal_uInt32 nEntryIndex (maLBMonitor->GetEntryCount()-1);
|
||||
- maLBMonitor->SetEntryData(nEntryIndex, (void*)-1);
|
||||
- if (nDefaultSelectedDisplay == -1)
|
||||
- nSelectedIndex = nEntryIndex;
|
||||
+ nInsertedEntry = InsertDisplayEntry( msAllMonitors->GetText(), -1 );
|
||||
+ if( nDefaultSelectedDisplay == -1 )
|
||||
+ nSelectedIndex = nInsertedEntry;
|
||||
}
|
||||
|
||||
if (nSelectedIndex < 0)
|
||||
diff --git a/sd/source/ui/inc/present.hxx b/sd/source/ui/inc/present.hxx
|
||||
index 393e03a..ef27bfb 100644
|
||||
--- a/sd/source/ui/inc/present.hxx
|
||||
+++ b/sd/source/ui/inc/present.hxx
|
||||
@@ -74,7 +74,9 @@ private:
|
||||
DECL_LINK( ChangePauseHdl, void * );
|
||||
|
||||
void InitMonitorSettings();
|
||||
-
|
||||
+ sal_Int32 InsertDisplayEntry(const rtl::OUString &aName,
|
||||
+ sal_Int32 nDisplay);
|
||||
+ String GetDisplayName( sal_Int32 nDisplay, bool bExternal );
|
||||
public:
|
||||
SdStartPresentationDlg( Window* pWindow,
|
||||
const SfxItemSet& rInAttrs,
|
||||
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
|
||||
index f9154e2..50a93e5 100644
|
||||
--- a/sd/source/ui/slideshow/slideshow.cxx
|
||||
+++ b/sd/source/ui/slideshow/slideshow.cxx
|
||||
@@ -550,14 +550,6 @@ void SAL_CALL SlideShow::setPropertyValue( const OUString& aPropertyName, const
|
||||
sal_Int32 nDisplay = 0;
|
||||
if( aValue >>= nDisplay )
|
||||
{
|
||||
- // Convert value to true display id.
|
||||
- if (nDisplay == 0)
|
||||
- nDisplay = Application::GetDisplayExternalScreen();
|
||||
- else if (nDisplay < 0)
|
||||
- nDisplay = -1;
|
||||
- else
|
||||
- --nDisplay;
|
||||
-
|
||||
bIllegalArgument = false;
|
||||
|
||||
SdOptions* pOptions = SD_MOD()->GetSdOptions(DOCUMENT_TYPE_IMPRESS);
|
||||
@@ -642,14 +634,7 @@ Any SAL_CALL SlideShow::getPropertyValue( const OUString& PropertyName ) throw(U
|
||||
case ATTR_PRESENT_DISPLAY:
|
||||
{
|
||||
SdOptions* pOptions = SD_MOD()->GetSdOptions(DOCUMENT_TYPE_IMPRESS);
|
||||
- const sal_Int32 nDisplay (pOptions->GetDisplay());
|
||||
- // Convert true display id to the previously used schema.
|
||||
- if (nDisplay == (sal_Int32)Application::GetDisplayExternalScreen())
|
||||
- return Any(sal_Int32(0));
|
||||
- else if (nDisplay < 0)
|
||||
- return Any(sal_Int32(-1));
|
||||
- else
|
||||
- return Any(nDisplay+1);
|
||||
+ return Any(pOptions->GetDisplay());
|
||||
}
|
||||
|
||||
default:
|
||||
@@ -1288,8 +1273,8 @@ void SlideShow::StartFullscreenPresentation( )
|
||||
|
||||
// ---------------------------------------------------------
|
||||
|
||||
+/// convert configuration setting display concept to real screens
|
||||
sal_Int32 SlideShow::GetDisplay()
|
||||
-
|
||||
{
|
||||
sal_Int32 nDisplay = 0;
|
||||
|
||||
@@ -1297,6 +1282,15 @@ sal_Int32 SlideShow::GetDisplay()
|
||||
if( pOptions )
|
||||
nDisplay = pOptions->GetDisplay();
|
||||
|
||||
+ if( nDisplay < 0 )
|
||||
+ nDisplay = -1;
|
||||
+ else if( nDisplay == 0)
|
||||
+ nDisplay = (sal_Int32)Application::GetDisplayExternalScreen();
|
||||
+ else
|
||||
+ nDisplay--;
|
||||
+
|
||||
+ SAL_INFO("sd", "Presenting on real screen " << nDisplay);
|
||||
+
|
||||
return nDisplay;
|
||||
}
|
||||
|
||||
diff --git a/sdext/source/presenter/PresenterScreen.cxx b/sdext/source/presenter/PresenterScreen.cxx
|
||||
index f361912..f986944 100644
|
||||
--- a/sdext/source/presenter/PresenterScreen.cxx
|
||||
+++ b/sdext/source/presenter/PresenterScreen.cxx
|
||||
@@ -448,9 +448,10 @@ void PresenterScreen::SwitchMonitors()
|
||||
}
|
||||
}
|
||||
|
||||
-// FIXME: really VCL should hold the current 'external' and 'built-in'
|
||||
-// display states, and hide them behind some attractive API, and
|
||||
-// the PresenterConsole should link VCL directly ...
|
||||
+/**
|
||||
+ * Return the real VCL screen number to show the presenter console
|
||||
+ * on or -1 to not show anything.
|
||||
+ */
|
||||
sal_Int32 PresenterScreen::GetPresenterScreenNumber (
|
||||
const Reference<presentation::XPresentation2>& rxPresentation) const
|
||||
{
|
||||
@@ -475,6 +476,8 @@ sal_Int32 PresenterScreen::GetPresenterScreenNumber (
|
||||
return -1;
|
||||
}
|
||||
|
||||
+ SAL_INFO("sdext.presenter", "Display number is " << nDisplayNumber);
|
||||
+
|
||||
if (nDisplayNumber > 0)
|
||||
{
|
||||
nScreenNumber = nDisplayNumber - 1;
|
||||
@@ -518,7 +521,7 @@ sal_Int32 PresenterScreen::GetPresenterScreenNumber (
|
||||
// For some reason we can not access the screen number. Use
|
||||
// the default instead.
|
||||
}
|
||||
-
|
||||
+ SAL_INFO("sdext.presenter", "Get presenter screen for screen " << nScreenNumber);
|
||||
return GetPresenterScreenFromScreen(nScreenNumber);
|
||||
}
|
||||
|
||||
@@ -538,6 +541,8 @@ sal_Int32 PresenterScreen::GetPresenterScreenFromScreen( sal_Int32 nPresentation
|
||||
break;
|
||||
|
||||
default:
|
||||
+ SAL_INFO("sdext.presenter", "Warning unexpected, out of bound screen "
|
||||
+ "mapped to 0" << nPresentationScreen);
|
||||
// When the full screen presentation is displayed on a screen
|
||||
// other than 0 or 1 then place the presenter on the first
|
||||
// available screen.
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,183 +0,0 @@
|
||||
From 2331a7a2a748a94546c702a80e8916f548e30176 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
||||
Date: Thu, 20 Jun 2013 10:01:10 +0100
|
||||
Subject: [PATCH] move static bitmap into a svapp member
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
so it won't crash on exit when its dtor uses stuff destroyed by deinitvcl
|
||||
already.
|
||||
|
||||
also fix comparisons, i.e. presumably
|
||||
aLastColorTopLeft == aLastColorTopLeft etc
|
||||
should have been aLastColorTopLeft == aColorTopLeft
|
||||
|
||||
Change-Id: I1f3dc47504c5add113b3a8bcadf010ca3b9f4c31
|
||||
(cherry picked from commit a3694b1b32cb0677019962a5908fe775c83ed5a6)
|
||||
Reviewed-on: https://gerrit.libreoffice.org/5048
|
||||
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
|
||||
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
|
||||
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
||||
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
||||
---
|
||||
vcl/inc/svdata.hxx | 22 ++++++++++++++++++++++
|
||||
vcl/source/app/svdata.cxx | 9 +++++++++
|
||||
vcl/source/app/svmain.cxx | 3 +++
|
||||
vcl/source/gdi/bitmapex.cxx | 42 ++++++++++++++++++------------------------
|
||||
4 files changed, 52 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
|
||||
index 86b0d7a9..a929165 100644
|
||||
--- a/vcl/inc/svdata.hxx
|
||||
+++ b/vcl/inc/svdata.hxx
|
||||
@@ -284,6 +284,26 @@ struct ImplSVNWFData
|
||||
bool mbDDListBoxNoTextArea:1;
|
||||
};
|
||||
|
||||
+struct BlendFrameCache
|
||||
+{
|
||||
+ Size m_aLastSize;
|
||||
+ sal_uInt8 m_nLastAlpha;
|
||||
+ Color m_aLastColorTopLeft;
|
||||
+ Color m_aLastColorTopRight;
|
||||
+ Color m_aLastColorBottomRight;
|
||||
+ Color m_aLastColorBottomLeft;
|
||||
+ BitmapEx m_aLastResult;
|
||||
+
|
||||
+ BlendFrameCache()
|
||||
+ : m_aLastSize(0, 0)
|
||||
+ , m_nLastAlpha(0)
|
||||
+ , m_aLastColorTopLeft(COL_BLACK)
|
||||
+ , m_aLastColorTopRight(COL_BLACK)
|
||||
+ , m_aLastColorBottomRight(COL_BLACK)
|
||||
+ , m_aLastColorBottomLeft(COL_BLACK)
|
||||
+ {
|
||||
+ }
|
||||
+};
|
||||
|
||||
struct ImplSVData
|
||||
{
|
||||
@@ -312,6 +332,7 @@ struct ImplSVData
|
||||
UnoWrapperBase* mpUnoWrapper;
|
||||
Window* mpIntroWindow; // the splash screen
|
||||
DockingManager* mpDockingManager;
|
||||
+ BlendFrameCache* mpBlendFrameCache;
|
||||
sal_Bool mbIsTestTool;
|
||||
|
||||
oslThreadIdentifier mnMainThreadId;
|
||||
@@ -330,6 +351,7 @@ Window* ImplGetDefaultWindow();
|
||||
VCL_PLUGIN_PUBLIC ResMgr* ImplGetResMgr();
|
||||
VCL_PLUGIN_PUBLIC ResId VclResId( sal_Int32 nId ); // throws std::bad_alloc if no res mgr
|
||||
DockingManager* ImplGetDockingManager();
|
||||
+BlendFrameCache* ImplGetBlendFrameCache();
|
||||
void ImplWindowAutoMnemonic( Window* pWindow );
|
||||
|
||||
void ImplUpdateSystemProcessWindow();
|
||||
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
|
||||
index feec982..2a7bc93 100644
|
||||
--- a/vcl/source/app/svdata.cxx
|
||||
+++ b/vcl/source/app/svdata.cxx
|
||||
@@ -256,6 +256,15 @@ DockingManager* ImplGetDockingManager()
|
||||
return pSVData->mpDockingManager;
|
||||
}
|
||||
|
||||
+BlendFrameCache* ImplGetBlendFrameCache()
|
||||
+{
|
||||
+ ImplSVData* pSVData = ImplGetSVData();
|
||||
+ if ( !pSVData->mpBlendFrameCache)
|
||||
+ pSVData->mpBlendFrameCache= new BlendFrameCache();
|
||||
+
|
||||
+ return pSVData->mpBlendFrameCache;
|
||||
+}
|
||||
+
|
||||
class AccessBridgeCurrentContext: public cppu::WeakImplHelper1< com::sun::star::uno::XCurrentContext >
|
||||
{
|
||||
public:
|
||||
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
|
||||
index 21a351b..9104be9 100644
|
||||
--- a/vcl/source/app/svmain.cxx
|
||||
+++ b/vcl/source/app/svmain.cxx
|
||||
@@ -540,6 +540,9 @@ void DeInitVCL()
|
||||
if ( pSVData->maAppData.mpFirstEventHook )
|
||||
ImplFreeEventHookData();
|
||||
|
||||
+ if (pSVData->mpBlendFrameCache)
|
||||
+ delete pSVData->mpBlendFrameCache, pSVData->mpBlendFrameCache = NULL;
|
||||
+
|
||||
ImplDeletePrnQueueList();
|
||||
delete pSVData->maGDIData.mpScreenFontList;
|
||||
pSVData->maGDIData.mpScreenFontList = NULL;
|
||||
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
|
||||
index 1266043..094b7c7 100644
|
||||
--- a/vcl/source/gdi/bitmapex.cxx
|
||||
+++ b/vcl/source/gdi/bitmapex.cxx
|
||||
@@ -959,31 +959,25 @@ BitmapEx VCL_DLLPUBLIC createBlendFrame(
|
||||
Color aColorBottomRight,
|
||||
Color aColorBottomLeft)
|
||||
{
|
||||
- static Size aLastSize(0, 0);
|
||||
- static sal_uInt8 nLastAlpha(0);
|
||||
- static Color aLastColorTopLeft(COL_BLACK);
|
||||
- static Color aLastColorTopRight(COL_BLACK);
|
||||
- static Color aLastColorBottomRight(COL_BLACK);
|
||||
- static Color aLastColorBottomLeft(COL_BLACK);
|
||||
- static BitmapEx aLastResult;
|
||||
-
|
||||
- if(aLastSize == rSize
|
||||
- && nLastAlpha == nAlpha
|
||||
- && aLastColorTopLeft == aLastColorTopLeft
|
||||
- && aLastColorTopRight == aLastColorTopRight
|
||||
- && aLastColorBottomRight == aLastColorBottomRight
|
||||
- && aLastColorBottomLeft == aLastColorBottomLeft)
|
||||
+ BlendFrameCache* pBlendFrameCache = ImplGetBlendFrameCache();
|
||||
+
|
||||
+ if(pBlendFrameCache->m_aLastSize == rSize
|
||||
+ && pBlendFrameCache->m_nLastAlpha == nAlpha
|
||||
+ && pBlendFrameCache->m_aLastColorTopLeft == aColorTopLeft
|
||||
+ && pBlendFrameCache->m_aLastColorTopRight == aColorTopRight
|
||||
+ && pBlendFrameCache->m_aLastColorBottomRight == aColorBottomRight
|
||||
+ && pBlendFrameCache->m_aLastColorBottomLeft == aColorBottomLeft)
|
||||
{
|
||||
- return aLastResult;
|
||||
+ return pBlendFrameCache->m_aLastResult;
|
||||
}
|
||||
|
||||
- aLastSize = rSize;
|
||||
- nLastAlpha = nAlpha;
|
||||
- aLastColorTopLeft = aLastColorTopLeft;
|
||||
- aLastColorTopRight = aLastColorTopRight;
|
||||
- aLastColorBottomRight = aLastColorBottomRight;
|
||||
- aLastColorBottomLeft = aLastColorBottomLeft;
|
||||
- aLastResult.Clear();
|
||||
+ pBlendFrameCache->m_aLastSize = rSize;
|
||||
+ pBlendFrameCache->m_nLastAlpha = nAlpha;
|
||||
+ pBlendFrameCache->m_aLastColorTopLeft = aColorTopLeft;
|
||||
+ pBlendFrameCache->m_aLastColorTopRight = aColorTopRight;
|
||||
+ pBlendFrameCache->m_aLastColorBottomRight = aColorBottomRight;
|
||||
+ pBlendFrameCache->m_aLastColorBottomLeft = aColorBottomLeft;
|
||||
+ pBlendFrameCache->m_aLastResult.Clear();
|
||||
|
||||
const long nW(rSize.Width());
|
||||
const long nH(rSize.Height());
|
||||
@@ -1055,7 +1049,7 @@ BitmapEx VCL_DLLPUBLIC createBlendFrame(
|
||||
aContent.ReleaseAccess(pContent);
|
||||
aAlpha.ReleaseAccess(pAlpha);
|
||||
|
||||
- aLastResult = BitmapEx(aContent, aAlpha);
|
||||
+ pBlendFrameCache->m_aLastResult = BitmapEx(aContent, aAlpha);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1071,7 +1065,7 @@ BitmapEx VCL_DLLPUBLIC createBlendFrame(
|
||||
}
|
||||
}
|
||||
|
||||
- return aLastResult;
|
||||
+ return pBlendFrameCache->m_aLastResult;
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,286 +0,0 @@
|
||||
From 3d1ab404feb742c59652b381c54af4ca624dca15 Mon Sep 17 00:00:00 2001
|
||||
From: Eike Rathke <erack@redhat.com>
|
||||
Date: Tue, 23 Jul 2013 17:17:18 +0200
|
||||
Subject: [PATCH] resolved fdo#67094 handle <text:s> in <text:p> and
|
||||
<text:span>
|
||||
|
||||
821521f757569c96ded6004bb2cb0d003481b55b introduced XML_SPAN but removed
|
||||
handling of XML_S repeated U+0020, SPACE
|
||||
|
||||
Change-Id: Ic1b00c9dbc33c750b9a8cae910b4ca0bed42ab5a
|
||||
(cherry picked from commit be10607d358f7587f10e76084893ceed3a4c9215)
|
||||
Reviewed-on: https://gerrit.libreoffice.org/5052
|
||||
Reviewed-by: Petr Mladek <pmladek@suse.cz>
|
||||
Tested-by: Petr Mladek <pmladek@suse.cz>
|
||||
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
|
||||
Reviewed-by: Kohei Yoshida <kohei.yoshida@suse.de>
|
||||
Tested-by: Kohei Yoshida <kohei.yoshida@suse.de>
|
||||
---
|
||||
sc/source/filter/xml/celltextparacontext.cxx | 84 ++++++++++++++++++++++++++++
|
||||
sc/source/filter/xml/celltextparacontext.hxx | 23 +++++++-
|
||||
sc/source/filter/xml/xmlimprt.cxx | 19 +++++++
|
||||
sc/source/filter/xml/xmlimprt.hxx | 14 ++++-
|
||||
4 files changed, 138 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/sc/source/filter/xml/celltextparacontext.cxx b/sc/source/filter/xml/celltextparacontext.cxx
|
||||
index fbbcf6f..f251f11 100644
|
||||
--- a/sc/source/filter/xml/celltextparacontext.cxx
|
||||
+++ b/sc/source/filter/xml/celltextparacontext.cxx
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "xmlcelli.hxx"
|
||||
|
||||
#include "xmloff/nmspmap.hxx"
|
||||
+#include "comphelper/string.hxx"
|
||||
|
||||
#include <com/sun/star/xml/sax/XAttributeList.hpp>
|
||||
|
||||
@@ -53,6 +54,8 @@ SvXMLImportContext* ScXMLCellTextParaContext::CreateChildContext(
|
||||
const SvXMLTokenMap& rTokenMap = GetScImport().GetCellTextParaElemTokenMap();
|
||||
switch (rTokenMap.Get(nPrefix, rLocalName))
|
||||
{
|
||||
+ case XML_TOK_CELL_TEXT_S:
|
||||
+ return new ScXMLCellFieldSContext(GetScImport(), nPrefix, rLocalName, *this);
|
||||
case XML_TOK_CELL_TEXT_SPAN:
|
||||
return new ScXMLCellTextSpanContext(GetScImport(), nPrefix, rLocalName, *this);
|
||||
case XML_TOK_CELL_TEXT_SHEET_NAME:
|
||||
@@ -179,6 +182,12 @@ SvXMLImportContext* ScXMLCellTextSpanContext::CreateChildContext(
|
||||
p->SetStyleName(maStyleName);
|
||||
return p;
|
||||
}
|
||||
+ case XML_TOK_CELL_TEXT_SPAN_ELEM_S:
|
||||
+ {
|
||||
+ ScXMLCellFieldSContext* p = new ScXMLCellFieldSContext(GetScImport(), nPrefix, rLocalName, mrParentCxt);
|
||||
+ p->SetStyleName(maStyleName);
|
||||
+ return p;
|
||||
+ }
|
||||
default:
|
||||
;
|
||||
}
|
||||
@@ -338,4 +347,79 @@ SvXMLImportContext* ScXMLCellFieldURLContext::CreateChildContext(
|
||||
return new SvXMLImportContext(GetImport(), nPrefix, rLocalName);
|
||||
}
|
||||
|
||||
+ScXMLCellFieldSContext::ScXMLCellFieldSContext(
|
||||
+ ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, ScXMLCellTextParaContext& rParent) :
|
||||
+ ScXMLImportContext(rImport, nPrefix, rLName),
|
||||
+ mrParentCxt(rParent),
|
||||
+ mnCount(1)
|
||||
+{
|
||||
+}
|
||||
+
|
||||
+void ScXMLCellFieldSContext::SetStyleName(const OUString& rStyleName)
|
||||
+{
|
||||
+ maStyleName = rStyleName;
|
||||
+}
|
||||
+
|
||||
+void ScXMLCellFieldSContext::StartElement(const uno::Reference<xml::sax::XAttributeList>& xAttrList)
|
||||
+{
|
||||
+ if (!xAttrList.is())
|
||||
+ return;
|
||||
+
|
||||
+ OUString aLocalName;
|
||||
+ sal_Int16 nAttrCount = xAttrList->getLength();
|
||||
+
|
||||
+ const SvXMLTokenMap& rTokenMap = GetScImport().GetCellTextSAttrTokenMap();
|
||||
+ for (sal_Int16 i = 0; i < nAttrCount; ++i)
|
||||
+ {
|
||||
+ sal_uInt16 nAttrPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName(
|
||||
+ xAttrList->getNameByIndex(i), &aLocalName);
|
||||
+
|
||||
+ const OUString& rAttrValue = xAttrList->getValueByIndex(i);
|
||||
+ sal_uInt16 nToken = rTokenMap.Get(nAttrPrefix, aLocalName);
|
||||
+ switch (nToken)
|
||||
+ {
|
||||
+ case XML_TOK_CELL_TEXT_S_ATTR_C:
|
||||
+ mnCount = rAttrValue.toInt32();
|
||||
+ if (mnCount <= 0)
|
||||
+ mnCount = 1; // worth a warning?
|
||||
+ break;
|
||||
+ default:
|
||||
+ ;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void ScXMLCellFieldSContext::EndElement()
|
||||
+{
|
||||
+ if (mnCount)
|
||||
+ PushSpaces();
|
||||
+}
|
||||
+
|
||||
+SvXMLImportContext* ScXMLCellFieldSContext::CreateChildContext(
|
||||
+ sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& /*xAttrList*/)
|
||||
+{
|
||||
+ // <text:s> does not have child elements, but ...
|
||||
+ if (mnCount)
|
||||
+ {
|
||||
+ PushSpaces();
|
||||
+ }
|
||||
+
|
||||
+ return new SvXMLImportContext(GetImport(), nPrefix, rLocalName);
|
||||
+}
|
||||
+
|
||||
+void ScXMLCellFieldSContext::PushSpaces()
|
||||
+{
|
||||
+ if (mnCount > 0)
|
||||
+ {
|
||||
+ if (mnCount == 1)
|
||||
+ mrParentCxt.PushSpan(" ", maStyleName);
|
||||
+ else
|
||||
+ {
|
||||
+ OUStringBuffer aBuf( mnCount);
|
||||
+ comphelper::string::padToLength( aBuf, mnCount, ' ');
|
||||
+ mrParentCxt.PushSpan( aBuf.makeStringAndClear(), maStyleName);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
diff --git a/sc/source/filter/xml/celltextparacontext.hxx b/sc/source/filter/xml/celltextparacontext.hxx
|
||||
index 10e5a23..68adaae 100644
|
||||
--- a/sc/source/filter/xml/celltextparacontext.hxx
|
||||
+++ b/sc/source/filter/xml/celltextparacontext.hxx
|
||||
@@ -134,6 +134,27 @@ public:
|
||||
sal_uInt16 nPrefix, const OUString& rLocalName, const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList);
|
||||
};
|
||||
|
||||
+/**
|
||||
+ * This context handles <text:s> element inside <text:p> or <text:span>.
|
||||
+ */
|
||||
+class ScXMLCellFieldSContext : public ScXMLImportContext
|
||||
+{
|
||||
+ ScXMLCellTextParaContext& mrParentCxt;
|
||||
+ OUString maStyleName;
|
||||
+ sal_Int32 mnCount;
|
||||
+
|
||||
+ void PushSpaces();
|
||||
+public:
|
||||
+ ScXMLCellFieldSContext(ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, ScXMLCellTextParaContext& rParent);
|
||||
+
|
||||
+ void SetStyleName(const OUString& rStyleName);
|
||||
+
|
||||
+ virtual void StartElement(const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList);
|
||||
+ virtual void EndElement();
|
||||
+ virtual SvXMLImportContext* CreateChildContext(
|
||||
+ sal_uInt16 nPrefix, const OUString& rLocalName, const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList);
|
||||
+};
|
||||
+
|
||||
#endif
|
||||
|
||||
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
\ No newline at end of file
|
||||
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
|
||||
index d1e5e47..87a781a 100644
|
||||
--- a/sc/source/filter/xml/xmlimprt.cxx
|
||||
+++ b/sc/source/filter/xml/xmlimprt.cxx
|
||||
@@ -1848,6 +1848,7 @@ const SvXMLTokenMap& ScXMLImport::GetCellTextParaElemTokenMap()
|
||||
{
|
||||
static SvXMLTokenMapEntry aMap[] =
|
||||
{
|
||||
+ { XML_NAMESPACE_TEXT, XML_S, XML_TOK_CELL_TEXT_S },
|
||||
{ XML_NAMESPACE_TEXT, XML_SPAN, XML_TOK_CELL_TEXT_SPAN },
|
||||
{ XML_NAMESPACE_TEXT, XML_SHEET_NAME, XML_TOK_CELL_TEXT_SHEET_NAME },
|
||||
{ XML_NAMESPACE_TEXT, XML_DATE, XML_TOK_CELL_TEXT_DATE },
|
||||
@@ -1871,6 +1872,7 @@ const SvXMLTokenMap& ScXMLImport::GetCellTextSpanElemTokenMap()
|
||||
{ XML_NAMESPACE_TEXT, XML_DATE, XML_TOK_CELL_TEXT_SPAN_ELEM_DATE },
|
||||
{ XML_NAMESPACE_TEXT, XML_TITLE, XML_TOK_CELL_TEXT_SPAN_ELEM_TITLE },
|
||||
{ XML_NAMESPACE_TEXT, XML_A, XML_TOK_CELL_TEXT_SPAN_ELEM_URL },
|
||||
+ { XML_NAMESPACE_TEXT, XML_S, XML_TOK_CELL_TEXT_SPAN_ELEM_S },
|
||||
XML_TOKEN_MAP_END
|
||||
};
|
||||
|
||||
@@ -1910,6 +1912,21 @@ const SvXMLTokenMap& ScXMLImport::GetCellTextURLAttrTokenMap()
|
||||
return *pCellTextURLAttrTokenMap;
|
||||
}
|
||||
|
||||
+const SvXMLTokenMap& ScXMLImport::GetCellTextSAttrTokenMap()
|
||||
+{
|
||||
+ if (!pCellTextSAttrTokenMap)
|
||||
+ {
|
||||
+ static const SvXMLTokenMapEntry aMap[] =
|
||||
+ {
|
||||
+ { XML_NAMESPACE_TEXT, XML_C, XML_TOK_CELL_TEXT_S_ATTR_C },
|
||||
+ XML_TOKEN_MAP_END
|
||||
+ };
|
||||
+
|
||||
+ pCellTextSAttrTokenMap = new SvXMLTokenMap(aMap);
|
||||
+ }
|
||||
+ return *pCellTextSAttrTokenMap;
|
||||
+}
|
||||
+
|
||||
SvXMLImportContext *ScXMLImport::CreateContext( sal_uInt16 nPrefix,
|
||||
const OUString& rLocalName,
|
||||
const uno::Reference<xml::sax::XAttributeList>& xAttrList )
|
||||
@@ -2035,6 +2052,7 @@ ScXMLImport::ScXMLImport(
|
||||
pCellTextSpanElemTokenMap(NULL),
|
||||
pCellTextSpanAttrTokenMap(NULL),
|
||||
pCellTextURLAttrTokenMap(NULL),
|
||||
+ pCellTextSAttrTokenMap(NULL),
|
||||
aTables(*this),
|
||||
pMyNamedExpressions(NULL),
|
||||
pMyLabelRanges(NULL),
|
||||
@@ -2176,6 +2194,7 @@ ScXMLImport::~ScXMLImport() throw()
|
||||
delete pCellTextSpanElemTokenMap;
|
||||
delete pCellTextSpanAttrTokenMap;
|
||||
delete pCellTextURLAttrTokenMap;
|
||||
+ delete pCellTextSAttrTokenMap;
|
||||
|
||||
delete pChangeTrackingImportHelper;
|
||||
delete pNumberFormatAttributesExportHelper;
|
||||
diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx
|
||||
index aa85f7e..9386614 100644
|
||||
--- a/sc/source/filter/xml/xmlimprt.hxx
|
||||
+++ b/sc/source/filter/xml/xmlimprt.hxx
|
||||
@@ -688,6 +688,7 @@ enum ScXMLConsolidationAttrTokens
|
||||
*/
|
||||
enum ScXMLCellTextParaElemTokens
|
||||
{
|
||||
+ XML_TOK_CELL_TEXT_S,
|
||||
XML_TOK_CELL_TEXT_SPAN,
|
||||
XML_TOK_CELL_TEXT_SHEET_NAME,
|
||||
XML_TOK_CELL_TEXT_DATE,
|
||||
@@ -703,7 +704,8 @@ enum ScXMLCellTextSpanElemTokens
|
||||
XML_TOK_CELL_TEXT_SPAN_ELEM_SHEET_NAME,
|
||||
XML_TOK_CELL_TEXT_SPAN_ELEM_DATE,
|
||||
XML_TOK_CELL_TEXT_SPAN_ELEM_TITLE,
|
||||
- XML_TOK_CELL_TEXT_SPAN_ELEM_URL
|
||||
+ XML_TOK_CELL_TEXT_SPAN_ELEM_URL,
|
||||
+ XML_TOK_CELL_TEXT_SPAN_ELEM_S
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -720,6 +722,14 @@ enum ScXMLCellTextURLAttrTokens
|
||||
XML_TOK_CELL_TEXT_URL_ATTR_TYPE,
|
||||
};
|
||||
|
||||
+/**
|
||||
+ * Tokens for attributes for <text:s>
|
||||
+ */
|
||||
+enum ScXMLCellTextSAttrTokens
|
||||
+{
|
||||
+ XML_TOK_CELL_TEXT_S_ATTR_C
|
||||
+};
|
||||
+
|
||||
class SvXMLTokenMap;
|
||||
class XMLShapeImportHelper;
|
||||
class ScXMLChangeTrackingImportHelper;
|
||||
@@ -892,6 +902,7 @@ class ScXMLImport: public SvXMLImport, boost::noncopyable
|
||||
SvXMLTokenMap *pCellTextSpanElemTokenMap;
|
||||
SvXMLTokenMap *pCellTextSpanAttrTokenMap;
|
||||
SvXMLTokenMap *pCellTextURLAttrTokenMap;
|
||||
+ SvXMLTokenMap *pCellTextSAttrTokenMap;
|
||||
|
||||
ScMyTables aTables;
|
||||
|
||||
@@ -1061,6 +1072,7 @@ public:
|
||||
const SvXMLTokenMap& GetCellTextSpanElemTokenMap();
|
||||
const SvXMLTokenMap& GetCellTextSpanAttrTokenMap();
|
||||
const SvXMLTokenMap& GetCellTextURLAttrTokenMap();
|
||||
+ const SvXMLTokenMap& GetCellTextSAttrTokenMap();
|
||||
|
||||
void AddNamedExpression(ScMyNamedExpression* pMyNamedExpression)
|
||||
{
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,63 +0,0 @@
|
||||
From 70376f610a7eb876739829e1f362bc94b21cb82f Mon Sep 17 00:00:00 2001
|
||||
From: David Tardon <dtardon@redhat.com>
|
||||
Date: Thu, 11 Jul 2013 09:25:16 +0200
|
||||
Subject: [PATCH] rhbz#980387 fix filter selection from file ext.
|
||||
|
||||
... for filters that have more than one extension associated with them
|
||||
(e.g., JPEG).
|
||||
|
||||
Change-Id: Ic6b16d3b4aa17580404d02a9fb7b087b9aa52fc2
|
||||
---
|
||||
vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 22 +++++++++++++++++++++-
|
||||
1 file changed, 21 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
|
||||
index 389e3f3..d237b86 100644
|
||||
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
|
||||
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
|
||||
#include <com/sun/star/ui/dialogs/ControlActions.hpp>
|
||||
#include <com/sun/star/uno/Any.hxx>
|
||||
+#include <comphelper/string.hxx>
|
||||
#include <osl/mutex.hxx>
|
||||
#include "unx/gtk/gtkinst.hxx"
|
||||
|
||||
@@ -790,6 +791,25 @@ uno::Sequence<OUString> SAL_CALL SalGtkFilePicker::getFiles() throw( uno::Runtim
|
||||
return aFiles;
|
||||
}
|
||||
|
||||
+namespace
|
||||
+{
|
||||
+
|
||||
+bool lcl_matchFilter( const rtl::OUString& rFilter, const rtl::OUString& rExt )
|
||||
+{
|
||||
+ const int nCount = comphelper::string::getTokenCount( rFilter, ';' );
|
||||
+
|
||||
+ for ( int n = 0; n != nCount; ++n )
|
||||
+ {
|
||||
+ const rtl::OUString aToken = comphelper::string::getToken( rFilter, n, ';' );
|
||||
+ if ( aToken == rExt )
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+}
|
||||
+
|
||||
uno::Sequence<OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw( uno::RuntimeException )
|
||||
{
|
||||
SolarMutexGuard g;
|
||||
@@ -852,7 +872,7 @@ uno::Sequence<OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw( uno
|
||||
++aListIter
|
||||
)
|
||||
{
|
||||
- if( aListIter->getFilter().equalsIgnoreAsciiCase( aStarDot+sExtension ) )
|
||||
+ if( lcl_matchFilter( aListIter->getFilter(), aStarDot+sExtension ) )
|
||||
{
|
||||
if( aNewFilter.isEmpty() )
|
||||
aNewFilter = aListIter->getTitle();
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,103 +0,0 @@
|
||||
From 0c1d2fcdcfbfe83317e8660dd6165f3b438e80ad Mon Sep 17 00:00:00 2001
|
||||
From: Stephan Bergmann <sbergman@redhat.com>
|
||||
Date: Tue, 30 Jul 2013 09:01:01 +0200
|
||||
Subject: [PATCH] rhbz#989246: Honor user's JavaDriverClass override in mysql
|
||||
driver
|
||||
|
||||
Change-Id: Ic7dbddb5b17af0bd23864fd19ab2bd815969d008
|
||||
(cherry picked from commit 63897351fc4fd31305bef43b649be74e2b6006c4)
|
||||
Reviewed-on: https://gerrit.libreoffice.org/5193
|
||||
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
|
||||
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
|
||||
---
|
||||
connectivity/source/drivers/mysql/YDriver.cxx | 36 +++++++++++++++++++--------
|
||||
1 file changed, 25 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/connectivity/source/drivers/mysql/YDriver.cxx b/connectivity/source/drivers/mysql/YDriver.cxx
|
||||
index bd826e0..b55f464 100644
|
||||
--- a/connectivity/source/drivers/mysql/YDriver.cxx
|
||||
+++ b/connectivity/source/drivers/mysql/YDriver.cxx
|
||||
@@ -49,6 +49,15 @@ namespace connectivity
|
||||
}
|
||||
}
|
||||
|
||||
+ namespace
|
||||
+ {
|
||||
+ OUString getJavaDriverClass(
|
||||
+ css::uno::Sequence<css::beans::PropertyValue> const & info)
|
||||
+ {
|
||||
+ return comphelper::NamedValueCollection(info).getOrDefault(
|
||||
+ "JavaDriverClass", OUString("com.mysql.jdbc.Driver"));
|
||||
+ }
|
||||
+ }
|
||||
|
||||
//====================================================================
|
||||
//= ODriverDelegator
|
||||
@@ -156,9 +165,14 @@ namespace connectivity
|
||||
const PropertyValue* pEnd = pSupported + info.getLength();
|
||||
|
||||
aProps.reserve(info.getLength() + 5);
|
||||
+ bool jdc = false;
|
||||
for (;pSupported != pEnd; ++pSupported)
|
||||
{
|
||||
aProps.push_back( *pSupported );
|
||||
+ if (pSupported->Name == "JavaDriverClass")
|
||||
+ {
|
||||
+ jdc = true;
|
||||
+ }
|
||||
}
|
||||
|
||||
if ( _eType == D_ODBC )
|
||||
@@ -176,11 +190,14 @@ namespace connectivity
|
||||
}
|
||||
else if ( _eType == D_JDBC )
|
||||
{
|
||||
- aProps.push_back( PropertyValue(
|
||||
- OUString("JavaDriverClass")
|
||||
- ,0
|
||||
- ,makeAny(OUString("com.mysql.jdbc.Driver"))
|
||||
- ,PropertyState_DIRECT_VALUE) );
|
||||
+ if (!jdc)
|
||||
+ {
|
||||
+ aProps.push_back( PropertyValue(
|
||||
+ OUString("JavaDriverClass")
|
||||
+ ,0
|
||||
+ ,makeAny(OUString("com.mysql.jdbc.Driver"))
|
||||
+ ,PropertyState_DIRECT_VALUE) );
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -229,10 +246,7 @@ namespace connectivity
|
||||
}
|
||||
else
|
||||
{
|
||||
- ::comphelper::NamedValueCollection aSettings( info );
|
||||
- OUString sDriverClass("com.mysql.jdbc.Driver");
|
||||
- sDriverClass = aSettings.getOrDefault( "JavaDriverClass", sDriverClass );
|
||||
-
|
||||
+ OUString sDriverClass(getJavaDriverClass(info));
|
||||
TJDBCDrivers::iterator aFind = m_aJdbcDrivers.find(sDriverClass);
|
||||
if ( aFind == m_aJdbcDrivers.end() )
|
||||
aFind = m_aJdbcDrivers.insert(TJDBCDrivers::value_type(sDriverClass,lcl_loadDriver(m_xContext,sCuttedUrl))).first;
|
||||
@@ -318,7 +332,7 @@ namespace connectivity
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
- Sequence< DriverPropertyInfo > SAL_CALL ODriverDelegator::getPropertyInfo( const OUString& url, const Sequence< PropertyValue >& /*info*/ ) throw (SQLException, RuntimeException)
|
||||
+ Sequence< DriverPropertyInfo > SAL_CALL ODriverDelegator::getPropertyInfo( const OUString& url, const Sequence< PropertyValue >& info ) throw (SQLException, RuntimeException)
|
||||
{
|
||||
::std::vector< DriverPropertyInfo > aDriverInfo;
|
||||
if ( !acceptsURL(url) )
|
||||
@@ -350,7 +364,7 @@ namespace connectivity
|
||||
OUString("JavaDriverClass")
|
||||
,OUString("The JDBC driver class name.")
|
||||
,sal_True
|
||||
- ,OUString("com.mysql.jdbc.Driver")
|
||||
+ ,getJavaDriverClass(info)
|
||||
,Sequence< OUString >())
|
||||
);
|
||||
}
|
||||
--
|
||||
1.8.1.4
|
||||
|
@ -1,34 +0,0 @@
|
||||
From 24c1cea3bb964d6d2255c2bd9f1433413aa3e694 Mon Sep 17 00:00:00 2001
|
||||
From: David Tardon <dtardon@redhat.com>
|
||||
Date: Tue, 30 Jul 2013 06:45:48 +0200
|
||||
Subject: [PATCH] sanitize system clucene includes
|
||||
|
||||
Apparently clucene bundles pieces of a very old version of boost (1.42)
|
||||
in CLucene/ext/boost, which breaks build with boost 1.54.
|
||||
|
||||
(cherry picked from commit 24add548ac163651de5e3372798f0d4db347de77)
|
||||
Signed-off-by: David Tardon <dtardon@redhat.com>
|
||||
|
||||
Conflicts:
|
||||
configure.ac
|
||||
|
||||
Change-Id: Ib244222f8f048aefe0484060f9ad5f41bfd24def
|
||||
---
|
||||
configure.ac | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 03d2ef8..ce04c65 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -7144,6 +7144,7 @@ if test "$with_system_clucene" = "yes"; then
|
||||
AC_MSG_RESULT([external])
|
||||
SYSTEM_CLUCENE=YES
|
||||
PKG_CHECK_MODULES(CLUCENE, libclucene-core)
|
||||
+ CLUCENE_CFLAGS=[$(printf '%s' "$CLUCENE_CFLAGS" | sed -e 's@-I[^ ]*/CLucene/ext@@')]
|
||||
AC_LANG_PUSH([C++])
|
||||
save_CXXFLAGS=$CXXFLAGS
|
||||
save_CPPFLAGS=$CPPFLAGS
|
||||
--
|
||||
1.8.3.1
|
||||
|
Loading…
Reference in new issue