summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2001-03-09 13:27:37 +0000
committerMathias Bauer <mba@openoffice.org>2001-03-09 13:27:37 +0000
commit9f4fd9ccf0dc1d039c8ab7e556ebc57274eafcb5 (patch)
tree79d88047ba690d225e6fd37b2cea8fab64c3ccb4 /sfx2
parente1dea8789fe4facf1e9bf3dbb7f3b0c693206e43 (diff)
#84843#: temp. use HumanPresentableNames for getting ClipboardIds
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/bastyp/fltfnc.cxx25
1 files changed, 13 insertions, 12 deletions
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index cdb254211028..421bc1629b59 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fltfnc.cxx,v $
*
- * $Revision: 1.23 $
+ * $Revision: 1.24 $
*
- * last change: $Author: mba $ $Date: 2001-03-08 10:38:16 $
+ * last change: $Author: mba $ $Date: 2001-03-09 14:27:37 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -2609,7 +2609,7 @@ void SfxFilterContainer::ReadExternalFilters( const String& rDocServiceName )
xFilters->getByName( aName ) >>= aProps;
sal_Int32 nFilterFlags = 0, nClipId = 0, nDocIconId = 0, nVersion = 0;
- ::rtl::OUString aMimeType, aType, aUIName, aDefaultTemplate;
+ ::rtl::OUString aMimeType, aType, aUIName, aDefaultTemplate, aHumanName;
String aEmptyStr, aFilterName, aUserData;
String aExtension, aWildCard( DEFINE_CONST_UNICODE("*.") );
BOOL bMatches = FALSE;
@@ -2665,15 +2665,7 @@ void SfxFilterContainer::ReadExternalFilters( const String& rDocServiceName )
}
}
else if ( rProp.Name.compareToAscii("ClipboardFormat") == COMPARE_EQUAL )
- {
- ::rtl::OUString aFormat;
- if ( rProp.Value >>= aFormat )
- {
- ::com::sun::star::datatransfer::DataFlavor aDataFlavor;
- aDataFlavor.MimeType = aFormat;
- nClipId = SotExchange::GetFormat( aDataFlavor );
- }
- }
+ rProp.Value >>= aHumanName;
else if ( rProp.Name.compareToAscii("DocumentIconId") == COMPARE_EQUAL )
rProp.Value >>= nClipId;
}
@@ -2706,6 +2698,15 @@ void SfxFilterContainer::ReadExternalFilters( const String& rDocServiceName )
if ( bMatches && aType.getLength() )
{
+ ::com::sun::star::datatransfer::DataFlavor aDataFlavor;
+ aDataFlavor.MimeType = aMimeType;
+ nClipId = SotExchange::GetFormat( aDataFlavor );
+ if ( !nClipId && aHumanName.getLength() )
+ {
+ // old formats are found using HumanPresentableName
+ nClipId = SotExchange::RegisterFormatName( aHumanName );
+ }
+
// register SfxFilter
aFilterName = impl_getOldFilterName( aName );
if ( aFilterName.Len() )