summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorJesús Corrius <jcorrius@gmail.com>2013-07-20 17:10:43 +0200
committerMichael Meeks <michael.meeks@suse.com>2013-07-22 10:53:55 +0000
commitf7d410edfa0866bd7759b2b977800d5744d8b544 (patch)
treeea9a949fe65d65799541c1cdeca05531d588e058 /framework
parenta6ae1cc0a2c5fd9f9bc0a834038b73e79b78fc6d (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> (cherry picked from commit 19f3d9310caef84fe2815eb89af448a81937bddd) Shell32.dll is already loaded Since the vcllo.dll links already the shell32.dll because of its symbol SHAddToRecentDocs, no need to increase reference of that library. Just get the module handle. Moreover, a mere presence of the symbol SHGetPropertyStoreForWindow in shell32.dll indicates that we are running at least on Windows 7 or Windows Server 2008 R2. There is thus no need to check for the library version. Change-Id: I9ddfb8407fd805faf588779ac5fa8c10a0ae8898 Reviewed-on: https://gerrit.libreoffice.org/5016 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org> (cherry picked from commit 50d330c3d238b7b6182787959b30a6d665eab078) Reviewed-on: https://gerrit.libreoffice.org/5024 Reviewed-by: Jesús Corrius <jcorrius@gmail.com> Reviewed-by: Tor Lillqvist <tml@iki.fi> Reviewed-by: Michael Meeks <michael.meeks@suse.com> Tested-by: Michael Meeks <michael.meeks@suse.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/helper/titlebarupdate.cxx32
1 files changed, 30 insertions, 2 deletions
diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx
index ddf55b7377a9..9b812494876c 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&)
{
@@ -275,7 +303,7 @@ void TitleBarUpdate::impl_forceUpdate()
impl_updateIcon (xFrame);
impl_updateTitle (xFrame);
-#if defined(UNX) && !defined(MACOSX)
+#if !defined(MACOSX)
impl_updateApplicationID (xFrame);
#endif
}