libreoffice/revert-allow-impress-import-of-embedded-color-tables-impress.diff

122 lines
6.2 KiB
Diff

commit fc887c956cea89a48485104055f5feb313b6a50a
Author: Petr Mladek <pmladek@suse.cz>
Date: Mon Sep 5 12:11:38 2011 +0200
Revert "allow impress import of embedded color tables"
Broke .odp export and needed more love (bnc#715931)
This reverts commit 3e9f76415ae3f953d4585d67173b567abcba4e7d.
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index 2e3065d..4ffaba4 100644
--- sd/source/filter/xml/sdxmlwrp.cxx
+++ sd/source/filter/xml/sdxmlwrp.cxx
@@ -490,7 +490,7 @@ sal_Bool SdXMLFilter::Import( ErrCode& nError )
// -------------------------------------
- /** property map for import info set */
+ /** property map for export info set */
PropertyMapEntry aImportInfoMap[] =
{
// necessary properties for XML progress bar at load time
@@ -514,8 +514,6 @@ sal_Bool SdXMLFilter::Import( ErrCode& nError )
{ MAP_LEN( "BuildId" ), 0,
&::getCppuType( (OUString *)0 ),
::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 },
- { MAP_LEN( "SourceStorage" ), 0, &embed::XStorage::static_type(),
- ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 },
{ NULL, 0, 0, NULL, 0, 0 }
};
@@ -593,9 +591,6 @@ sal_Bool SdXMLFilter::Import( ErrCode& nError )
Reference<io::XInputStream> xInputStream;
uno::Reference < embed::XStorage > xStorage = mrMedium.GetStorage();
- OUString sSourceStorage( RTL_CONSTASCII_USTRINGPARAM("SourceStorage") );
- xInfoSet->setPropertyValue( sSourceStorage, Any( xStorage ) );
-
if( !xStorage.is() )
nRet = SD_XML_READERROR;
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
index 6fbb6b2..7880bff 100644
--- sd/source/ui/unoidl/UnoDocumentSettings.cxx
+++ sd/source/ui/unoidl/UnoDocumentSettings.cxx
@@ -30,7 +30,6 @@
#include "precompiled_sd.hxx"
#include <vector>
-#include <com/sun/star/io/XStream.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
@@ -132,13 +131,10 @@ enum SdDocumentSettingsPropertyHandles
HANDLE_PRINTDRAWING, HANDLE_PRINTNOTES, HANDLE_PRINTHANDOUT, HANDLE_PRINTOUTLINE, HANDLE_MEASUREUNIT, HANDLE_SCALE_NUM,
HANDLE_SCALE_DOM, HANDLE_TABSTOP, HANDLE_PRINTPAGENAME, HANDLE_PRINTDATE, HANDLE_PRINTTIME,
HANDLE_PRINTHIDENPAGES, HANDLE_PRINTFITPAGE, HANDLE_PRINTTILEPAGE, HANDLE_PRINTBOOKLET, HANDLE_PRINTBOOKLETFRONT,
- HANDLE_PRINTBOOKLETBACK, HANDLE_PRINTQUALITY,
-
- HANDLE_COLORTABLE, // temporary partial patch addition ...
- HANDLE_COLORTABLEURL, HANDLE_DASHTABLEURL, HANDLE_LINEENDTABLEURL, HANDLE_HATCHTABLEURL, HANDLE_GRADIENTTABLEURL, HANDLE_BITMAPTABLEURL,
-
- HANDLE_FORBIDDENCHARS, HANDLE_APPLYUSERDATA, HANDLE_PAGENUMFMT, HANDLE_PRINTERNAME, HANDLE_PRINTERJOB, HANDLE_PARAGRAPHSUMMATION,
- HANDLE_CHARCOMPRESS, HANDLE_ASIANPUNCT, HANDLE_UPDATEFROMTEMPLATE, HANDLE_PRINTER_INDEPENDENT_LAYOUT
+ HANDLE_PRINTBOOKLETBACK, HANDLE_PRINTQUALITY, HANDLE_COLORTABLEURL, HANDLE_DASHTABLEURL, HANDLE_LINEENDTABLEURL, HANDLE_HATCHTABLEURL,
+ HANDLE_GRADIENTTABLEURL, HANDLE_BITMAPTABLEURL, HANDLE_FORBIDDENCHARS, HANDLE_APPLYUSERDATA, HANDLE_PAGENUMFMT,
+ HANDLE_PRINTERNAME, HANDLE_PRINTERJOB, HANDLE_PARAGRAPHSUMMATION, HANDLE_CHARCOMPRESS, HANDLE_ASIANPUNCT, HANDLE_UPDATEFROMTEMPLATE,
+ HANDLE_PRINTER_INDEPENDENT_LAYOUT
// #i33095#
,HANDLE_LOAD_READONLY, HANDLE_SAVE_VERSION
,HANDLE_SLIDESPERHANDOUT, HANDLE_HANDOUTHORIZONTAL
@@ -183,8 +179,6 @@ enum SdDocumentSettingsPropertyHandles
{ MAP_LEN("IsPrintBookletFront"), HANDLE_PRINTBOOKLETFRONT, &::getBooleanCppuType(), 0, MID_PRINTER },
{ MAP_LEN("IsPrintBookletBack"), HANDLE_PRINTBOOKLETBACK, &::getBooleanCppuType(), 0, MID_PRINTER },
{ MAP_LEN("PrintQuality"), HANDLE_PRINTQUALITY, &::getCppuType((const sal_Int32*)0), 0, MID_PRINTER },
- // stream equivalents of the below
- { MAP_LEN("ColorTable"), HANDLE_COLORTABLE, &::getCppuType((const Reference< io::XStream >*)0), 0, 0 },
{ MAP_LEN("ColorTableURL"), HANDLE_COLORTABLEURL, &::getCppuType((const OUString*)0), 0, 0 },
{ MAP_LEN("DashTableURL"), HANDLE_DASHTABLEURL, &::getCppuType((const OUString*)0), 0, 0 },
{ MAP_LEN("LineEndTableURL"), HANDLE_LINEENDTABLEURL, &::getCppuType((const OUString*)0), 0, 0 },
@@ -260,39 +254,6 @@ void DocumentSettings::_setPropertyValues( const PropertyMapEntry** ppEntries, c
switch( (*ppEntries)->mnHandle )
{
- case HANDLE_COLORTABLE:
- {
- NamedValue v;
- uno::Reference< embed::XStorage > xStorage;
- if( (bool)(*pValues >>= v) && (bool)(v.Value >>= xStorage) )
- {
- sal_Int32 nSlash = v.Name.lastIndexOf('/');
- rtl::OUString aPath, aName;
- if (nSlash < -1)
- aName = v.Name;
- else {
- aName = v.Name.copy( nSlash + 1 );
- aPath = v.Name.copy( 0, nSlash );
- }
-
- XColorTable* pColTab = new XColorTable( aPath, (XOutdevItemPool*)&pDoc->GetPool() );
- pColTab->SetName( aName );
-
- try {
- if( pColTab->LoadFrom( xStorage ) )
- {
- pDoc->SetColorTable( pColTab );
- bOk = sal_True;
- bChanged = sal_True;
- }
- } catch (uno::Exception &e) {
- // fprintf (stderr, "something failed in stream load '%s'\n",
- // rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr());
- }
- } else
- fprintf (stderr, "URGH!\n");
- break;
- }
case HANDLE_COLORTABLEURL:
{
OUString aURLString;