1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  *   Licensed to the Apache Software Foundation (ASF) under one or more
12  *   contributor license agreements. See the NOTICE file distributed
13  *   with this work for additional information regarding copyright
14  *   ownership. The ASF licenses this file to you under the Apache
15  *   License, Version 2.0 (the "License"); you may not use this file
16  *   except in compliance with the License. You may obtain a copy of
17  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #pragma once
21 
22 #include <com/sun/star/resource/XStringResourceWithStorage.hpp>
23 #include <com/sun/star/resource/XStringResourceWithLocation.hpp>
24 #include <com/sun/star/lang/XServiceInfo.hpp>
25 #include <com/sun/star/lang/XInitialization.hpp>
26 #include <com/sun/star/uno/XComponentContext.hpp>
27 #include <com/sun/star/ucb/XSimpleFileAccess3.hpp>
28 #include <com/sun/star/io/XInputStream.hpp>
29 #include <com/sun/star/io/XOutputStream.hpp>
30 #include <cppuhelper/implbase.hxx>
31 #include <comphelper/interfacecontainer2.hxx>
32 #include <osl/mutex.hxx>
33 
34 #include <unordered_map>
35 #include <vector>
36 
37 
38 namespace stringresource
39 {
40 
41 
42 // mutex
43 
44 
45 ::osl::Mutex& getMutex();
46 
47 
48 // class stringresourceImpl
49 
50 
51 // Hashtable to map string ids to string
52 typedef std::unordered_map
53 <
54     OUString,
55     OUString
56 >
57 IdToStringMap;
58 
59 typedef std::unordered_map
60 <
61     OUString,
62     sal_Int32
63 >
64 IdToIndexMap;
65 
66 
67 struct LocaleItem
68 {
69     css::lang::Locale      m_locale;
70     IdToStringMap          m_aIdToStringMap;
71     IdToIndexMap           m_aIdToIndexMap;
72     sal_Int32              m_nNextIndex;
73     bool                   m_bLoaded;
74     bool                   m_bModified;
75 
LocaleItemstringresource::LocaleItem76     LocaleItem( css::lang::Locale locale, bool bLoaded=true )
77         : m_locale( locale )
78         , m_nNextIndex( 0 )
79         , m_bLoaded( bLoaded )
80         , m_bModified( false )
81     {}
82 };
83 
84 typedef ::cppu::WeakImplHelper<
85     css::lang::XServiceInfo,
86     css::resource::XStringResourceManager > StringResourceImpl_BASE;
87 
88 class StringResourceImpl : public StringResourceImpl_BASE
89 {
90 protected:
91     css::uno::Reference< css::uno::XComponentContext >        m_xContext;
92 
93     LocaleItem*                                               m_pCurrentLocaleItem;
94     LocaleItem*                                               m_pDefaultLocaleItem;
95     bool                                                      m_bDefaultModified;
96 
97     ::comphelper::OInterfaceContainerHelper2                        m_aListenerContainer;
98 
99     std::vector< std::unique_ptr<LocaleItem> >                m_aLocaleItemVector;
100     std::vector< std::unique_ptr<LocaleItem> >                m_aDeletedLocaleItemVector;
101     std::vector< std::unique_ptr<LocaleItem> >                m_aChangedDefaultLocaleVector;
102 
103     bool                                                      m_bModified;
104     bool                                                      m_bReadOnly;
105 
106     sal_Int32                                                 m_nNextUniqueNumericId;
107 
108     // Scans ResourceID to start with number and adapt m_nNextUniqueNumericId
109     void implScanIdForNumber( const OUString& ResourceID );
110     const static sal_Int32 UNIQUE_NUMBER_NEEDS_INITIALISATION = -1;
111 
112     // Checks read only status and throws exception if it's true
113     /// @throws css::lang::NoSupportException
114     void implCheckReadOnly( const char* pExceptionMsg );
115 
116     // Returns the LocalItem for a given locale, if it exists, otherwise NULL
117     // This method compares the locales exactly, no closest match search is performed
118     /// @throws css::lang::IllegalArgumentException
119     LocaleItem* getItemForLocale( const css::lang::Locale& locale, bool bException );
120 
121     // Returns the LocalItem for a given locale, if it exists, otherwise NULL
122     // This method performs a closest match search, at least the language must match
123     LocaleItem* getClosestMatchItemForLocale( const css::lang::Locale& locale );
124     /// @throws css::lang::IllegalArgumentException
125     /// @throws css::uno::RuntimeException
126     void implSetCurrentLocale( const css::lang::Locale& locale,
127         bool FindClosestMatch, bool bUseDefaultIfNoMatch );
128 
129     void implModified();
130     void implNotifyListeners();
131 
132     //=== Impl methods for ...ForLocale methods ===
133     /// @throws css::resource::MissingResourceException
134     OUString implResolveString( const OUString& ResourceID, LocaleItem* pLocaleItem );
135     bool implHasEntryForId( const OUString& ResourceID, LocaleItem* pLocaleItem );
136     css::uno::Sequence< OUString > implGetResourceIDs( LocaleItem* pLocaleItem );
137     void implSetString( const OUString& ResourceID,
138         const OUString& Str, LocaleItem* pLocaleItem );
139     /// @throws css::resource::MissingResourceException
140     void implRemoveId( const OUString& ResourceID, LocaleItem* pLocaleItem );
141 
142     // Method to load a locale if necessary, returns true if loading was
143     // successful. Default implementation in base class just returns true.
144     virtual bool loadLocale( LocaleItem* pLocaleItem );
145 
146     virtual void implLoadAllLocales();
147 
148 public:
149     explicit StringResourceImpl(
150         const css::uno::Reference< css::uno::XComponentContext >& rxContext );
151     virtual ~StringResourceImpl() override;
152 
153     // XServiceInfo
154     virtual OUString SAL_CALL getImplementationName(  ) override;
155     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
156     virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) override;
157 
158     // XModifyBroadcaster
159     virtual void SAL_CALL addModifyListener( const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
160     virtual void SAL_CALL removeModifyListener( const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
161 
162      // XStringResourceResolver
163     virtual OUString SAL_CALL resolveString( const OUString& ResourceID ) override;
164     virtual OUString SAL_CALL resolveStringForLocale( const OUString& ResourceID,
165         const css::lang::Locale& locale ) override;
166     virtual sal_Bool SAL_CALL hasEntryForId( const OUString& ResourceID ) override;
167     virtual sal_Bool SAL_CALL hasEntryForIdAndLocale( const OUString& ResourceID,
168         const css::lang::Locale& locale ) override;
169     virtual css::uno::Sequence< OUString > SAL_CALL getResourceIDs(  ) override;
170     virtual css::uno::Sequence< OUString > SAL_CALL getResourceIDsForLocale
171         ( const css::lang::Locale& locale ) override;
172     virtual css::lang::Locale SAL_CALL getCurrentLocale(  ) override;
173     virtual css::lang::Locale SAL_CALL getDefaultLocale(  ) override;
174     virtual css::uno::Sequence< css::lang::Locale > SAL_CALL getLocales(  ) override;
175 
176     // XStringResourceManager
177     virtual sal_Bool SAL_CALL isReadOnly() override;
178     virtual void SAL_CALL setCurrentLocale( const css::lang::Locale& locale, sal_Bool FindClosestMatch ) override;
179     virtual void SAL_CALL setDefaultLocale( const css::lang::Locale& locale ) override;
180     virtual void SAL_CALL setString( const OUString& ResourceID, const OUString& Str ) override;
181     virtual void SAL_CALL setStringForLocale( const OUString& ResourceID, const OUString& Str,
182         const css::lang::Locale& locale ) override;
183     virtual void SAL_CALL removeId( const OUString& ResourceID ) override;
184     virtual void SAL_CALL removeIdForLocale( const OUString& ResourceID,
185         const css::lang::Locale& locale ) override;
186     virtual void SAL_CALL newLocale( const css::lang::Locale& locale ) override;
187     virtual void SAL_CALL removeLocale( const css::lang::Locale& locale ) override;
188     virtual ::sal_Int32 SAL_CALL getUniqueNumericId(  ) override;
189  };
190 
191 typedef ::cppu::ImplInheritanceHelper<
192         StringResourceImpl,
193         css::resource::XStringResourcePersistence > StringResourcePersistenceImpl_BASE;
194 
195 class BinaryOutput;
196 
197 class StringResourcePersistenceImpl : public StringResourcePersistenceImpl_BASE
198 {
199 protected:
200     OUString                                                             m_aNameBase;
201     OUString                                                             m_aComment;
202 
203     /// @throws css::uno::Exception
204     /// @throws css::uno::RuntimeException
205     void implInitializeCommonParameters( const css::uno::Sequence< css::uno::Any >& aArguments );
206 
207     // Scan locale properties files
208     virtual void implScanLocales();
209 
210     // Method to load a locale if necessary, returns true if loading was successful
211     virtual bool loadLocale( LocaleItem* pLocaleItem ) override;
212 
213     // does the actual loading
214     virtual bool implLoadLocale( LocaleItem* pLocaleItem );
215 
216     virtual void implLoadAllLocales() override;
217 
218     void implScanLocaleNames( const css::uno::Sequence< OUString >& aContentSeq );
219     static OUString implGetFileNameForLocaleItem( LocaleItem const * pLocaleItem, const OUString& aNameBase );
220     static OUString implGetPathForLocaleItem( LocaleItem const * pLocaleItem, const OUString& aNameBase,
221         const OUString& aLocation, bool bDefaultFile=false );
222 
223     bool implReadPropertiesFile( LocaleItem* pLocaleItem,
224         const css::uno::Reference< css::io::XInputStream >& xInput );
225 
226     bool implWritePropertiesFile( LocaleItem const * pLocaleItem,
227               const css::uno::Reference< css::io::XOutputStream >& xOutputStream,
228               const OUString& aComment );
229 
230     void implWriteLocaleBinary( LocaleItem* pLocaleItem, BinaryOutput& rOut );
231 
232     /// @throws css::uno::Exception
233     /// @throws css::uno::RuntimeException
234     void implStoreAtStorage
235     (
236         const OUString& aNameBase,
237         const OUString& aComment,
238         const css::uno::Reference< css::embed::XStorage >& Storage,
239         bool bUsedForStore,
240         bool bStoreAll
241     );
242 
243     /// @throws css::uno::Exception
244     /// @throws css::uno::RuntimeException
245     void implKillRemovedLocaleFiles
246     (
247         const OUString& Location,
248         const OUString& aNameBase,
249         const css::uno::Reference< css::ucb::XSimpleFileAccess3 >& xFileAccess
250     );
251 
252     /// @throws css::uno::Exception
253     /// @throws css::uno::RuntimeException
254     void implKillChangedDefaultFiles
255     (
256         const OUString& Location,
257         const OUString& aNameBase,
258         const css::uno::Reference< css::ucb::XSimpleFileAccess3 >& xFileAccess
259     );
260 
261     /// @throws css::uno::Exception
262     /// @throws css::uno::RuntimeException
263     void implStoreAtLocation
264     (
265         const OUString& Location,
266         const OUString& aNameBase,
267         const OUString& aComment,
268         const css::uno::Reference< css::ucb::XSimpleFileAccess3 >& xFileAccess,
269         bool bUsedForStore,
270         bool bStoreAll,
271         bool bKillAll = false
272     );
273 
274 public:
275     explicit StringResourcePersistenceImpl(
276         const css::uno::Reference< css::uno::XComponentContext >& rxContext );
277     virtual ~StringResourcePersistenceImpl() override;
278 
279     // XServiceInfo
280     virtual OUString SAL_CALL getImplementationName(  ) override;
281     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
282     virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) override;
283 
284     // XModifyBroadcaster
285     virtual void SAL_CALL addModifyListener( const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
286     virtual void SAL_CALL removeModifyListener( const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
287 
288      // XStringResourceResolver
289     virtual OUString SAL_CALL resolveString( const OUString& ResourceID ) override;
290     virtual OUString SAL_CALL resolveStringForLocale( const OUString& ResourceID,
291         const css::lang::Locale& locale ) override;
292     virtual sal_Bool SAL_CALL hasEntryForId( const OUString& ResourceID ) override;
293     virtual sal_Bool SAL_CALL hasEntryForIdAndLocale( const OUString& ResourceID,
294         const css::lang::Locale& locale ) override;
295     virtual css::uno::Sequence< OUString > SAL_CALL getResourceIDs(  ) override;
296     virtual css::uno::Sequence< OUString > SAL_CALL getResourceIDsForLocale
297         ( const css::lang::Locale& locale ) override;
298     virtual css::lang::Locale SAL_CALL getCurrentLocale(  ) override;
299     virtual css::lang::Locale SAL_CALL getDefaultLocale(  ) override;
300     virtual css::uno::Sequence< css::lang::Locale > SAL_CALL getLocales(  ) override;
301 
302     // XStringResourceManager
303     virtual sal_Bool SAL_CALL isReadOnly() override;
304     virtual void SAL_CALL setCurrentLocale( const css::lang::Locale& locale, sal_Bool FindClosestMatch ) override;
305     virtual void SAL_CALL setDefaultLocale( const css::lang::Locale& locale ) override;
306     virtual void SAL_CALL setString( const OUString& ResourceID, const OUString& Str ) override;
307     virtual void SAL_CALL setStringForLocale( const OUString& ResourceID, const OUString& Str,
308         const css::lang::Locale& locale ) override;
309     virtual void SAL_CALL removeId( const OUString& ResourceID ) override;
310     virtual void SAL_CALL removeIdForLocale( const OUString& ResourceID,
311         const css::lang::Locale& locale ) override;
312     virtual void SAL_CALL newLocale( const css::lang::Locale& locale ) override;
313     virtual void SAL_CALL removeLocale( const css::lang::Locale& locale ) override;
314     virtual ::sal_Int32 SAL_CALL getUniqueNumericId(  ) override;
315 
316     // XStringResourcePersistence
317     virtual void SAL_CALL store(  ) override;
318     virtual sal_Bool SAL_CALL isModified(  ) override;
319     virtual void SAL_CALL setComment( const OUString& Comment ) override;
320     virtual void SAL_CALL storeToStorage
321         ( const css::uno::Reference< css::embed::XStorage >& Storage,
322           const OUString& NameBase, const OUString& Comment ) override;
323     virtual void SAL_CALL storeToURL( const OUString& URL, const OUString& NameBase,
324         const OUString& Comment, const css::uno::Reference
325         < css::task::XInteractionHandler >& Handler ) override;
326     virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL exportBinary(  ) override;
327     virtual void SAL_CALL importBinary( const css::uno::Sequence< ::sal_Int8 >& Data ) override;
328 };
329 
330 
331 typedef ::cppu::ImplInheritanceHelper<
332         StringResourcePersistenceImpl,
333         css::lang::XInitialization,
334         css::resource::XStringResourceWithStorage > StringResourceWithStorageImpl_BASE;
335 
336 class StringResourceWithStorageImpl : public StringResourceWithStorageImpl_BASE
337 {
338     css::uno::Reference< css::embed::XStorage >       m_xStorage;
339     bool                                              m_bStorageChanged;
340 
341     virtual void implScanLocales() override;
342     virtual bool implLoadLocale( LocaleItem* pLocaleItem ) override;
343 
344 public:
345     explicit StringResourceWithStorageImpl( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
346     virtual ~StringResourceWithStorageImpl() override;
347 
348     // XServiceInfo
349     virtual OUString SAL_CALL getImplementationName(  ) override;
350     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
351     virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) override;
352 
353     // XInitialization
354     virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
355 
356     // XModifyBroadcaster
357     virtual void SAL_CALL addModifyListener( const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
358     virtual void SAL_CALL removeModifyListener( const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
359 
360      // XStringResourceResolver
361     virtual OUString SAL_CALL resolveString( const OUString& ResourceID ) override;
362     virtual OUString SAL_CALL resolveStringForLocale( const OUString& ResourceID,
363         const css::lang::Locale& locale ) override;
364     virtual sal_Bool SAL_CALL hasEntryForId( const OUString& ResourceID ) override;
365     virtual sal_Bool SAL_CALL hasEntryForIdAndLocale( const OUString& ResourceID,
366         const css::lang::Locale& locale ) override;
367     virtual css::uno::Sequence< OUString > SAL_CALL getResourceIDs(  ) override;
368     virtual css::uno::Sequence< OUString > SAL_CALL getResourceIDsForLocale
369         ( const css::lang::Locale& locale ) override;
370     virtual css::lang::Locale SAL_CALL getCurrentLocale(  ) override;
371     virtual css::lang::Locale SAL_CALL getDefaultLocale(  ) override;
372     virtual css::uno::Sequence< css::lang::Locale > SAL_CALL getLocales(  ) override;
373 
374     // XStringResourceManager
375     virtual sal_Bool SAL_CALL isReadOnly() override;
376     virtual void SAL_CALL setCurrentLocale( const css::lang::Locale& locale, sal_Bool FindClosestMatch ) override;
377     virtual void SAL_CALL setDefaultLocale( const css::lang::Locale& locale ) override;
378     virtual void SAL_CALL setString( const OUString& ResourceID, const OUString& Str ) override;
379     virtual void SAL_CALL setStringForLocale( const OUString& ResourceID, const OUString& Str,
380         const css::lang::Locale& locale ) override;
381     virtual void SAL_CALL removeId( const OUString& ResourceID ) override;
382     virtual void SAL_CALL removeIdForLocale( const OUString& ResourceID,
383         const css::lang::Locale& locale ) override;
384     virtual void SAL_CALL newLocale( const css::lang::Locale& locale ) override;
385     virtual void SAL_CALL removeLocale( const css::lang::Locale& locale ) override;
386     virtual ::sal_Int32 SAL_CALL getUniqueNumericId(  ) override;
387 
388     // XStringResourcePersistence
389     virtual void SAL_CALL store(  ) override;
390     virtual sal_Bool SAL_CALL isModified(  ) override;
391     virtual void SAL_CALL setComment( const OUString& Comment ) override;
392     virtual void SAL_CALL storeToStorage
393         ( const css::uno::Reference< css::embed::XStorage >& Storage,
394           const OUString& NameBase, const OUString& Comment ) override;
395     virtual void SAL_CALL storeToURL( const OUString& URL, const OUString& NameBase,
396         const OUString& Comment, const css::uno::Reference
397         < css::task::XInteractionHandler >& Handler ) override;
398     virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL exportBinary(  ) override;
399     virtual void SAL_CALL importBinary( const css::uno::Sequence< ::sal_Int8 >& Data ) override;
400 
401     // XStringResourceWithStorage
402     virtual void SAL_CALL storeAsStorage
403         ( const css::uno::Reference< css::embed::XStorage >& Storage ) override;
404     virtual void SAL_CALL setStorage
405         ( const css::uno::Reference< css::embed::XStorage >& Storage ) override;
406 };
407 
408 
409 typedef ::cppu::ImplInheritanceHelper<
410         StringResourcePersistenceImpl,
411         css::lang::XInitialization,
412         css::resource::XStringResourceWithLocation > StringResourceWithLocationImpl_BASE;
413 
414 class StringResourceWithLocationImpl : public StringResourceWithLocationImpl_BASE
415 {
416     OUString                                              m_aLocation;
417     bool                                                  m_bLocationChanged;
418     css::uno::Reference< css::ucb::XSimpleFileAccess3 >   m_xSFI;
419     css::uno::Reference< css::task::XInteractionHandler > m_xInteractionHandler;
420 
421     const css::uno::Reference< css::ucb::XSimpleFileAccess3 > & getFileAccess();
422 
423     virtual void implScanLocales() override;
424     virtual bool implLoadLocale( LocaleItem* pLocaleItem ) override;
425 
426 public:
427     explicit StringResourceWithLocationImpl( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
428     virtual ~StringResourceWithLocationImpl() override;
429 
430     // XServiceInfo
431     virtual OUString SAL_CALL getImplementationName(  ) override;
432     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
433     virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(  ) override;
434 
435     // XInitialization
436     virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
437 
438     // XModifyBroadcaster
439     virtual void SAL_CALL addModifyListener( const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
440     virtual void SAL_CALL removeModifyListener( const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
441 
442      // XStringResourceResolver
443     virtual OUString SAL_CALL resolveString( const OUString& ResourceID ) override;
444     virtual OUString SAL_CALL resolveStringForLocale( const OUString& ResourceID,
445         const css::lang::Locale& locale ) override;
446     virtual sal_Bool SAL_CALL hasEntryForId( const OUString& ResourceID ) override;
447     virtual sal_Bool SAL_CALL hasEntryForIdAndLocale( const OUString& ResourceID,
448         const css::lang::Locale& locale ) override;
449     virtual css::uno::Sequence< OUString > SAL_CALL getResourceIDs(  ) override;
450     virtual css::uno::Sequence< OUString > SAL_CALL getResourceIDsForLocale
451         ( const css::lang::Locale& locale ) override;
452     virtual css::lang::Locale SAL_CALL getCurrentLocale(  ) override;
453     virtual css::lang::Locale SAL_CALL getDefaultLocale(  ) override;
454     virtual css::uno::Sequence< css::lang::Locale > SAL_CALL getLocales(  ) override;
455 
456     // XStringResourceManager
457     virtual sal_Bool SAL_CALL isReadOnly() override;
458     virtual void SAL_CALL setCurrentLocale( const css::lang::Locale& locale, sal_Bool FindClosestMatch ) override;
459     virtual void SAL_CALL setDefaultLocale( const css::lang::Locale& locale ) override;
460     virtual void SAL_CALL setString( const OUString& ResourceID, const OUString& Str ) override;
461     virtual void SAL_CALL setStringForLocale( const OUString& ResourceID, const OUString& Str,
462         const css::lang::Locale& locale ) override;
463     virtual void SAL_CALL removeId( const OUString& ResourceID ) override;
464     virtual void SAL_CALL removeIdForLocale( const OUString& ResourceID,
465         const css::lang::Locale& locale ) override;
466     virtual void SAL_CALL newLocale( const css::lang::Locale& locale ) override;
467     virtual void SAL_CALL removeLocale( const css::lang::Locale& locale ) override;
468     virtual ::sal_Int32 SAL_CALL getUniqueNumericId(  ) override;
469 
470     // XStringResourcePersistence
471     virtual void SAL_CALL store(  ) override;
472     virtual sal_Bool SAL_CALL isModified(  ) override;
473     virtual void SAL_CALL setComment( const OUString& Comment ) override;
474     virtual void SAL_CALL storeToStorage
475         ( const css::uno::Reference< css::embed::XStorage >& Storage,
476           const OUString& NameBase, const OUString& Comment ) override;
477     virtual void SAL_CALL storeToURL( const OUString& URL, const OUString& NameBase,
478         const OUString& Comment, const css::uno::Reference
479         < css::task::XInteractionHandler >& Handler ) override;
480     virtual css::uno::Sequence< ::sal_Int8 > SAL_CALL exportBinary(  ) override;
481     virtual void SAL_CALL importBinary( const css::uno::Sequence< ::sal_Int8 >& Data ) override;
482 
483     // XStringResourceWithLocation
484     virtual void SAL_CALL storeAsURL( const OUString& URL ) override;
485     virtual void SAL_CALL setURL( const OUString& URL ) override;
486 };
487 
488 
489 }   // namespace stringtable
490 
491 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
492