summaryrefslogtreecommitdiffstats
path: root/svx/source/dialog/impgrf.cxx
diff options
context:
space:
mode:
authorSven Jacobi <sj@openoffice.org>2001-06-27 12:03:03 +0000
committerSven Jacobi <sj@openoffice.org>2001-06-27 12:03:03 +0000
commit8607933d4ab2fb0d253b3b861c5ee4c1d086da7f (patch)
tree897beea545a1757d77c80d8f2518ec004e4900c3 /svx/source/dialog/impgrf.cxx
parent#88824# ExportPart_Impl: recognize types of special built-in formats (diff)
downloadcore-8607933d4ab2fb0d253b3b861c5ee4c1d086da7f.tar.gz
core-8607933d4ab2fb0d253b3b861c5ee4c1d086da7f.zip
#88709# supporting more than one filename extension
Diffstat (limited to 'svx/source/dialog/impgrf.cxx')
-rw-r--r--svx/source/dialog/impgrf.cxx42
1 files changed, 22 insertions, 20 deletions
diff --git a/svx/source/dialog/impgrf.cxx b/svx/source/dialog/impgrf.cxx
index 445389d38ef7..ae48aae786a9 100644
--- a/svx/source/dialog/impgrf.cxx
+++ b/svx/source/dialog/impgrf.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: impgrf.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: thb $ $Date: 2001-04-26 17:26:10 $
+ * last change: $Author: sj $ $Date: 2001-06-27 13:03:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -155,13 +155,24 @@ String GetImportFormatName( GraphicFilter& rFlt,
// -----------------------------------------------------------------------
-String GetImportFormatWildcard( GraphicFilter& rFlt,
- USHORT nFormat, String pFmtStrs[] )
+void GetImportFormatWildcard( GraphicFilter& rFlt,
+ sal_uInt16 nFormat, String& aDest )
{
- if ( rFlt.GetImportFormatCount() )
- return rFlt.GetImportWildcard( nFormat );
- else
- return pFmtStrs[STR_FLT_BMP + nFormat].GetToken( 1, ',' );
+ String aWildcard;
+ sal_Int32 i = 0;
+
+ while( TRUE )
+ {
+ aWildcard = rFlt.GetImportWildcard( nFormat, i++ );
+ if ( !aWildcard.Len() )
+ break;
+ if ( aDest.Search( aWildcard ) == STRING_NOTFOUND )
+ {
+ if ( aDest.Len() )
+ aDest += sal_Unicode(';');
+ aDest += aWildcard;
+ }
+ }
}
// -----------------------------------------------------------------------
@@ -694,17 +705,8 @@ void SvxImportGraphicDialog::Construct_Impl( const String &rTitle, USHORT nEnabl
String aExtensions;
for ( i = 0; i < nCount; i++ )
- {
- String aWildcard =
- ::GetImportFormatWildcard( *pGraphicFilter, i, pResImpl->pStrings );
+ GetImportFormatWildcard( *pGraphicFilter, i, aExtensions );
- if ( aExtensions.Search( aWildcard ) == STRING_NOTFOUND )
- {
- if ( aExtensions.Len() )
- aExtensions += sal_Unicode(';');
- aExtensions += aWildcard;
- }
- }
#if defined(WIN) || defined(WNT)
if ( aExtensions.Len() < 240 )
AddFilter( pResImpl->pStrings[STR_IMPORT_ALL], aExtensions );
@@ -719,10 +721,10 @@ void SvxImportGraphicDialog::Construct_Impl( const String &rTitle, USHORT nEnabl
for ( i = 0; i < nCount; i++ )
{
+ String aWildcard;
+ GetImportFormatWildcard( *pGraphicFilter, i, aWildcard );
String aName =
::GetImportFormatName( *pGraphicFilter, i, pResImpl->pStrings );
- String aWildcard =
- ::GetImportFormatWildcard( *pGraphicFilter, i, pResImpl->pStrings );
String aOSType =
::GetImportFormatOSType( *pGraphicFilter, i, pResImpl->pStrings );
AddFilter( aName, aWildcard, aOSType );