diff options
41 files changed, 504 insertions, 192 deletions
diff --git a/autodoc/source/display/idl/hfi_doc.cxx b/autodoc/source/display/idl/hfi_doc.cxx index d5c686d2bbe0..278859f76acb 100644 --- a/autodoc/source/display/idl/hfi_doc.cxx +++ b/autodoc/source/display/idl/hfi_doc.cxx @@ -55,8 +55,17 @@ HF_IdlDocu::~HF_IdlDocu() } void -HF_IdlDocu::Produce_byDocu4Reference( const ce_info & i_rDocuForReference, - const client & i_rScopeGivingCe ) const +HF_IdlDocu::Produce_fromCodeEntity( const client & i_ce ) const +{ + const ce_info * + i_pDocu = Get_IdlDocu(i_ce.Docu()); + if (i_pDocu != 0) + Produce_byDocuAndScope(*i_pDocu, &i_ce, i_ce); +} + +void +HF_IdlDocu::Produce_fromReference( const ce_info & i_rDocuForReference, + const client & i_rScopeGivingCe ) const { Produce_byDocuAndScope(i_rDocuForReference, 0, i_rScopeGivingCe ); } @@ -121,11 +130,31 @@ HF_IdlDocu::Produce_byDocuAndScope( const ce_info & i_rDocu, } } + std::vector< csi::dsapi::DT_SeeAlsoAtTag* > + aSeeAlsosWithoutText; + std::vector< csi::dsapi::DT_SeeAlsoAtTag* > + aSeeAlsosWithText; + for ( std::vector< ary::inf::AtTag2* >::const_iterator iter = i_rDocu.Tags().begin(); iter != i_rDocu.Tags().end(); ++iter ) { + csi::dsapi::DT_SeeAlsoAtTag* + pSeeAlso = dynamic_cast< csi::dsapi::DT_SeeAlsoAtTag * >(*iter); + if (pSeeAlso != 0 ) + { + if ( pSeeAlso->Text().IsEmpty() ) + { + aSeeAlsosWithoutText.push_back(pSeeAlso); + } + else + { + aSeeAlsosWithText.push_back(pSeeAlso); + } + continue; + } + if ( strlen( (*iter)->Title() ) > 0 ) { HF_IdlTag @@ -137,4 +166,29 @@ HF_IdlDocu::Produce_byDocuAndScope( const ce_info & i_rDocu, *(*iter) ); } } // end for + + if (aSeeAlsosWithoutText.size() > 0) + { + HF_IdlTag + aSeeAlsoTag(Env(), i_rScopeGivingCe); + Xml::Element & + rTerm = rOut.Produce_Term(); + aSeeAlsoTag.Produce_byData( rTerm, + rOut.Produce_Definition(), + aSeeAlsosWithoutText ); + } + + for ( std::vector< csi::dsapi::DT_SeeAlsoAtTag* >::const_iterator + itSee2 = aSeeAlsosWithText.begin(); + itSee2 != aSeeAlsosWithText.end(); + ++itSee2 ) + { + HF_IdlTag + aTag(Env(), i_rScopeGivingCe); + Xml::Element & + rTerm = rOut.Produce_Term(); + aTag.Produce_byData( rTerm, + rOut.Produce_Definition(), + *(*itSee2) ); + } // end for } diff --git a/autodoc/source/display/idl/hfi_doc.hxx b/autodoc/source/display/idl/hfi_doc.hxx index b44fd4822770..9064bba3fee8 100644 --- a/autodoc/source/display/idl/hfi_doc.hxx +++ b/autodoc/source/display/idl/hfi_doc.hxx @@ -53,12 +53,18 @@ class HF_IdlDocu : public HtmlFactory_Idl /** Produces documentation by the CodeInfo accompanying + ->i_ce. + */ + void Produce_fromCodeEntity( + const client & i_ce ) const; + + /** Produces documentation by the CodeInfo accompanying a link or reference to a CodeEntity. @param i_rScopeGivingCe Gives the scope from which links are to be calculated. */ - void Produce_byDocu4Reference( + void Produce_fromReference( const ce_info & i_rDocuForReference, const client & i_rScopeGivingCe ) const; diff --git a/autodoc/source/display/idl/hfi_interface.cxx b/autodoc/source/display/idl/hfi_interface.cxx index 26d548c613e8..1c242f746b58 100644 --- a/autodoc/source/display/idl/hfi_interface.cxx +++ b/autodoc/source/display/idl/hfi_interface.cxx @@ -335,7 +335,7 @@ HF_IdlInterface::produce_BaseHierarchy( Xml::Element & o_screen, HF_IdlDocu aDocuDisplay(Env(), aDocuList); - aDocuDisplay.Produce_byDocu4Reference(*(*it).Info(), i_ce); + aDocuDisplay.Produce_fromReference(*(*it).Info(), i_ce); } else { diff --git a/autodoc/source/display/idl/hfi_property.cxx b/autodoc/source/display/idl/hfi_property.cxx index 282095578a6c..8500a236c791 100644 --- a/autodoc/source/display/idl/hfi_property.cxx +++ b/autodoc/source/display/idl/hfi_property.cxx @@ -378,7 +378,7 @@ HF_IdlCommentedRelationElement::produce_LinkDoc( Environment & io_env, HF_DocEntryList aDocList(io_context); HF_IdlDocu aDocuDisplay(io_env, aDocList); - aDocuDisplay.Produce_byDocu4Reference(*i_commentedRef.Info(), i_ce); + aDocuDisplay.Produce_fromReference(*i_commentedRef.Info(), i_ce); } else { diff --git a/autodoc/source/display/idl/hfi_tag.cxx b/autodoc/source/display/idl/hfi_tag.cxx index 99f4a83732ca..8d194bc43222 100644 --- a/autodoc/source/display/idl/hfi_tag.cxx +++ b/autodoc/source/display/idl/hfi_tag.cxx @@ -93,6 +93,28 @@ HF_IdlTag::Produce_byData( Xml::Element & o_rTitle, } void +HF_IdlTag::Produce_byData( Xml::Element & o_rTitle, + Xml::Element & o_rText, + const std::vector< csi::dsapi::DT_SeeAlsoAtTag* > & + i_seeAlsoVector ) const +{ + o_rTitle << "See also"; + for ( std::vector< csi::dsapi::DT_SeeAlsoAtTag* >::const_iterator + it = i_seeAlsoVector.begin(); + it != i_seeAlsoVector.end(); + ++it ) + { + if (it != i_seeAlsoVector.begin()) + { + o_rText << ", "; + } + HF_IdlTypeText + aLinkText(Env(), o_rText, true, &aTextOut.ScopeGivingCe()); + aLinkText.Produce_byData( (*it)->LinkText() ); + } +} + +void HF_IdlTag::Display_StdAtTag( const csi::dsapi::DT_StdAtTag & i_rTag ) { if ( i_rTag.Text().IsEmpty() ) diff --git a/autodoc/source/display/idl/hfi_tag.hxx b/autodoc/source/display/idl/hfi_tag.hxx index c070c5d15a0a..23f16a46919f 100644 --- a/autodoc/source/display/idl/hfi_tag.hxx +++ b/autodoc/source/display/idl/hfi_tag.hxx @@ -142,6 +142,11 @@ class HF_IdlTag : public HtmlFactory_Idl, Xml::Element & o_rText, const ary::inf::AtTag2 & i_rTag ) const; + void Produce_byData( + Xml::Element & o_rTitle, + Xml::Element & o_rText, + const std::vector< csi::dsapi::DT_SeeAlsoAtTag* > & + i_seeAlsoVector ) const; private: virtual void Display_StdAtTag( const csi::dsapi::DT_StdAtTag & diff --git a/autodoc/source/display/idl/hi_factory.cxx b/autodoc/source/display/idl/hi_factory.cxx index 04ac8e3d2c13..5b711d5d9ed6 100644 --- a/autodoc/source/display/idl/hi_factory.cxx +++ b/autodoc/source/display/idl/hi_factory.cxx @@ -224,7 +224,7 @@ HtmlFactory_Idl::write_Docu( Xml::Element & o_screen, aDocuList( o_screen ); HF_IdlDocu aDocu( Env(), aDocuList ); - aDocu.Produce_byDocu4Reference(*doc, i_ce); + aDocu.Produce_fromCodeEntity(i_ce); } write_ManualLinks(o_screen, i_ce); diff --git a/odk/cfgWin.js b/odk/cfgWin.js index 662bd3ae05f4..1cc7836d7414 100644 --- a/odk/cfgWin.js +++ b/odk/cfgWin.js @@ -42,7 +42,7 @@ var oo_sdk_ure_home=getUreHome(); var oo_sdk_make_home=getMakeHome(); var oo_sdk_zip_home=getZipHome(); -var oo_sdk_vc8_used=""; +var oo_sdk_manifest_used=""; var oo_sdk_windowssdk=""; var oo_sdk_cpp_home=getCppHome(); var oo_sdk_cli_home=getCliHome(); @@ -391,6 +391,7 @@ function getCppHome() // check Windows SDK if VC 9 if (sVC.length > 0) { + oo_sdk_manifest_used="true"; try { oo_sdk_windowssdk = WshShell.RegRead(regKeyWindowsSDK); }catch (exc) {} @@ -400,18 +401,16 @@ function getCppHome() try { sVC = WshShell.RegRead(regKeyVCExpress80); }catch (exc) {} + if (sVC.length > 0) + oo_sdk_manifest_used="true"; } if (sVC.length == 0) { try { sVC = WshShell.RegRead(regKeyVC80); }catch (exc) {} - } - if (sVC.length == 0) - { - try { - sVC = WshShell.RegRead(regKeyVCExpress80); - }catch (exc) {} + if (sVC.length > 0) + oo_sdk_manifest_used="true"; } if (sVC.length == 0) { @@ -436,17 +435,17 @@ function getCppHome() if (sHome.length == 0) { //No user input, check OO_SDK_CPP_HOME or suggested value - if ( sSuggestedHome.length == 0 ) { - bSkip = true; - } else { - if ( !aFileSystemObject.FolderExists(sSuggestedHome) ) - { - stdout.WriteLine("\n Error: Could not find directory \"" + - sSuggestedHome + "\"."); - sSuggestedHome = ""; - bSkip = true; - } - } + if ( sSuggestedHome.length == 0 ) { + bSkip = true; + } else { + if ( !aFileSystemObject.FolderExists(sSuggestedHome) ) + { + stdout.WriteLine("\n Error: Could not find directory \"" + + sSuggestedHome + "\"."); + sSuggestedHome = ""; + bSkip = true; + } + } sHome = sSuggestedHome; } else @@ -787,6 +786,7 @@ function writeBatFile(fdir, file) if ( !fso.FolderExists(fdir) ) fso.CreateFolder(fdir); var newFile = fso.CreateTextFile(file, true); + newFile.Write( "@echo off\n" + "REM This script sets all enviroment variables, which\n" + @@ -822,7 +822,7 @@ function writeBatFile(fdir, file) "REM Directory of the C++ compiler.\n" + "REM Example:set OO_SDK_CPP_HOME=C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\bin\n" + "set OO_SDK_CPP_HOME=" + oo_sdk_cpp_home + - "\nset CPP_VC8=" + oo_sdk_vc8_used + + "\nset CPP_MANIFEST=" + oo_sdk_manifest_used + "\nset CPP_WINDOWS_SDK=" + oo_sdk_windowssdk + "\n\n" + "REM Directory of the C# and VB.NET compilers.\n" + @@ -931,6 +931,11 @@ function writeBatFile(fdir, file) "REM Add directory of the C++ compiler to the path, if necessary.\n" + "if defined OO_SDK_CPP_HOME set PATH=%OO_SDK_CPP_HOME%;%PATH%\n" + "\n" + + "REM Add directory of the Win SDK to the path, if necessary.\n" + + "if defined CPP_WINDOWS_SDK (\n" + + " set PATH=%CPP_WINDOWS_SDK\\bin%;%PATH%\n" + + " set INCLUDE=%CPP_WINDOWS_SDK\\Include%;%INCLUDE%\n" + + ")\n" + "REM Add directory of the C# and VB.NET compilers to the path, if necessary.\n" + "if defined OO_SDK_CLI_HOME set PATH=%OO_SDK_CLI_HOME%;%PATH%\n" + "\n" + diff --git a/odk/configure.pl b/odk/configure.pl index 5eef741f9aef..fd6d9cebcec0 100644 --- a/odk/configure.pl +++ b/odk/configure.pl @@ -55,7 +55,7 @@ $main::zipVersion = "2.3"; $main::OO_SDK_CPP_HOME = ""; $main::cppName = "gcc"; -$main::cppVersion = "3.0.1"; +$main::cppVersion = "4.0.1"; if ( $main::operatingSystem =~ m/solaris/ ) { $main::cppName = "CC"; @@ -71,7 +71,7 @@ if ( $main::operatingSystem =~ m/darwin/ ) $main::OO_SDK_JAVA_BIN_DIR="Commands"; } $main::OO_SDK_JAVA_HOME_SUGGESTION = searchprog("javac"); -$main::javaVersion = "1.4.1_01"; +$main::javaVersion = "1.5.0_01"; $main::SDK_AUTO_DEPLOYMENT = ""; $main::SDK_AUTO_DEPLOYMENT_SUGGESTION = "YES"; @@ -311,7 +311,7 @@ while ( (!$main::correctVersion) && { print " C++ compilers where for example a language binding exist:\n"; print " - Solaris, Sun WorkShop 6 update 1 C++ 5.2 2000/09/11 or higher\n"; - print " - Linux, GNU C++ compiler, gcc version 3.0.1 or higher\n"; + print " - Linux, GNU C++ compiler, gcc version 4.0.1 or higher\n"; print " - MacOS, GNU C++ compiler, gcc version 4.0.1 or higher\n"; print " Enter the directory of the C++ compiler, the directory\n"; print " where the compiler is located (optional) [$main::OO_SDK_CPP_HOME_SUGGESTION]: "; @@ -417,7 +417,7 @@ while ( (!$main::correctVersion) && ((! -d "$main::OO_SDK_JAVA_HOME" ) || ((-d "$main::OO_SDK_JAVA_HOME") && (! -e "$main::OO_SDK_JAVA_HOME/$main::OO_SDK_JAVA_BIN_DIR/javac"))) ) { - print " Enter Java SDK (1.4.1_01 or higher) installation directory (optional) [$main::OO_SDK_JAVA_HOME_SUGGESTION]: "; + print " Enter Java SDK (1.5, recommendation is 1.6 or higher) installation directory (optional) [$main::OO_SDK_JAVA_HOME_SUGGESTION]: "; $main::OO_SDK_JAVA_HOME = readStdIn(); chop($main::OO_SDK_JAVA_HOME); if ( $main::OO_SDK_JAVA_HOME eq "" ) diff --git a/odk/docs/install.html b/odk/docs/install.html index dafd98d99de5..f29b099334b0 100644 --- a/odk/docs/install.html +++ b/odk/docs/install.html @@ -55,13 +55,10 @@ <td colspan="2"><img class="line" src="images/sdk_line-1.gif"></td> </tr> <tr valign="top"> - <td><b>JDK (1.4.1_01 or higher)<b></td> + <td><b>JDK (1.5 or higher)<b></td> <td class="content80"> <p>A JDK is necessary for developing Java components or applications. An appropriate Java SDK can be found on <a target="_blank" href="http://java.sun.com/products" title="link to the Java SDK download page (online)">http://java.sun.com/products</a>.</p> - <p>If Java 5.0 or higher is used, you have to ensure that the office - installation uses Java 5.0 as well, because of class format changes in - Java 5.0. Components built with Java 5.0 cannot be deployed by unopkg - (using the office Java) that uses a lower Java version than Java 5.0.</p> + <p>Recommendation is to use Java 6 excepting for Mac OS because initially Mac OS supported a 64bit version of Java 6 only.</p> <p><b>Note</b>: The Java compiler is <b><u>optional</u></b>!</p></td> </tr> <tr valign="middle"> diff --git a/odk/docs/tools.html b/odk/docs/tools.html index 28ea6ef3c722..21d2fbe56833 100644 --- a/odk/docs/tools.html +++ b/odk/docs/tools.html @@ -2,9 +2,8 @@ <head> <title>[TITLE] SDK - Development Tools</title> <link rel="stylesheet" type="text/css" href="sdk_styles.css"> - <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="author" content="Jürgen Schmidt"> - <meta name="created" content="2004-12-14"> </head> <body class="sdkbody"><a name="tools"/> @@ -86,6 +85,12 @@ <td class="content87">Tool for generating Java class files for the UNOIDL types stored in a type library.</td> </tr> + <tr valign="top"> + <td class="content3"><img src="images/arrow-1.gif"></td> + <td><a href="#climaker" title="link to the climaker tool description">climaker</a></td> + <td class="content87">Tool for generating CLI assemblies for the + UNOIDL types stored in a type library (windows only).</td> + </tr> <tr valign="top"> <td class="content3"><img src="images/arrow-1.gif"></td> <td><a href="#uno-skeletonmaker" title="link to the uno-skeletonmaker tool description">uno-skeletonmaker</a></td> @@ -584,6 +589,100 @@ types the specified types depend on.</p> <td> <table class="table2"> <tr> + <td colspan="2" class="head1"><a name="climaker"/>climaker</td> + <td align="right"> + <a href="#tools" title="link to the tools overview"><img class="navigate" src="images/nav_up.png"></a> + <a href="../index.html" title="link to the SDK start page"><img class="navigate" src="images/nav_home.png"></a> + </td> + </tr> + <tr> + <td colspan="3"> + <p>The 'climaker' (windows only) generates the appropriate CLI assemblies file for each idl + type. The climaker works on a typelibrary which is generated by the + UNOIDL compiler (<a href="#idlc" link="link to the idlc tool description"> + idlc</a>). It generates the output for all specified types and for all + types the specified types depend on.</p> + <p class="head2">Usage:</p> + <blockquote> + <b><code>climaker <switches> [registry-file-1 registry-file-2 ...]</code></b> + </blockquote> + <p class="head2">Options:</p> + <p> + <table class="table4"> + <tr> + <td class="cell15"><code>-O, --out <output_file></code></td> + <td class="cell85">output assembly file;<br> + defaults to cli_unotypes.dll if more than one registry-file is given, else <registry-file>.dll</td> + </tr> + <tr> + <td class="cell15"><code>-T, --types <type1[;type2;...]></code></td> + <td class="cell85">types to be generated (if none is given, + then all types of given registries are emitted</td> + </tr> + <tr> + <td class="cell15"><code>-X, --extra <rdb-file>></code></td> + <td class="cell85">additional rdb to saturate referenced types in + given registry file(s); these types will not be + emitted into the output assembly file</td> + </tr> + <tr> + <td class="cell15"><code>-r, --reference <assembly-file></code></td> + <td class="cell85">reference metadata from assembly file</td> + </tr> + <tr> + <td class="cell15"><code>-k, --keyfile</code></td> + <td class="cell85">keyfile needed for strong name</td> + </tr> + <tr> + <td class="cell15"><code>--assembly-version <version></code></td> + <td class="cell85">sets assembly version</td> + </tr> + <tr> + <td class="cell15"><code>--assembly-description <text></code></td> + <td class="cell85">sets assembly description text</td> + </tr> + <tr> + <td class="cell15"><code>--assembly-product <text></code></td> + <td class="cell85">sets assembly product name</td> + </tr> + <tr> + <td class="cell15"><code>--assembly-company <text></code></td> + <td class="cell85">sets assembly company</td> + </tr> + <tr> + <td class="cell15"><code>--assembly-copyright <text></code></td> + <td class="cell85">sets assembly copyright</td> + </tr> + <tr> + <td class="cell15"><code>--assembly-trademark <text></code></td> + <td class="cell85">sets assembly trademark</td> + </tr> + <tr> + <td class="cell15"><code>-v, --verbose</code></td> + <td class="cell85">verbose output to stdout</td> + </tr> + <tr> + <td class="cell15"><code>-h, --help</code></td> + <td class="cell85">this message</td> + </tr> + + </table> + </p> + <p><b>Example:</b> <code>climaker --out cli_mytypes.dll --reference cli_uretypes.dll --extra types.rdb mytypes.rdb</code></p> + </td> + </tr> + </table> + </td> + <td class="content1"><img class="nothing8" src="images/nada.gif"></td> + </tr> + <tr> + <td colspan="3"><img class="line" src="images/sdk_line-2.gif"></td> + </tr> + <tr> + <td class="content1"><img class="nothing8" src="images/nada.gif"></td> + <td> + <table class="table2"> + <tr> <td colspan="2" class="head1"><a name="uno-skeletonmaker"/>uno-skeletonmaker</td> <td align="right"> <a href="#tools" title="link to the tools overview"><img class="navigate" src="images/nav_up.png"></a> diff --git a/odk/examples/DevelopersGuide/Accessibility/Makefile b/odk/examples/DevelopersGuide/Accessibility/Makefile index 95896721d87b..308a25418486 100644 --- a/odk/examples/DevelopersGuide/Accessibility/Makefile +++ b/odk/examples/DevelopersGuide/Accessibility/Makefile @@ -68,7 +68,11 @@ JAVAFILES = \ TextualDisplay.java APP1_CLASSFILES = $(patsubst %.java,$(OUT_APP_CLASS)/%.class,$(JAVAFILES)) -APP1_CLASSNAMES = $(patsubst %.java,%.class,$(JAVAFILES)) +APP1_CLASSNAMES = $(patsubst %.java,%.class,$(JAVAFILES)) \ + EventListenerProxy$(ICL)1.class \ + EventListenerProxy$(ICL)2.class \ + EventListenerProxy$(ICL)3.class \ + EventListenerProxy$(ICL)4.class SDK_CLASSPATH = $(subst $(EMPTYSTRING) $(PATH_SEPARATOR),$(PATH_SEPARATOR),$(CLASSPATH)\ $(PATH_SEPARATOR)$(OUT_APP_CLASS)) diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile index f86b7950ba4b..c081c3747a63 100644 --- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile +++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/Makefile @@ -90,7 +90,7 @@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \ /MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib - $(LINK_MANIFEST_VC8_ONLY) + $(LINK_MANIFEST) else $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE) -$(MKDIR) $(subst /,$(PS),$(@D)) diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/Makefile b/odk/examples/DevelopersGuide/Components/CppComponent/Makefile index 7e46f679096f..fb7b4a1ab52d 100644 --- a/odk/examples/DevelopersGuide/Components/CppComponent/Makefile +++ b/odk/examples/DevelopersGuide/Components/CppComponent/Makefile @@ -123,7 +123,7 @@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \ /MAP:$(SAMPLE_GEN_OUT)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib - $(LINK_MANIFEST_VC8_ONLY) + $(LINK_MANIFEST) else $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE) -$(MKDIR) $(subst /,$(PS),$(@D)) && $(DEL) $(subst \\,\,$(subst /,$(PS),$@)) diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/TestCppComponent.cxx b/odk/examples/DevelopersGuide/Components/CppComponent/TestCppComponent.cxx index afda5d3cdeba..d3e264f2232c 100644 --- a/odk/examples/DevelopersGuide/Components/CppComponent/TestCppComponent.cxx +++ b/odk/examples/DevelopersGuide/Components/CppComponent/TestCppComponent.cxx @@ -39,6 +39,7 @@ *************************************************************************/ #include <stdio.h> +#include <sal/main.h> #include <cppuhelper/bootstrap.hxx> #include <com/sun/star/bridge/XUnoUrlResolver.hpp> #include <com/sun/star/frame/XComponentLoader.hpp> @@ -51,7 +52,7 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::frame; -int SAL_CALL main( int, char ** ) +SAL_IMPLEMENT_MAIN() { try { diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile b/odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile index c491eba8b436..076da65424aa 100644 --- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile +++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/Makefile @@ -98,7 +98,7 @@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \ /MAP:$(OUT_COMP_MISC)/$(COMP_NAME).map $(SLOFILES) \ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib - $(LINK_MANIFEST_VC8_ONLY) + $(LINK_MANIFEST) else $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE) -$(MKDIR) $(subst /,$(PS),$(@D)) diff --git a/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java b/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java index eff9a710b8a6..c217768dec1e 100644 --- a/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java +++ b/odk/examples/DevelopersGuide/FirstSteps/FirstLoadComponent.java @@ -37,34 +37,27 @@ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * *************************************************************************/ - -import com.sun.star.uno.UnoRuntime; +import com.sun.star.beans.PropertyValue; +import com.sun.star.beans.XPropertySet; import com.sun.star.uno.XComponentContext; -import com.sun.star.lang.XMultiComponentFactory; +import com.sun.star.comp.helper.Bootstrap; +import com.sun.star.container.XEnumeration; +import com.sun.star.container.XEnumerationAccess; +import com.sun.star.frame.XComponentLoader; +import com.sun.star.frame.XController; +import com.sun.star.frame.XModel; import com.sun.star.lang.XComponent; -import com.sun.star.beans.XPropertySet; -import com.sun.star.beans.PropertyValue; -import com.sun.star.sheet.XSpreadsheetDocument; -import com.sun.star.sheet.XSpreadsheets; -import com.sun.star.sheet.XSpreadsheet; -import com.sun.star.sheet.XSpreadsheetView; +import com.sun.star.lang.XMultiComponentFactory; +import com.sun.star.sheet.XCellAddressable; import com.sun.star.sheet.XCellRangesQuery; import com.sun.star.sheet.XSheetCellRanges; -import com.sun.star.sheet.XCellAddressable; +import com.sun.star.sheet.XSpreadsheet; +import com.sun.star.sheet.XSpreadsheetDocument; +import com.sun.star.sheet.XSpreadsheetView; +import com.sun.star.sheet.XSpreadsheets; import com.sun.star.table.XCell; -import com.sun.star.frame.XModel; -import com.sun.star.frame.XController; -import com.sun.star.frame.XComponentLoader; -import com.sun.star.container.XEnumeration; -import com.sun.star.container.XEnumerationAccess; - -import com.sun.star.uno.AnyConverter; - +import com.sun.star.uno.UnoRuntime; -/** - * - * @author dschulten - */ public class FirstLoadComponent { /** Creates a new instance of FirstLoadComponent */ @@ -74,37 +67,16 @@ public class FirstLoadComponent { /** * @param args the command line arguments */ - private XComponentContext xRemoteContext = null; - private XMultiComponentFactory xRemoteServiceManager = null; - public static void main(String[] args) { - FirstLoadComponent firstLoadComponent1 = new FirstLoadComponent(); - try { - firstLoadComponent1.useConnection(); - } - catch (java.lang.Exception e){ - System.out.println(e.getMessage()); - e.printStackTrace(); - } - finally { - System.exit(0); - } - } - - private void useConnection() throws java.lang.Exception { try { // get the remote office component context - xRemoteContext = com.sun.star.comp.helper.Bootstrap.bootstrap(); - System.out.println("Connected to a running office ..."); + XComponentContext xRemoteContext = Bootstrap.bootstrap(); + if (xRemoteContext == null) { + System.err.println("ERROR: Could not bootstrap default Office."); + } - xRemoteServiceManager = xRemoteContext.getServiceManager(); - } - catch( Exception e) { - e.printStackTrace(); - System.exit(1); - } + XMultiComponentFactory xRemoteServiceManager = xRemoteContext.getServiceManager(); - try { Object desktop = xRemoteServiceManager.createInstanceWithContext( "com.sun.star.frame.Desktop", xRemoteContext); XComponentLoader xComponentLoader = (XComponentLoader) @@ -191,9 +163,173 @@ public class FirstLoadComponent { } } - catch( com.sun.star.lang.DisposedException e ) { //works from Patch 1 - xRemoteContext = null; - throw e; + catch (java.lang.Exception e){ + e.printStackTrace(); + } + finally { + System.exit( 0 ); } } + } + + +// import com.sun.star.uno.UnoRuntime; +// import com.sun.star.uno.XComponentContext; +// import com.sun.star.lang.XMultiComponentFactory; +// import com.sun.star.lang.XComponent; +// import com.sun.star.beans.XPropertySet; +// import com.sun.star.beans.PropertyValue; +// import com.sun.star.sheet.XSpreadsheetDocument; +// import com.sun.star.sheet.XSpreadsheets; +// import com.sun.star.sheet.XSpreadsheet; +// import com.sun.star.sheet.XSpreadsheetView; +// import com.sun.star.sheet.XCellRangesQuery; +// import com.sun.star.sheet.XSheetCellRanges; +// import com.sun.star.sheet.XCellAddressable; +// import com.sun.star.table.XCell; +// import com.sun.star.frame.XModel; +// import com.sun.star.frame.XController; +// import com.sun.star.frame.XComponentLoader; +// import com.sun.star.container.XEnumeration; +// import com.sun.star.container.XEnumerationAccess; + +// import com.sun.star.uno.AnyConverter; + + +// /** +// * +// * @author dschulten +// */ +// public class FirstLoadComponent { + +// /** Creates a new instance of FirstLoadComponent */ +// public FirstLoadComponent() { +// } + +// /** +// * @param args the command line arguments +// */ +// private XComponentContext xRemoteContext = null; +// private XMultiComponentFactory xRemoteServiceManager = null; + +// public static void main(String[] args) { +// FirstLoadComponent firstLoadComponent1 = new FirstLoadComponent(); +// try { +// firstLoadComponent1.useConnection(); +// } +// catch (java.lang.Exception e){ +// System.out.println(e.getMessage()); +// e.printStackTrace(); +// } +// finally { +// System.exit(0); +// } +// } + +// private void useConnection() throws java.lang.Exception { +// try { +// // get the remote office component context +// xRemoteContext = com.sun.star.comp.helper.Bootstrap.bootstrap(); +// System.out.println("Connected to a running office ..."); + +// xRemoteServiceManager = xRemoteContext.getServiceManager(); +// } +// catch( Exception e) { +// e.printStackTrace(); +// System.exit(1); +// } + +// try { +// Object desktop = xRemoteServiceManager.createInstanceWithContext( +// "com.sun.star.frame.Desktop", xRemoteContext); +// XComponentLoader xComponentLoader = (XComponentLoader) +// UnoRuntime.queryInterface(XComponentLoader.class, desktop); + +// PropertyValue[] loadProps = new PropertyValue[0]; +// XComponent xSpreadsheetComponent = xComponentLoader.loadComponentFromURL("private:factory/scalc", "_blank", 0, loadProps); + +// XSpreadsheetDocument xSpreadsheetDocument = (XSpreadsheetDocument) +// UnoRuntime.queryInterface(XSpreadsheetDocument.class, +// xSpreadsheetComponent); + +// XSpreadsheets xSpreadsheets = xSpreadsheetDocument.getSheets(); +// xSpreadsheets.insertNewByName("MySheet", (short)0); +// com.sun.star.uno.Type elemType = xSpreadsheets.getElementType(); + +// System.out.println(elemType.getTypeName()); +// Object sheet = xSpreadsheets.getByName("MySheet"); +// XSpreadsheet xSpreadsheet = (XSpreadsheet)UnoRuntime.queryInterface( +// XSpreadsheet.class, sheet); + +// XCell xCell = xSpreadsheet.getCellByPosition(0, 0); +// xCell.setValue(21); +// xCell = xSpreadsheet.getCellByPosition(0, 1); +// xCell.setValue(21); +// xCell = xSpreadsheet.getCellByPosition(0, 2); +// xCell.setFormula("=sum(A1:A2)"); + +// XPropertySet xCellProps = (XPropertySet)UnoRuntime.queryInterface( +// XPropertySet.class, xCell); +// xCellProps.setPropertyValue("CellStyle", "Result"); + +// XModel xSpreadsheetModel = (XModel)UnoRuntime.queryInterface( +// XModel.class, xSpreadsheetComponent); +// XController xSpreadsheetController = xSpreadsheetModel.getCurrentController(); +// XSpreadsheetView xSpreadsheetView = (XSpreadsheetView) +// UnoRuntime.queryInterface(XSpreadsheetView.class, +// xSpreadsheetController); +// xSpreadsheetView.setActiveSheet(xSpreadsheet); + +// // ********************************************************* +// // example for use of enum types +// xCellProps.setPropertyValue("VertJustify", +// com.sun.star.table.CellVertJustify.TOP); + + +// // ********************************************************* +// // example for a sequence of PropertyValue structs +// // create an array with one PropertyValue struct, it contains +// // references only +// loadProps = new PropertyValue[1]; + +// // instantiate PropertyValue struct and set its member fields +// PropertyValue asTemplate = new PropertyValue(); +// asTemplate.Name = "AsTemplate"; +// asTemplate.Value = new Boolean(true); + +// // assign PropertyValue struct to array of references for PropertyValue +// // structs +// loadProps[0] = asTemplate; + +// // load calc file as template +// //xSpreadsheetComponent = xComponentLoader.loadComponentFromURL( +// // "file:///c:/temp/DataAnalysys.ods", "_blank", 0, loadProps); + +// // ********************************************************* +// // example for use of XEnumerationAccess +// XCellRangesQuery xCellQuery = (XCellRangesQuery) +// UnoRuntime.queryInterface(XCellRangesQuery.class, sheet); +// XSheetCellRanges xFormulaCells = xCellQuery.queryContentCells( +// (short)com.sun.star.sheet.CellFlags.FORMULA); +// XEnumerationAccess xFormulas = xFormulaCells.getCells(); +// XEnumeration xFormulaEnum = xFormulas.createEnumeration(); + +// while (xFormulaEnum.hasMoreElements()) { +// Object formulaCell = xFormulaEnum.nextElement(); +// xCell = (XCell)UnoRuntime.queryInterface(XCell.class, formulaCell); +// XCellAddressable xCellAddress = (XCellAddressable) +// UnoRuntime.queryInterface(XCellAddressable.class, xCell); +// System.out.println("Formula cell in column " + +// xCellAddress.getCellAddress().Column +// + ", row " + xCellAddress.getCellAddress().Row +// + " contains " + xCell.getFormula()); +// } + +// } +// catch( com.sun.star.lang.DisposedException e ) { //works from Patch 1 +// xRemoteContext = null; +// throw e; +// } +// } +// } diff --git a/odk/examples/DevelopersGuide/Forms/ButtonOperator.java b/odk/examples/DevelopersGuide/Forms/ButtonOperator.java index ee9a2c8c511c..bed25416b824 100644 --- a/odk/examples/DevelopersGuide/Forms/ButtonOperator.java +++ b/odk/examples/DevelopersGuide/Forms/ButtonOperator.java @@ -37,8 +37,6 @@ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * *************************************************************************/ -package org.openoffice.sdk.forms; - // java base stuff import com.sun.star.awt.ActionEvent; import com.sun.star.awt.XActionListener; diff --git a/odk/examples/DevelopersGuide/Forms/DataAwareness.java b/odk/examples/DevelopersGuide/Forms/DataAwareness.java index 9ac1f6e55ac4..0848f13d9079 100644 --- a/odk/examples/DevelopersGuide/Forms/DataAwareness.java +++ b/odk/examples/DevelopersGuide/Forms/DataAwareness.java @@ -37,8 +37,6 @@ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * *************************************************************************/ -package org.openoffice.sdk.forms; - import com.sun.star.beans.PropertyChangeEvent; import com.sun.star.beans.XPropertyChangeListener; import com.sun.star.beans.XPropertySet; diff --git a/odk/examples/DevelopersGuide/Forms/DocumentBasedExample.java b/odk/examples/DevelopersGuide/Forms/DocumentBasedExample.java index a138f8a57070..73a935f7d4f6 100644 --- a/odk/examples/DevelopersGuide/Forms/DocumentBasedExample.java +++ b/odk/examples/DevelopersGuide/Forms/DocumentBasedExample.java @@ -27,8 +27,6 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -package org.openoffice.sdk.forms; - import com.sun.star.bridge.XUnoUrlResolver; import com.sun.star.lang.XMultiComponentFactory; import com.sun.star.uno.UnoRuntime; diff --git a/odk/examples/DevelopersGuide/Forms/DocumentViewHelper.java b/odk/examples/DevelopersGuide/Forms/DocumentViewHelper.java index cf7739cb3263..58c2ada73933 100644 --- a/odk/examples/DevelopersGuide/Forms/DocumentViewHelper.java +++ b/odk/examples/DevelopersGuide/Forms/DocumentViewHelper.java @@ -27,8 +27,6 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -package org.openoffice.sdk.forms; - import com.sun.star.awt.XControl; import com.sun.star.awt.XControlModel; import com.sun.star.awt.XWindow; diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/Makefile b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/Makefile index 7a0f16e6a687..8b5c2a9ed67f 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/Makefile +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/Makefile @@ -69,16 +69,13 @@ $(OUT_SHL_SLO)/%.$(OBJ_EXT) : %.c -$(MKDIR) $(subst /,$(PS),$(@D)) $(CC) $(CC_FLAGS) $(CC_INCLUDES) $(SDK_JAVA_INCLUDES) $(CC_DEFINES) $(CC_OUTPUT_SWITCH)$(subst /,$(PS),$@) $< -$(OUT_SHL_MISC)/%.def : exports.dxp +$(SHAREDLIB_OUT)/$(SHAREDLIB_PRE)$(SHL_NAME).$(SHAREDLIB_EXT) : $(SLOFILES) $(SHL_NAME).def -$(MKDIR) $(subst /,$(PS),$(@D)) - @echo EXPORTS > $(OUT_SHL_MISC)/$(SHL_NAME).def - $(CAT) exports.dxp >> $(OUT_SHL_MISC)/$(SHL_NAME).def - -$(SHAREDLIB_OUT)/$(SHAREDLIB_PRE)$(SHL_NAME).$(SHAREDLIB_EXT) : $(SLOFILES) $(OUT_SHL_MISC)/$(SHL_NAME).def - -$(MKDIR) $(subst /,$(PS),$(@D)) - $(LINK) $(LIBRARY_LINK_FLAGS) /OUT:$@ /MAP:$(OUT_SHL_MISC)/$(SHL_NAME).map \ - /DEF:$(OUT_SHL_MISC)/$(SHL_NAME).def $(LINK_JAVA_LIBS) \ + -$(MKDIR) $(subst /,$(PS),$(OUT_SHL_MISC)) + $(LINK) $(LIBRARY_LINK_FLAGS) /DEF:$(SHL_NAME).def /OUT:$@ \ + /MAP:$(OUT_SHL_MISC)/$(SHL_NAME).map $(LINK_JAVA_LIBS) \ $(SLOFILES) jawt.lib msvcrt.lib kernel32.lib user32.lib + $(LINK_MANIFEST) .PHONY: clean clean : diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.def b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.def new file mode 100644 index 000000000000..f9ba2a78b6d1 --- /dev/null +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/nativelib/windows/nativeview.def @@ -0,0 +1,3 @@ +EXPORTS
+Java_NativeView_getNativeWindowSystemType
+Java_NativeView_getNativeWindow
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/Makefile b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/Makefile index 8883c4fe0de9..b292a3fac45b 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/Makefile +++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/Makefile @@ -92,7 +92,7 @@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \ /MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib - $(LINK_MANIFEST_VC8_ONLY) + $(LINK_MANIFEST) else $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE) -$(MKDIR) $(subst /,$(PS),$(@D)) diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/Makefile b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/Makefile index 4ab62f8997da..b362c0769774 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/Makefile +++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/Makefile @@ -89,7 +89,7 @@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \ /MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib - $(LINK_MANIFEST_VC8_ONLY) + $(LINK_MANIFEST) else $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE) -$(MKDIR) $(subst /,$(PS),$(@D)) diff --git a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connect.cxx b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connect.cxx index 009a2f382f1c..a887390de839 100644 --- a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connect.cxx +++ b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connect.cxx @@ -40,6 +40,8 @@ #include <stdio.h> +#include <sal/main.h> + #include <cppuhelper/bootstrap.hxx> #include <com/sun/star/bridge/XUnoUrlResolver.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -51,7 +53,7 @@ using namespace com::sun::star::bridge; using namespace rtl; using namespace cppu; -int main( ) +SAL_IMPLEMENT_MAIN() { // create the initial component context Reference< XComponentContext > rComponentContext = diff --git a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/string_samples.cxx b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/string_samples.cxx index 5fd930c0fb94..ef35e3be855d 100644 --- a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/string_samples.cxx +++ b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/string_samples.cxx @@ -40,6 +40,8 @@ #include <stdio.h> +#include <sal/main.h> + #include <rtl/ustrbuf.hxx> #include <rtl/string.hxx> @@ -47,7 +49,7 @@ using rtl::OUString; using rtl::OUStringBuffer; using rtl::OString; -int main( int argc, char * argv [] ) +SAL_IMPLEMENT_MAIN() { // string concatination diff --git a/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/SimpleBootstrap_cpp.cxx b/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/SimpleBootstrap_cpp.cxx index f7c3a78a8dab..a56178fb2b07 100644 --- a/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/SimpleBootstrap_cpp.cxx +++ b/odk/examples/DevelopersGuide/ProfUNO/SimpleBootstrap_cpp/SimpleBootstrap_cpp.cxx @@ -39,6 +39,8 @@ *************************************************************************/ #include <stdio.h> + +#include <sal/main.h> #include <cppuhelper/bootstrap.hxx> #include <com/sun/star/bridge/XUnoUrlResolver.hpp> #include <com/sun/star/frame/XComponentLoader.hpp> @@ -50,7 +52,7 @@ using namespace com::sun::star::lang; using namespace com::sun::star::frame; -int SAL_CALL main( int argc, char **argv ) +SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) { try { diff --git a/odk/examples/DevelopersGuide/examples.html b/odk/examples/DevelopersGuide/examples.html index ba74e68b08a4..edf21ce4e2ba 100644 --- a/odk/examples/DevelopersGuide/examples.html +++ b/odk/examples/DevelopersGuide/examples.html @@ -1,6 +1,6 @@ <html> <head> - <title>StarOffice 8 SDK - Developer's Guide Examples</title> + <title>[TITLE] - Developer's Guide Examples</title> <link rel="stylesheet" type="text/css" href="../../docs/sdk_styles.css"> <meta http-equiv="Content-Type" @@ -138,7 +138,7 @@ Presentation Documents</a></td> <td class="content3"><img src="../../docs/images/arrow-1.gif"></td> <td><a href="#BasicandDialogs" - title="link to the Basic And Dialogs examples">StarOffice 8 Basic and + title="link to the Basic And Dialogs examples">[PRODUCTNAME] Basic and Dialogs</a></td> </tr> <tr valign="top"> @@ -237,7 +237,7 @@ examples</a></td> href="./FirstSteps/FirstUnoContact.java" title="link to FirstSteps/FirstUnoContact.java">FirstUnoContact</a></td> <td class="cell80">Shows how to initialize UNO and -get a remote office service manager from a running StarOffice 8 in a +get a remote office service manager from a running [PRODUCTNAME] in a different process space.</td> </tr> <tr> @@ -246,7 +246,7 @@ different process space.</td> href="./FirstSteps/FirstLoadComponent.java" title="link to FirstSteps/FirstLoadComponent.java">FirstLoadComponent</a></td> <td class="cell80">Demonstrates how to load a -component into StarOffice 8 by a Java application.</td> +component into [PRODUCTNAME] by a Java application.</td> </tr> <tr> <td class="cell20"><img @@ -337,7 +337,7 @@ mechanism in C++.</td> href="./ProfUNO/InterprocessConn/ConnectionAwareClient.java" title="link to ProfUNO/InterprocessConn/ConnectionAwareClient/.java">ConnectionAwareClient</a></td> <td class="cell80">Implements a client which is aware -of losing connection to StarOffice 8.</td> +of losing connection to [PRODUCTNAME].</td> </tr> <tr> <td class="cell20"><img @@ -345,7 +345,7 @@ of losing connection to StarOffice 8.</td> href="./ProfUNO/InterprocessConn/UrlResolver.java" title="link to ProfUNO/InterProcessConn/UrlResolver.java">UrlResolver</a></td> <td class="cell80">Builds a connection to -StarOffice 8 using the URL given on the command line. This example +[PRODUCTNAME] using the URL given on the command line. This example shows the usage of <a href="../../docs/common/ref/com/sun/star/bridge/XUnoUrlResolver.html" title="link to the reference documentation of com.sun.star.bridge.XUnoResolver"><code>XUnoUrlResolver</code></a>.</td> @@ -368,7 +368,7 @@ shows the usage of <a href="./ProfUNO/CppBinding/office_connect.cxx" title="link to ProfUNO/CppBinding/office_connect.java">office_connect.cxx</a></td> <td class="cell80">Builds a connection to -StarOffice 8 using C++.</td> +[PRODUCTNAME] using C++.</td> </tr> <tr> <td class="cell20"><img @@ -729,7 +729,7 @@ for the image shrink component and instantiates it.</td> href="./Components/DialogComponent/DialogComponent.java" title="link to Components/DialogComponent/DialogComponent.java">DialogComponent.java</a></td> <td class="cell80">Implements a component accessing a dialog created - with the StarOffice 8 Basic IDE. The component provides methods that + with the [PRODUCTNAME] Basic IDE. The component provides methods that can be bound to dialog respectively control events .</td> </tr> <tr> @@ -946,7 +946,7 @@ document component.</td> <td class="cell80">This is the main part of a demo application based on the framework APIs. It mainly shows the mechanisms to load, store and convert documents, as well as dispatch and dispatch -interception. It integrates windows from StarOffice 8 via system +interception. It integrates windows from [PRODUCTNAME] via system window handle. This is the same mechanism as used by the OOoBean, but the OOoBean itself is not used here, just the JNI window handle access.</td> </tr> @@ -962,7 +962,7 @@ and it's actions.</td> href="./OfficeDev/DesktopEnvironment/FunctionHelper.java" title="link to OfficeDev/DesktopEnvironment/FunctionHelper.java">FunctionHelper</a></td> <td class="cell80">This helper comprises all -StarOffice 8 API calls. Thus it is possible to learn about these +[PRODUCTNAME] API calls. Thus it is possible to learn about these aspects separately from the rest of the application example.</td> </tr> <tr> @@ -977,7 +977,7 @@ asynchronous events from UNO oneway calls.</td> href="./OfficeDev/DesktopEnvironment/IShutdownListener.java" title="link to OfficeDev/DesktopEnvironment/IShutdownListener.java">IShutdownListener</a></td> <td class="cell80">This is a listener interface to -clean up on shutdown of StarOffice 8.</td> +clean up on shutdown of [PRODUCTNAME].</td> </tr> <tr> <td class="cell20"><a @@ -1008,7 +1008,7 @@ get the window handle of the Java window.</td> href="./OfficeDev/DesktopEnvironment/OfficeConnect.java" title=" link to OfficeDev/DesktopEnvironment/OfficeConnect.java">OfficeConnect</a></td> <td class="cell80">Builds the remote bridge to -StarOffice 8 and exports its UNO service manager for the Java side of +[PRODUCTNAME] and exports its UNO service manager for the Java side of the application.</td> </tr> <tr> @@ -1039,7 +1039,7 @@ the application is registered as an event listener.</td> href="./OfficeDev/DesktopEnvironment/ViewContainer.java" title="link to OfficeDev/DesktopEnvironment/ViewContainer.java">ViewContainer</a></td> <td class="cell80">Performs a clean up on the Java -side on StarOffice 8 shutdown.</td> +side on [PRODUCTNAME] shutdown.</td> </tr> </tbody> </table> @@ -1058,7 +1058,7 @@ side on StarOffice 8 shutdown.</td> href="./OfficeDev/OfficeConnect.java" title="link to OfficeDev/OfficeConnect.java">OfficeConnect</a></td> <td class="cell80">Builds the remote bridge to -StarOffice 8 and exports its UNO service manager to the Java side.</td> +[PRODUCTNAME] and exports its UNO service manager to the Java side.</td> </tr> <tr> <td class="cell20"><img @@ -1114,7 +1114,7 @@ TerminateListener and shows the use of them in a running program.</td> href="../../docs/common/ref/com/sun/star/frame/XTerminateListener.html" title="link to the reference documentation of com.sun.star.frame.XTerminationListener"> <code>XTerminateListener</code></a>. It is called -when StarOffice 8 terminates.</td> +when [PRODUCTNAME] terminates.</td> </tr> </tbody> </table> @@ -1180,7 +1180,7 @@ of formats.</td> href="./OfficeDev/Linguistic/LinguisticExamples.java" title="link to OfficeDev/Linguistic/LinguisticExamples.java">LinguisticExamples</a></td> <td class="cell80">A short example that uses most of -the functionality from the StarOffice 8 linguistic API.</td> +the functionality from the [PRODUCTNAME] linguistic API.</td> </tr> <tr> <td class="cell20"><a @@ -1661,7 +1661,7 @@ URLs.</td> <td class="cell20"><a href="./Drawing/Helper.java" title="link to Drawing/Helper.java">Helper</a></td> <td class="cell80">Contains a helper class for the -other examples to connect to StarOffice 8 and open or create a drawing +other examples to connect to [PRODUCTNAME] and open or create a drawing document.</td> </tr> <tr> @@ -1812,7 +1812,7 @@ is not implemented. To be more precise.</td> <td class="cell20"><a href="./Charts/Helper.java" title="link to Charts/Helper.java">Helper</a></td> <td class="cell80">Shows how to connect to -StarOffice 8 and create text, drawing or spreadsheet document. This +[PRODUCTNAME] and create text, drawing or spreadsheet document. This class is used as a helper class for the other examples.</td> </tr> <tr> @@ -1867,7 +1867,7 @@ changes.</td> <tbody> <tr> <td colspan="2" class="head1"><a - name="BasicandDialogs">StarOffice 8 Basic and Dialogs examples</a></td> + name="BasicandDialogs">[PRODUCTNAME] Basic and Dialogs examples</a></td> <td align="right"> <a href="#examples" title="link to the Developer's Guide examples overview"><img class="navigate" src="../../docs/images/nav_up.png"></a> <a @@ -1989,7 +1989,7 @@ the example. </td> href="./Database/CodeSamples.java" title="link to Database/CodeSamples.java">CodeSamples</a></td> <td class="cell80">Creates the connection to -StarOffice 8 and executes the code SalesMan samples for database API.</td> +[PRODUCTNAME] and executes the code SalesMan samples for database API.</td> </tr> <tr> <td class="cell20"><img @@ -2672,7 +2672,7 @@ Management examples</a></td> href="./Config/ConfigExamples.java" title="link to Config/ConfigExamples.java">ConfigExamples</a></td> <td class="cell80">This example connects to a -StarOffice 8, gets the configuration manager and accesses the +[PRODUCTNAME], gets the configuration manager and accesses the configuration in various ways.</td> </tr> </tbody> diff --git a/odk/examples/OLE/activex/Makefile b/odk/examples/OLE/activex/Makefile index 8887ab2f1b50..5cb0813d38e8 100644 --- a/odk/examples/OLE/activex/Makefile +++ b/odk/examples/OLE/activex/Makefile @@ -104,6 +104,7 @@ $(SHAREDLIB_OUT)/$(SHAREDLIB_PRE)%.$(SHAREDLIB_EXT) : $(SLOFILES) $(OUT_COMP_GEN /DEF:so_activex.def /IMPLIB:$(OUT_LIB)/iso_activex.lib $(SLOFILES) \ msvcrt.lib kernel32.lib user32.lib uuid.lib advapi32.lib ole32.lib oleaut32.lib gdi32.lib \ urlmon.lib Shlwapi.lib oldnames.lib $(CL_NEW_LIB) $(OUT_COMP_GEN)/so_activex.res + $(LINK_MANIFEST) ifeq "$(OS)" "WIN" OleActvieXComponentExample : $(COMPONENT_IMPL) diff --git a/odk/examples/OLE/activex/example.html b/odk/examples/OLE/activex/example.html index 3efee1f75a03..fd5876a6f212 100644 --- a/odk/examples/OLE/activex/example.html +++ b/odk/examples/OLE/activex/example.html @@ -11,9 +11,9 @@ First you should edit the example.html file!!! <!-- Please edit CODEBASE parameter --> <!-- In case ActiveX control is already registered the parameter can be removed --> <OBJECT CLASSID="clsid:67F2A879-82D5-4A6D-8CC5-FFB3C114B69D" width="500" height="500" - CODEBASE="..\..\..\WINexample.out\bin\so_activex.dll"> + CODEBASE="<path_to_the_sdk_sample_output_dir>\bin\so_activex.dll"> <!-- Full URL to a document - <PARAM NAME="src" VALUE="file:///d:/example.sxw"> + <PARAM NAME="src" VALUE="file:///d:/tmp/test.odt"> --> <!-- Just view the document, do not edit <PARAM NAME="readonly" VALUE="true"> diff --git a/odk/examples/OLE/activex/so_activex.def b/odk/examples/OLE/activex/so_activex.def index 88ba88d1ba51..68939efa1fe2 100644 --- a/odk/examples/OLE/activex/so_activex.def +++ b/odk/examples/OLE/activex/so_activex.def @@ -1,9 +1,5 @@ -; iervp.def : Declares the module parameters.
-
-LIBRARY "so_activex.dll"
-
EXPORTS
- DllCanUnloadNow @1 PRIVATE
- DllGetClassObject @2 PRIVATE
- DllRegisterServer @3 PRIVATE
- DllUnregisterServer @4 PRIVATE
+ DllCanUnloadNow PRIVATE
+ DllGetClassObject PRIVATE
+ DllRegisterServer PRIVATE
+ DllUnregisterServer PRIVATE
diff --git a/odk/examples/basic/stock_quotes_updater/stock.ods b/odk/examples/basic/stock_quotes_updater/stock.ods Binary files differindex f4ef36dd3e6c..5b530b5cd9b0 100644 --- a/odk/examples/basic/stock_quotes_updater/stock.ods +++ b/odk/examples/basic/stock_quotes_updater/stock.ods diff --git a/odk/examples/cpp/DocumentLoader/DocumentLoader.cxx b/odk/examples/cpp/DocumentLoader/DocumentLoader.cxx index 2ffa36153c9d..c1e752c31101 100644 --- a/odk/examples/cpp/DocumentLoader/DocumentLoader.cxx +++ b/odk/examples/cpp/DocumentLoader/DocumentLoader.cxx @@ -48,6 +48,8 @@ #include <stdio.h> #include <wchar.h> +#include <sal/main.h> + #include <cppuhelper/bootstrap.hxx> #include <osl/file.hxx> @@ -70,8 +72,9 @@ using namespace com::sun::star::frame; using namespace com::sun::star::registry; + //============================================================================ -int SAL_CALL main( int argc, char **argv ) +SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) { OUString sConnectionString(RTL_CONSTASCII_USTRINGPARAM("uno:socket,host=localhost,port=2083;urp;StarOffice.ServiceManager")); if (argc < 2) diff --git a/odk/examples/cpp/complextoolbarcontrols/Makefile b/odk/examples/cpp/complextoolbarcontrols/Makefile index e2eda4a5f532..400a18a089cf 100644 --- a/odk/examples/cpp/complextoolbarcontrols/Makefile +++ b/odk/examples/cpp/complextoolbarcontrols/Makefile @@ -99,7 +99,7 @@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \ /MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib - $(LINK_MANIFEST_VC8_ONLY) + $(LINK_MANIFEST) else $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE) -$(MKDIR) $(subst /,$(PS),$(@D)) diff --git a/odk/examples/cpp/counter/Makefile b/odk/examples/cpp/counter/Makefile index 997fb2a401e7..19372c226023 100644 --- a/odk/examples/cpp/counter/Makefile +++ b/odk/examples/cpp/counter/Makefile @@ -122,7 +122,7 @@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \ /MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib - $(LINK_MANIFEST_VC8_ONLY) + $(LINK_MANIFEST) else $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE) -$(MKDIR) $(subst /,$(PS),$(@D)) diff --git a/odk/examples/cpp/counter/countermain.cxx b/odk/examples/cpp/counter/countermain.cxx index 5328f356124e..ce3b277e3044 100644 --- a/odk/examples/cpp/counter/countermain.cxx +++ b/odk/examples/cpp/counter/countermain.cxx @@ -48,6 +48,7 @@ #include <stdio.h> +#include <sal/main.h> #include <rtl/ustring.hxx> #include <osl/diagnose.h> @@ -71,7 +72,7 @@ using namespace ::rtl; //======================================================================= -int SAL_CALL main(int argc, char **argv) +SAL_IMPLEMENT_MAIN() { Reference< XSimpleRegistry > xReg = createSimpleRegistry(); OSL_ENSURE( xReg.is(), "### cannot get service instance of \"com.sun.star.regiystry.SimpleRegistry\"!" ); diff --git a/odk/examples/cpp/remoteclient/Makefile b/odk/examples/cpp/remoteclient/Makefile index 4486a5ac9f0a..e19d9c1c59a9 100644 --- a/odk/examples/cpp/remoteclient/Makefile +++ b/odk/examples/cpp/remoteclient/Makefile @@ -97,7 +97,7 @@ $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(LINK) $(COMP_LINK_FLAGS) /OUT:$@ \ /MAP:$(OUT_COMP_GEN)/$(subst $(SHAREDLIB_EXT),map,$(@F)) $(SLOFILES) \ $(CPPUHELPERLIB) $(CPPULIB) $(SALLIB) $(STLPORTLIB) msvcrt.lib kernel32.lib - $(LINK_MANIFEST_VC8_ONLY) + $(LINK_MANIFEST) else $(SHAREDLIB_OUT)/%.$(SHAREDLIB_EXT) : $(SLOFILES) $(COMP_MAPFILE) -$(MKDIR) $(subst /,$(PS),$(@D)) diff --git a/odk/examples/examples.html b/odk/examples/examples.html index 98afc9b11994..03ca9f1c9d8d 100644 --- a/odk/examples/examples.html +++ b/odk/examples/examples.html @@ -342,35 +342,6 @@ </table> </td> </tr> - <tr> - <td> - <table class="table4"> - <tbody> - <tr class="thead"> - <td class="cell20">Other Examples</td> - <td class="cell80">Description</td> - </tr> - <tr> - <td class="cell20"><a href="java/ConverterServlet/" title="link to the source directory of the Java ConverterServlet examle">ConverterServlet</a></td> - <td class="cell80">This servlet shows how to convert arbitrary documents - on a remotely running office server. The converted document will be - pushed from the web server to the client browser. Please see the <a href="java/ConverterServlet/README" title="link to the README file of the Java ConverterServlet example">README</a> file for further information.</td> - </tr> - <tr> - <td class="cell20"><a href="java/NotesAccess/" title="link to the source directory of the Java NotesAccess example">NotesAccess</a></td> - <td class="cell80">This class creates a spreadsheet document and fills it - with existing values of documents from a Lotus Notes database. For this - examples some external APIs from Lotus Notes/Domino are necessary. You - can download a trial version from <a href="http:///www.lotus.com/downloads">http:///www.lotus.com/downloads</a>. After installing please add the install path - to the PATH or LD_LIBRARY_PATH of your SDK environment and either copy - the "Notes.jar" into your <OFFICE_CLASSES_DIR> directory - or adapt the SDK_CLASSPATH variable in the example Makefile to use the - "Notes.jar" of your installation.</td> - </tr> - <tbody> - </table> - </td> - </tr> <tr> <td> <table class="table3"> @@ -450,6 +421,11 @@ the servers process and retrieves an instance and does some calls on the instance.</td> </tr> + <tr> + <td class="cell20"><a href="cpp/complextoolbarcontrols/" title="link to the source directory of the C++ complextoolbarcontrols example">complextoolbarcontrols</a></td> + <td class="cell80">This example shows how to create a toolbar add-on with complex toolbar controls. + It shows how to use an Image Button, a Combo Box, a Spin Field, an Edit Field, a Dropdown Box, a Toggle Dropdown Button and a normal Dropdown Button</td> + </tr> <tbody> </table> </td> diff --git a/odk/settings/settings.mk b/odk/settings/settings.mk index 7f6d408592f4..3f84612e48c3 100644 --- a/odk/settings/settings.mk +++ b/odk/settings/settings.mk @@ -38,6 +38,7 @@ ifeq "$(PLATFORM)" "windows" OS=WIN PS=\\ +ICL=$$ CC=cl LINK=link BUILDLIB=lib @@ -79,12 +80,12 @@ PATH_SEPARATOR=; # use this for release version CC_FLAGS=-c -MT -Zm500 -Zc:forScope,wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -Zc:forScope -GR -EHa -ifeq "$(CPP_VC8)" "true" +ifeq "$(CPP_MANIFEST)" "true" #CC_FLAGS+=-EHa -Zc:wchar_t- -LINK_MANIFEST_VC8_ONLY=mt -manifest $@.manifest "-outputresource:$@;2" +LINK_MANIFEST=mt -manifest $@.manifest "-outputresource:$@;2" else #CC_FLAGS+= -LINK_MANIFEST_VC8_ONLY= +LINK_MANIFEST= endif ifeq "$(DEBUG)" "yes" CC_FLAGS+=-Zi @@ -97,7 +98,7 @@ SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/inclu # define for used compiler necessary for UNO # -DCPPU_ENV=msci -- windows msvc 4.x - 7.x -CC_DEFINES=-DWIN32 -DWNT -DCPPU_ENV=msci +CC_DEFINES=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci CC_OUTPUT_SWITCH=-Fo LIBRARY_LINK_FLAGS=/NODEFAULTLIB /DLL /DEBUGTYPE:cv @@ -152,6 +153,7 @@ endif OS=SOLARIS PS=/ +ICL=\$$ CC=CC LINK=CC LIB=CC @@ -280,6 +282,7 @@ endif OS=LINUX PS=/ +ICL=\$$ CC=gcc LINK=g++ LIB=g++ @@ -395,11 +398,17 @@ JAVA_PROC_TYPE=ppc endif JAVABIN=Commands +GCC_VERSION =$(shell gcc -dumpversion| cut -d"." -f1,2) +ifeq "$(GCC_VERSION)" "4.2" +GCC_ARCH_OPTION=-arch i386 +endif + OS=MACOSX PS=/ -CC=gcc -LINK=g++ -LIB=g++ +ICL=\$$ +CC=gcc-$(GCC_VERSION) +LINK=g++-$(GCC_VERSION) +LIB=g++-$(GCC_VERSION) ECHO=@echo MKDIR=mkdir -p CAT=cat @@ -408,8 +417,6 @@ SHAREDLIB_EXT=dylib SHAREDLIB_PRE=lib SHAREDLIB_OUT=$(OUT_LIB) -GCC_VERSION=$(shell $(CC) -dumpversion) - COMID=gcc3 CPPU_ENV=gcc3 @@ -452,9 +459,9 @@ PATH_SEPARATOR=: # -O is necessary for inlining (see gcc documentation) ifeq "$(DEBUG)" "yes" -CC_FLAGS=-malign-natural -c -g -fPIC -fno-common +CC_FLAGS=-malign-natural -c -g -fPIC -fno-common $(GCC_ARCH_OPTION) else -CC_FLAGS=-malign-natural -c -O -fPIC -fno-common +CC_FLAGS=-malign-natural -c -O -fPIC -fno-common $(GCC_ARCH_OPTION) endif SDK_JAVA_INCLUDES = -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -I/System/Library/Frameworks/JavaVM.framework/Headers @@ -464,13 +471,13 @@ CC_DEFINES=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_ CC_OUTPUT_SWITCH=-o -LIBRARY_LINK_FLAGS=-dynamiclib -single_module -Wl,-multiply_defined,suppress +LIBRARY_LINK_FLAGS=-dynamiclib -single_module -Wl,-multiply_defined,suppress $(GCC_ARCH_OPTION) #-fPIC -fno-common # install_name '@executable_path$/(@:f)' COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,-exported_symbols_list $(COMP_MAPFILE) -#EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs +EXE_LINK_FLAGS=$(GCC_ARCH_OPTION) -Wl,-multiply_defined,suppress LINK_LIBS=-L$(OUT)/lib -L$(OO_SDK_OUT)/$(PLATFORM)/lib -L"$(OO_SDK_URE_LIB_DIR)" LINK_JAVA_LIBS=-framework JavaVM #LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/Libraries" @@ -499,6 +506,7 @@ JAVA_PROC_TYPE=i386 OS=FREEBSD PS=/ +ICL=\$$ CC=gcc LINK=g++ LIB=g++ diff --git a/odk/util/makefile.mk b/odk/util/makefile.mk index a2e62ad17891..ed836730a165 100644 --- a/odk/util/makefile.mk +++ b/odk/util/makefile.mk @@ -11,7 +11,7 @@ TARGET=odk ZIP1TARGET=odkexamples ZIP1FLAGS=-u -r ZIP1DIR=$(PRJ) -ZIP1LIST=examples -x "*.svn*" -x "*CVS*" -x "*makefile.mk" -x "*Inspector*" -x "*Container1*" -x "*Storage*" -x "*register_component*" -x "*examples.html" +ZIP1LIST=examples -x "*.svn*" -x "*CVS*" -x "*makefile.mk" -x "*Inspector*" -x "*Container1*" -x "*Storage*" -x "*register_component*" -x "*examples.html" -x "*ConverterServlet*" -x "*NotesAccess*" -x "*delphi*" .ENDIF |