Kaydet (Commit) f3ce04f4 authored tarafından Kurt Zenker's avatar Kurt Zenker

INTEGRATION: CWS c05v001 (1.8.406); FILE MERGED

2005/08/15 09:17:32 pb 1.8.406.1: fix: #124957# remove autotext entry if writer module isn't installed
üst 5ab845e3
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: optpath.cxx,v $ * $RCSfile: optpath.cxx,v $
* *
* $Revision: 1.9 $ * $Revision: 1.10 $
* *
* last change: $Author: rt $ $Date: 2005-09-08 21:48:20 $ * last change: $Author: kz $ $Date: 2005-11-11 13:55:19 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -74,6 +74,9 @@ ...@@ -74,6 +74,9 @@
#ifndef INCLUDED_SVTOOLS_PATHOPTIONS_HXX #ifndef INCLUDED_SVTOOLS_PATHOPTIONS_HXX
#include <svtools/pathoptions.hxx> #include <svtools/pathoptions.hxx>
#endif #endif
#ifndef INCLUDED_SVTOOLS_MODULEOPTIONS_HXX
#include <svtools/moduleoptions.hxx>
#endif
#define _SVX_OPTPATH_CXX #define _SVX_OPTPATH_CXX
...@@ -329,6 +332,7 @@ void SvxPathTabPage::Reset( const SfxItemSet& ) ...@@ -329,6 +332,7 @@ void SvxPathTabPage::Reset( const SfxItemSet& )
SvtPathOptions aPathOpt; SvtPathOptions aPathOpt;
for( USHORT i = 0; i <= (USHORT)SvtPathOptions::PATH_WORK; ++i ) for( USHORT i = 0; i <= (USHORT)SvtPathOptions::PATH_WORK; ++i )
{
switch(i) switch(i)
{ {
case SvtPathOptions::PATH_CONFIG: case SvtPathOptions::PATH_CONFIG:
...@@ -344,30 +348,37 @@ void SvxPathTabPage::Reset( const SfxItemSet& ) ...@@ -344,30 +348,37 @@ void SvxPathTabPage::Reset( const SfxItemSet& )
break; break;
default: default:
{ {
String aStr( SVX_RES(RID_SVXSTR_PATH_NAME_START + i)); // only writer uses autotext
String sTmpPath(aPathOpt.GetPath(SvtPathOptions::Pathes(i))); if ( i != SvtPathOptions::PATH_AUTOTEXT ||
String aValue( sTmpPath ); SvtModuleOptions().IsModuleInstalled( SvtModuleOptions::E_SWRITER ) )
if(i == SvtPathOptions::PATH_ADDIN ||
i == SvtPathOptions::PATH_FILTER ||
i == SvtPathOptions::PATH_HELP ||
i == SvtPathOptions::PATH_MODULE ||
i == SvtPathOptions::PATH_PLUGIN ||
i == SvtPathOptions::PATH_STORAGE )
::utl::LocalFileHelper::ConvertPhysicalNameToURL( sTmpPath, aValue );
aStr += '\t';
aStr += Convert_Impl( aValue );
SvLBoxEntry* pEntry = pPathBox->InsertEntry( aStr );
BOOL bReadonly = aPathOpt.IsPathReadonly((SvtPathOptions::Pathes) i);
if(bReadonly)
{ {
pPathBox->SetCollapsedEntryBmp( pEntry, pImpl->aLockImage, BMP_COLOR_NORMAL ); String aStr( SVX_RES(RID_SVXSTR_PATH_NAME_START + i));
pPathBox->SetCollapsedEntryBmp( pEntry, pImpl->aLockImageHC, BMP_COLOR_HIGHCONTRAST ); String sTmpPath(aPathOpt.GetPath(SvtPathOptions::Pathes(i)));
String aValue( sTmpPath );
if(i == SvtPathOptions::PATH_ADDIN ||
i == SvtPathOptions::PATH_FILTER ||
i == SvtPathOptions::PATH_HELP ||
i == SvtPathOptions::PATH_MODULE ||
i == SvtPathOptions::PATH_PLUGIN ||
i == SvtPathOptions::PATH_STORAGE )
::utl::LocalFileHelper::ConvertPhysicalNameToURL( sTmpPath, aValue );
aStr += '\t';
aStr += Convert_Impl( aValue );
SvLBoxEntry* pEntry = pPathBox->InsertEntry( aStr );
BOOL bReadonly = aPathOpt.IsPathReadonly((SvtPathOptions::Pathes) i);
if(bReadonly)
{
pPathBox->SetCollapsedEntryBmp( pEntry, pImpl->aLockImage, BMP_COLOR_NORMAL );
pPathBox->SetCollapsedEntryBmp( pEntry, pImpl->aLockImageHC, BMP_COLOR_HIGHCONTRAST );
}
PathUserData_Impl* pPathImpl = new PathUserData_Impl( i );
pPathImpl->aPathStr = aValue;
pEntry->SetUserData( pPathImpl );
} }
PathUserData_Impl* pPathImpl = new PathUserData_Impl( i );
pPathImpl->aPathStr = aValue;
pEntry->SetUserData( pPathImpl );
} }
} }
}
String aUserData = GetUserData(); String aUserData = GetUserData();
if ( aUserData.Len() ) if ( aUserData.Len() )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment