GraphicFilter api changes
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: impgrf.cxx,v $
|
||||
*
|
||||
* $Revision: 1.11 $
|
||||
* $Revision: 1.12 $
|
||||
*
|
||||
* last change: $Author: sj $ $Date: 2001-01-25 15:31:53 $
|
||||
* last change: $Author: sj $ $Date: 2001-02-22 11:41:38 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -210,25 +210,6 @@ USHORT FillFilter( GraphicFilter& rFilter )
|
||||
{
|
||||
ResMgr* pMgr = DIALOG_MGR();
|
||||
SvtPathOptions aPathOpt;
|
||||
String aModulesPath( aPathOpt.GetModulePath() );
|
||||
String aFullConfigPath;
|
||||
|
||||
for ( xub_StrLen i = 0, nCount = aModulesPath.GetTokenCount(); i < nCount; i++ )
|
||||
{
|
||||
String aToken( aModulesPath.GetToken( i ) );
|
||||
::rtl::OUString aDest;
|
||||
::osl::FileBase::normalizePath( aToken, aDest );
|
||||
aDest += ::rtl::OUString( sal_Unicode( '/' ) );
|
||||
aDest += ::rtl::OUString( DEFINE_CONST_UNICODE(IMPGRF_GRAPHIC_FILTER_FILE) );
|
||||
|
||||
if ( aFullConfigPath.Len() )
|
||||
aFullConfigPath += sal_Unicode(';');
|
||||
::rtl::OUString aNormalizedPath;
|
||||
::osl::FileBase::getSystemPathFromNormalizedPath( aDest, aNormalizedPath );
|
||||
aFullConfigPath.Append( String( aNormalizedPath ) );
|
||||
}
|
||||
rFilter.SetConfigPath( aFullConfigPath );
|
||||
|
||||
String aURL;
|
||||
::utl::LocalFileHelper::ConvertPhysicalNameToURL( aPathOpt.GetFilterPath(), aURL );
|
||||
INetURLObject aFilterPathUrl( aURL );
|
||||
|
@@ -2,9 +2,9 @@
|
||||
*
|
||||
* $RCSfile: galbrws2.cxx,v $
|
||||
*
|
||||
* $Revision: 1.10 $
|
||||
* $Revision: 1.11 $
|
||||
*
|
||||
* last change: $Author: ka $ $Date: 2000-12-09 16:33:21 $
|
||||
* last change: $Author: sj $ $Date: 2001-02-22 11:42:31 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
@@ -737,28 +737,10 @@ String GalleryBrowser2::GetFilterName() const
|
||||
{
|
||||
GraphicFilter* pFilter = GetGrfFilter();
|
||||
INetURLObject aURL; mpCurTheme->GetURL( mnCurActionPos, aURL );
|
||||
const String aExt( aURL.GetExtension() );
|
||||
Config& rConfig = pFilter->GetConfig();
|
||||
const ByteString aOldGroup( rConfig.GetGroup() );
|
||||
USHORT nFilter = GRFILTER_FORMAT_DONTKNOW;
|
||||
|
||||
rConfig.SetGroup( IMP_FILTERSECTION );
|
||||
|
||||
for( USHORT i = 0, nKeyCount = rConfig.GetKeyCount(); i < nKeyCount; i++ )
|
||||
{
|
||||
const String aStr( rConfig.ReadKey( i ).GetToken(2, ',').GetBuffer(), RTL_TEXTENCODING_UTF8 );
|
||||
|
||||
if( aStr.CompareIgnoreCaseToAscii( aExt ) == COMPARE_EQUAL )
|
||||
{
|
||||
nFilter = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
sal_uInt16 nFilter = pFilter->GetImportFormatNumberForShortName( aURL.GetExtension() );
|
||||
|
||||
if( GRFILTER_FORMAT_DONTKNOW != nFilter )
|
||||
aFilterName = pFilter->GetImportFormatName( nFilter );
|
||||
|
||||
rConfig.SetGroup( aOldGroup );
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user