imagesconfiguration.cxx (d0626817) imagesconfiguration.cxx (46d9d397)
1/**************************************************************
1/**************************************************************
2 *
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
10 *
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
19 *
20 *************************************************************/
21
22
23
24// MARKER(update_precomp.py): autogen include statement, do not remove
25#include "precompiled_framework.hxx"
26
27#include <xml/imagesconfiguration.hxx>

--- 130 unchanged lines hidden (view full) ---

158 catch ( ::com::sun::star::io::IOException& )
159 {
160 return sal_False;
161 }
162}
163
164sal_Bool ImagesConfiguration::LoadImages(
165 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
20 *************************************************************/
21
22
23
24// MARKER(update_precomp.py): autogen include statement, do not remove
25#include "precompiled_framework.hxx"
26
27#include <xml/imagesconfiguration.hxx>

--- 130 unchanged lines hidden (view full) ---

158 catch ( ::com::sun::star::io::IOException& )
159 {
160 return sal_False;
161 }
162}
163
164sal_Bool ImagesConfiguration::LoadImages(
165 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
166 const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& rInputStream,
167 ImageListsDescriptor& rItems )
166 const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& rInputStream,
167 ImageListsDescriptor& rItems )
168{
169 Reference< XParser > xParser( GetSaxParser( xServiceFactory ) );
170
168{
169 Reference< XParser > xParser( GetSaxParser( xServiceFactory ) );
170
171 // connect stream to input stream to the parser
171 // connect stream to input stream to the parser
172 InputSource aInputSource;
173
174 aInputSource.aInputStream = rInputStream;
175
176 // create namespace filter and set document handler inside to support xml namespaces
177 Reference< XDocumentHandler > xDocHandler( new OReadImagesDocumentHandler( rItems ));
178 Reference< XDocumentHandler > xFilter( new SaxNamespaceFilter( xDocHandler ));
179

--- 16 unchanged lines hidden (view full) ---

196 catch( ::com::sun::star::io::IOException& )
197 {
198 return sal_False;
199 }
200}
201
202sal_Bool ImagesConfiguration::StoreImages(
203 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
172 InputSource aInputSource;
173
174 aInputSource.aInputStream = rInputStream;
175
176 // create namespace filter and set document handler inside to support xml namespaces
177 Reference< XDocumentHandler > xDocHandler( new OReadImagesDocumentHandler( rItems ));
178 Reference< XDocumentHandler > xFilter( new SaxNamespaceFilter( xDocHandler ));
179

--- 16 unchanged lines hidden (view full) ---

196 catch( ::com::sun::star::io::IOException& )
197 {
198 return sal_False;
199 }
200}
201
202sal_Bool ImagesConfiguration::StoreImages(
203 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceFactory,
204 const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& rOutputStream,
205 const ImageListsDescriptor& rItems )
204 const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& rOutputStream,
205 const ImageListsDescriptor& rItems )
206{
207 Reference< XDocumentHandler > xWriter( GetSaxWriter( xServiceFactory ) );
208
209 Reference< ::com::sun::star::io::XActiveDataSource> xDataSource( xWriter , UNO_QUERY );
210 xDataSource->setOutputStream( rOutputStream );
211
212 try
213 {

--- 20 unchanged lines hidden ---
206{
207 Reference< XDocumentHandler > xWriter( GetSaxWriter( xServiceFactory ) );
208
209 Reference< ::com::sun::star::io::XActiveDataSource> xDataSource( xWriter , UNO_QUERY );
210 xDataSource->setOutputStream( rOutputStream );
211
212 try
213 {

--- 20 unchanged lines hidden ---