diff options
author | Tor Lillqvist <tlillqvist@novell.com> | 2010-08-25 22:28:03 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2010-08-26 13:08:23 +0200 |
commit | 7b7494785bd8e13a80150869cfe31ab744967cd2 (patch) | |
tree | f4e4cc5185c441310b0629a644a86fcc506ee62f /framework | |
parent | 6c3eff7ee952ad4da79082b52a2eaf288a6a262b (diff) |
novell-win32-odma.diff: ODMA dialog implementation.
i#6885, i#32741
Diffstat (limited to 'framework')
-rw-r--r-- | framework/prj/build.lst | 2 | ||||
-rw-r--r-- | framework/source/uielement/recentfilesmenucontroller.cxx | 40 | ||||
-rw-r--r-- | framework/util/makefile.mk | 1 |
3 files changed, 42 insertions, 1 deletions
diff --git a/framework/prj/build.lst b/framework/prj/build.lst index 5c745e09077d..2eb363b0f3f3 100644 --- a/framework/prj/build.lst +++ b/framework/prj/build.lst @@ -1,4 +1,4 @@ -fr framework : l10n svtools NULL +fr framework : l10n svtools ucb NULL fr framework usr1 - all fr_mkout NULL fr framework\inc nmake - all fr_inc NULL fr framework\source\constant nmake - all fr_constant fr_inc NULL diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx index 64f05ed642cb..2e36a319efb6 100644 --- a/framework/source/uielement/recentfilesmenucontroller.cxx +++ b/framework/source/uielement/recentfilesmenucontroller.cxx @@ -61,6 +61,11 @@ #include <unotools/historyoptions.hxx> #include <cppuhelper/implbase1.hxx> #include <osl/file.hxx> +#ifdef WNT +#include <tools/prewin.h> +#include <tools/postwin.h> +#include <odma_lib.hxx> +#endif //#include <tools/solar.hrc> #include <dispatch/uieventloghelper.hxx> #include <vos/mutex.hxx> @@ -210,6 +215,41 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > else aMenuTitle = aSystemPath; } +#ifdef WNT + else if ( aURL.GetProtocol() == INET_PROT_VND_SUN_STAR_ODMA && ::odma::DMSsAvailable ()) + { + String aShortTitle = m_aRecentFilesItems.at( i ).aTitle; + + // This is against all rules for using + // proper abstraction layers and whatnot. + // But figuring out how to do it "right" + // would have taken the whole week. + // So just call the odma_lib functions... + // (odma_lib is a thin layer on + // top of the ODMA32 DLL) + + static ODMHANDLE handle = NULL; + static sal_Bool beenhere = sal_False; + ODMSTATUS status; + + if ( ! beenhere ) + { + status = NODMRegisterApp( &handle, ODM_API_VERSION, "sodma", NULL, NULL ); + beenhere = sal_True; + } + + if ( handle != NULL ) + { + rtl::OUString s = aURL.GetMainURL( INetURLObject::DECODE_WITH_CHARSET, RTL_TEXTENCODING_MS_1252 ); + s = s.copy( strlen ( "vnd.sun.star.odma:/" ) ); + char title[47]; + status = NODMGetDocInfo( handle, rtl::OUStringToOString( s, RTL_TEXTENCODING_MS_1252 ).pData->buffer, ODM_NAME, title, sizeof ( title ) ); + aShortTitle = String::CreateFromAscii( title ); + } + aMenuTitle += aShortTitle; + aTipHelpText = aURLString; + } +#endif else { // Use INetURLObject to abbreviate all other URLs diff --git a/framework/util/makefile.mk b/framework/util/makefile.mk index 91532cda76e2..4aee64439e0a 100644 --- a/framework/util/makefile.mk +++ b/framework/util/makefile.mk @@ -339,6 +339,7 @@ SHL4OBJS= \ $(SLO)$/startmoduledispatcher.obj SHL4STDLIBS= \ + $(ODMA_LIB_LIB) \ $(FWILIB) \ $(FWELIB) \ $(SVTOOLLIB) \ |