diff options
author | Jesús Corrius <jcorrius@gmail.com> | 2013-07-20 17:10:43 +0200 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-07-20 21:01:01 +0000 |
commit | 19f3d9310caef84fe2815eb89af448a81937bddd (patch) | |
tree | 8784aea768d9355497f56cd1f3dfad4e55563014 /framework | |
parent | 822577f412214f282588b627fd6addb489f6a9f0 (diff) |
fdo#35785 LibreOffice's support of recent documents in Windows 7 broken
Change-Id: I916ba1335b0a0420f568ab9340632f273e3c9516
Reviewed-on: https://gerrit.libreoffice.org/4997
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/helper/titlebarupdate.cxx | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx index 683393363e36..f5506a1978a3 100644 --- a/framework/source/helper/titlebarupdate.cxx +++ b/framework/source/helper/titlebarupdate.cxx @@ -172,7 +172,7 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference< css::fr OUString aModuleId = xModuleManager->identify(xFrame); OUString sDesktopName; - +#if defined(UNX) && !defined(MACOSX) if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextDocument")) || aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.GlobalDocument")) || aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.WebDocument")) || @@ -198,6 +198,34 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference< css::fr sApplicationID = utl::ConfigManager::getProductName().toAsciiLowerCase(); sApplicationID += OUString(sal_Unicode('-')); sApplicationID += sDesktopName; +#elif defined(WNT) + if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.TextDocument")) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.GlobalDocument")) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.text.WebDocument")) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.xforms.XMLFormDocument")) ) + sDesktopName = OUString("Writer"); + else if ( aModuleId == "com.sun.star.sheet.SpreadsheetDocument" ) + sDesktopName = OUString("Calc"); + else if ( aModuleId == "com.sun.star.presentation.PresentationDocument" ) + sDesktopName = OUString("Impress"); + else if ( aModuleId == "com.sun.star.drawing.DrawingDocument" ) + sDesktopName = OUString("Draw"); + else if ( aModuleId == "com.sun.star.formula.FormulaProperties" ) + sDesktopName = OUString("Math"); + else if ( aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sdb.DatabaseDocument")) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sdb.OfficeDatabaseDocument")) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sdb.RelationDesign")) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sdb.QueryDesign")) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sdb.TableDesign")) || + aModuleId.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.sdb.DataSourceBrowser")) ) + sDesktopName = OUString("Base"); + else + sDesktopName = OUString("Startcenter"); + + // We use a hardcoded product name matching the registry keys so applications can be associated with file types + sApplicationID = "TheDocumentFoundation.LibreOffice."; + sApplicationID += sDesktopName; +#endif } catch(const css::uno::Exception&) { @@ -274,7 +302,7 @@ void TitleBarUpdate::impl_forceUpdate() impl_updateIcon (xFrame); impl_updateTitle (xFrame); -#if defined(UNX) && !defined(MACOSX) +#if !defined(MACOSX) impl_updateApplicationID (xFrame); #endif } |