summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Burow <pb@openoffice.org>2001-06-06 11:49:42 +0000
committerPeter Burow <pb@openoffice.org>2001-06-06 11:49:42 +0000
commit3313b9593e812388e206f3a3efea91bf48fa5208 (patch)
tree42eea50e818f51afb0df0a656d960b3c06223820
parentc5f0562a4d97053b2503630a7d62e97e061cbd24 (diff)
fix: #87514# human readable mime type
-rw-r--r--svtools/source/contnr/templwin.cxx25
-rw-r--r--svtools/source/contnr/templwin.hxx5
2 files changed, 25 insertions, 5 deletions
diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx
index d0f1770a773b..4275c6041c9a 100644
--- a/svtools/source/contnr/templwin.cxx
+++ b/svtools/source/contnr/templwin.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: templwin.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: pb $ $Date: 2001-06-01 13:39:22 $
+ * last change: $Author: pb $ $Date: 2001-06-06 12:49:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,6 +66,7 @@
#include "dynamicmenuoptions.hxx"
#include "xtextedt.hxx"
#include "txtattr.hxx"
+#include "inettype.hxx"
#include "svtools.hrc"
#include "templwin.hrc"
@@ -555,6 +556,10 @@ SvtFrameWindow_Impl::SvtFrameWindow_Impl( Window* pParent ) :
Window( pParent )
{
+ // detect application language
+ eLangType = SvtPathOptions().GetLanguageType();
+
+ // create windows and frame
pEditWin = new SvtExtendedMultiLineEdit_Impl( this );
pTextWin = new Window( this );
xFrame = ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame > (
@@ -562,6 +567,8 @@ SvtFrameWindow_Impl::SvtFrameWindow_Impl( Window* pParent ) :
String( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Frame") ) ), ::com::sun::star::uno::UNO_QUERY );
xWindow = VCLUnoHelper::GetInterface( pTextWin );
xFrame->initialize( xWindow );
+
+ // create docinfo instance
xDocInfo = ::com::sun::star::uno::Reference < ::com::sun::star::io::XPersist > (
::comphelper::getProcessServiceFactory()->createInstance(
String( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.DocumentProperties") ) ), ::com::sun::star::uno::UNO_QUERY );
@@ -617,7 +624,19 @@ void SvtFrameWindow_Impl::ShowDocInfo( const String& rURL )
case STRING_TYPE :
{
if ( ( aValue >>= aStringValue ) && aStringValue.getLength() > 0 )
- pEditWin->InsertEntry( aInfoTable.GetString( DocInfoMap_Impl[ nIndex ]._nStringId ), String( aStringValue ) );
+ {
+ String aValueStr;
+ if ( DI_MIMETYPE == DocInfoMap_Impl[ nIndex ]._nStringId )
+ {
+ INetContentType eTypeID = INetContentTypes::GetContentTypeFromURL( rURL );
+ aValueStr = INetContentTypes::GetPresentation( eTypeID, eLangType );
+ if ( aValueStr.Len() == 0 )
+ aValueStr = String( aStringValue );
+ }
+ else
+ aValueStr = String( aStringValue );
+ pEditWin->InsertEntry( aInfoTable.GetString( DocInfoMap_Impl[ nIndex ]._nStringId ), aValueStr );
+ }
break;
}
diff --git a/svtools/source/contnr/templwin.hxx b/svtools/source/contnr/templwin.hxx
index 447598d15fa5..363da7a9f9ae 100644
--- a/svtools/source/contnr/templwin.hxx
+++ b/svtools/source/contnr/templwin.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: templwin.hxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: pb $ $Date: 2001-05-23 13:11:11 $
+ * last change: $Author: pb $ $Date: 2001-06-06 12:49:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -177,6 +177,7 @@ private:
SvtExtendedMultiLineEdit_Impl* pEditWin;
Window* pTextWin;
+ LanguageType eLangType;
SvtDocInfoTable_Impl aInfoTable;
String aCurrentURL;