summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-11-15 14:41:51 +0000
committerOliver Bolte <obo@openoffice.org>2004-11-15 14:41:51 +0000
commit21047dd79724878b1a76029db0436dc2a1f8066b (patch)
tree0230940969f427bc1a83276387dbd623605dffb1 /configmgr
parenta28900abb13269d7474906981efba4694557537e (diff)
INTEGRATION: CWS migration1 (1.5.130); FILE MERGED
2004/10/18 12:31:24 jb 1.5.130.1: #i35701# Add LayerFilter support to DataImporter
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/localbe/localdataimportsvc.cxx29
1 files changed, 27 insertions, 2 deletions
diff --git a/configmgr/source/localbe/localdataimportsvc.cxx b/configmgr/source/localbe/localdataimportsvc.cxx
index f8ec68d415ae..cc1a8f4f7119 100644
--- a/configmgr/source/localbe/localdataimportsvc.cxx
+++ b/configmgr/source/localbe/localdataimportsvc.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: localdataimportsvc.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: rt $ $Date: 2003-04-17 13:29:11 $
+ * last change: $Author: obo $ $Date: 2004-11-15 15:41:51 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -153,6 +153,8 @@ namespace
OUString aComponent;
OUString aEntity;
+ uno::Reference< backend::XLayer > xLayerFilter;
+
sal_Bool overwrite;
sal_Bool truncate;
@@ -168,6 +170,7 @@ namespace
, aImporterService()
, aComponent()
, aEntity()
+ , xLayerFilter()
, overwrite(true)
, truncate(false)
, use_component(false)
@@ -210,6 +213,13 @@ namespace
bGood = (aArguments[i].Value >>= aEntity);
use_entity = bGood && (aEntity.getLength() != 0);
}
+ else if (aArguments[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LayerFilter")))
+ {
+ bKnown = true;
+ bGood = (aArguments[i].Value >>= xLayerFilter);
+ if (xLayerFilter.is() && !uno::Reference<lang::XInitialization>::query(xLayerFilter).is())
+ bGood = false;
+ }
else if (aArguments[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("OverwriteExisting")))
{
bKnown = true;
@@ -284,6 +294,21 @@ uno::Any SAL_CALL
throw lang::NullPointerException(sMessage,*this);
}
+ uno::Reference< lang::XInitialization > xFilterInit(aJob.xLayerFilter,uno::UNO_QUERY);
+ if (xFilterInit.is())
+ {
+ beans::NamedValue argvalue(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("Source") ),
+ uno::makeAny( xLayer) );
+
+ uno::Sequence< uno::Any > args(1);
+ args[0] <<= argvalue;
+
+ xFilterInit->initialize(args);
+
+ xLayer = aJob.xLayerFilter;
+ }
+
uno::Reference< backend::XLayerImporter > xImporter;
int nArgCount = 0;