Accepting request 149943 from LibreOffice:Stable
- do-not-delete-PropertyMapEntry-instance.diff: lost charts (bnc#798271) OBS-URL: https://build.opensuse.org/request/show/149943 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=24
This commit is contained in:
parent
7a04f23023
commit
3fc707e7bb
75
do-not-delete-PropertyMapEntry-instance.diff
Normal file
75
do-not-delete-PropertyMapEntry-instance.diff
Normal file
@ -0,0 +1,75 @@
|
||||
From 4153bcbc8e568e8e33c56bab68e9ea036c5dce5b Mon Sep 17 00:00:00 2001
|
||||
From: Kohei Yoshida <kohei.yoshida@gmail.com>
|
||||
Date: Thu, 24 Jan 2013 22:24:44 -0500
|
||||
Subject: [PATCH] bnc#798271: Don't delete the PropertyMapEntry instance
|
||||
prematurely.
|
||||
|
||||
When using comphelper::PropertyMapEntry array to create a UNO property
|
||||
set, we need to make sure we keep this instance while the property set
|
||||
object is alive, else it would cause a very hard-to-debug problem down
|
||||
the road...
|
||||
|
||||
In this particular case, the aExportInfoMap array instance was destroyed
|
||||
when it went out of scope, but the xInfoSet which references it was used
|
||||
afterward.
|
||||
|
||||
Change-Id: I02132b6b2e6bef7b461f0f77c2c4a3e911e42014
|
||||
---
|
||||
chart2/source/model/filter/XMLFilter.cxx | 40 +++++++++++++++-----------------
|
||||
1 file changed, 19 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/chart2/source/model/filter/XMLFilter.cxx b/chart2/source/model/filter/XMLFilter.cxx
|
||||
index 2a6e35b..551e9b2 100644
|
||||
--- a/chart2/source/model/filter/XMLFilter.cxx
|
||||
+++ b/chart2/source/model/filter/XMLFilter.cxx
|
||||
@@ -644,28 +644,26 @@ sal_Int32 XMLFilter::impl_Export(
|
||||
xServiceFactory->createInstanceWithArguments(
|
||||
C2U("com.sun.star.comp.Svx.GraphicExportHelper"), aGraphicResolverArgs ), uno::UNO_QUERY );
|
||||
|
||||
- uno::Reference< beans::XPropertySet > xInfoSet;
|
||||
+ // property map for export info set
|
||||
+ comphelper::PropertyMapEntry aExportInfoMap[] =
|
||||
{
|
||||
- // property map for export info set
|
||||
- comphelper::PropertyMapEntry aExportInfoMap[] =
|
||||
- {
|
||||
- { MAP_LEN("UsePrettyPrinting"), 0, &::getBooleanCppuType(), beans::PropertyAttribute::MAYBEVOID, 0},
|
||||
- { MAP_LEN("BaseURI"), 0, &::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 },
|
||||
- { MAP_LEN("StreamRelPath"), 0, &::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 },
|
||||
- { MAP_LEN("StreamName"), 0, &::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 },
|
||||
- { MAP_LEN("ExportTableNumberList"), 0, &::getBooleanCppuType(), beans::PropertyAttribute::MAYBEVOID, 0 },
|
||||
- { NULL, 0, 0, NULL, 0, 0 }
|
||||
- };
|
||||
-
|
||||
- xInfoSet = comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aExportInfoMap ) );
|
||||
-
|
||||
- SvtSaveOptions aSaveOpt;
|
||||
- OUString sUsePrettyPrinting(RTL_CONSTASCII_USTRINGPARAM("UsePrettyPrinting"));
|
||||
- sal_Bool bUsePrettyPrinting( aSaveOpt.IsPrettyPrinting() );
|
||||
- xInfoSet->setPropertyValue( sUsePrettyPrinting, uno::makeAny( bUsePrettyPrinting ) );
|
||||
- if( ! bOasis )
|
||||
- xInfoSet->setPropertyValue( C2U("ExportTableNumberList"), uno::makeAny( true ));
|
||||
- }
|
||||
+ { MAP_LEN("UsePrettyPrinting"), 0, &::getBooleanCppuType(), beans::PropertyAttribute::MAYBEVOID, 0},
|
||||
+ { MAP_LEN("BaseURI"), 0, &::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 },
|
||||
+ { MAP_LEN("StreamRelPath"), 0, &::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 },
|
||||
+ { MAP_LEN("StreamName"), 0, &::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 },
|
||||
+ { MAP_LEN("ExportTableNumberList"), 0, &::getBooleanCppuType(), beans::PropertyAttribute::MAYBEVOID, 0 },
|
||||
+ { NULL, 0, 0, NULL, 0, 0 }
|
||||
+ };
|
||||
+
|
||||
+ uno::Reference< beans::XPropertySet > xInfoSet =
|
||||
+ comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aExportInfoMap ) );
|
||||
+
|
||||
+ SvtSaveOptions aSaveOpt;
|
||||
+ OUString sUsePrettyPrinting(RTL_CONSTASCII_USTRINGPARAM("UsePrettyPrinting"));
|
||||
+ sal_Bool bUsePrettyPrinting( aSaveOpt.IsPrettyPrinting() );
|
||||
+ xInfoSet->setPropertyValue( sUsePrettyPrinting, uno::makeAny( bUsePrettyPrinting ) );
|
||||
+ if( ! bOasis )
|
||||
+ xInfoSet->setPropertyValue( C2U("ExportTableNumberList"), uno::makeAny( true ));
|
||||
|
||||
sal_Int32 nArgs = 2;
|
||||
if( xGraphicObjectResolver.is())
|
||||
--
|
||||
1.8.0.2
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 25 10:17:26 UTC 2013 - pmladek@suse.com
|
||||
|
||||
- do-not-delete-PropertyMapEntry-instance.diff: lost charts (bnc#798271)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 14 16:08:15 UTC 2012 - pmladek@suse.com
|
||||
|
||||
|
@ -635,6 +635,8 @@ Patch17: pack-addressbook.diff
|
||||
# add pyuno to python path
|
||||
# FIXME: related to system-python-ure-bootstrap.diff
|
||||
Patch18: pyuno-path.diff
|
||||
# lost charts (bcn#798271)
|
||||
Patch19: do-not-delete-PropertyMapEntry-instance.diff
|
||||
#
|
||||
# default to MS Office 97/2000/XP file formats on MeeGo; asked by HP
|
||||
Patch900: officecfg-defaul-export-ms-file-formats.diff
|
||||
@ -1348,6 +1350,7 @@ the LibreOffice localizations separately.
|
||||
%patch16 -p1
|
||||
%patch17
|
||||
%patch18
|
||||
%patch19 -p1
|
||||
#
|
||||
%if 0%{?meego_version}
|
||||
# default to MS Office 97/2000/XP file formats on MeeGo; asked by HP
|
||||
|
Loading…
x
Reference in New Issue
Block a user