summaryrefslogtreecommitdiff
path: root/embeddedobj/source/commonembedding/xfactory.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-08-02 16:44:30 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-08-02 16:44:30 +0000
commita5ab8f5bee2db4c0cdb3e06c56694f08387a5d16 (patch)
tree480c895706a928f04a598985374ffa6cff782a11 /embeddedobj/source/commonembedding/xfactory.cxx
parent1b913b9190c10562e1347f305460e97b432e8d39 (diff)
INTEGRATION: CWS insight01 (1.4.12); FILE MERGED
2004/05/28 09:56:46 oj 1.4.12.3: RESYNC: (1.4-1.5); FILE MERGED 2004/04/07 12:23:16 mav 1.4.12.2: #i27588# use FilterName 2004/04/07 12:15:05 mav 1.4.12.1: #i27588# find the filter name from typename
Diffstat (limited to 'embeddedobj/source/commonembedding/xfactory.cxx')
-rw-r--r--embeddedobj/source/commonembedding/xfactory.cxx24
1 files changed, 22 insertions, 2 deletions
diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx
index 77b87436c5e2..050a4bfe8375 100644
--- a/embeddedobj/source/commonembedding/xfactory.cxx
+++ b/embeddedobj/source/commonembedding/xfactory.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xfactory.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: hr $ $Date: 2004-05-10 17:51:47 $
+ * last change: $Author: hr $ $Date: 2004-08-02 17:44:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -282,6 +282,26 @@ uno::Reference< uno::XInterface > SAL_CALL OOoEmbeddedObjectFactory::createInsta
for ( sal_Int32 nInd = 0; nInd < aTempMedDescr.getLength(); nInd++ )
if ( aTempMedDescr[nInd].Name.equalsAscii( "FilterName" ) )
aTempMedDescr[nInd].Value >>= aFilterName;
+
+ if ( !aFilterName.getLength() && aTypeName.getLength() )
+ {
+ uno::Reference<container::XNameAccess> xNameAccess( xTypeDetection, uno::UNO_QUERY );
+ if ( xNameAccess.is() && xNameAccess->hasByName( aTypeName ) )
+ {
+ uno::Sequence<beans::PropertyValue> aTypes;
+ xNameAccess->getByName(aTypeName) >>= aTypes;
+ for( sal_Int32 nInd = 0; nInd < aTypes.getLength(); nInd++ )
+ if ( aTypes[nInd].Name.equalsAscii("PreferredFilter") )
+ {
+ aTypes[nInd].Value >>= aFilterName;
+ sal_Int32 nLen = aTempMedDescr.getLength();
+ aTempMedDescr.realloc(nLen+1);
+ aTempMedDescr[nLen].Value = aTypes[nInd].Value;
+ aTempMedDescr[nLen].Name = ::rtl::OUString::createFromAscii( "FilterName" );
+ break;
+ }
+ }
+ }
}
uno::Reference< uno::XInterface > xResult;