diff options
45 files changed, 245 insertions, 450 deletions
diff --git a/mysqlc/images/sun_extension.png b/mysqlc/images/sun_extension.png Binary files differindex 31f48ea8fb69..a018f1710ea5 100644 --- a/mysqlc/images/sun_extension.png +++ b/mysqlc/images/sun_extension.png diff --git a/mysqlc/images/sun_extension_hc.png b/mysqlc/images/sun_extension_hc.png Binary files differindex 3870cc4709d4..418cd1479298 100644 --- a/mysqlc/images/sun_extension_hc.png +++ b/mysqlc/images/sun_extension_hc.png diff --git a/mysqlc/source/description.xml b/mysqlc/source/description.xml index e5a17a11851a..dbd64aa1a7e1 100644 --- a/mysqlc/source/description.xml +++ b/mysqlc/source/description.xml @@ -6,7 +6,7 @@ <version value="#VERSION#" /> <platform value="UPDATED_SUPPORTED_PLATFORM" /> <registration> - <simple-license accept-by="admin" default-license-id="lic-en-US" > + <simple-license accept-by="admin" default-license-id="lic-en-US" suppress-if-required="true" > <license-text xlink:href="licensefile" lang="isocode" license-id="lic-isocode"/> </simple-license> </registration> @@ -17,7 +17,7 @@ <OpenOffice.org-minimal-version value="3.1" d:name="OpenOffice.org 3.1"/> </dependencies> <publisher> - <name xlink:href="http://www.sun.com/software/star/staroffice/extensions.jsp?cid=925095" lang="en">Sun Microsystems</name> + <name xlink:href="http://www.sun.com/software/star/staroffice/extensions.jsp?cid=925095" lang="en">Oracle</name> </publisher> <icon> <default xlink:href="images/sun_extension.png" /> diff --git a/mysqlc/source/description/description_en-US.txt b/mysqlc/source/description/description_en-US.txt index e149658af7de..bb3cf174a772 100644 --- a/mysqlc/source/description/description_en-US.txt +++ b/mysqlc/source/description/description_en-US.txt @@ -1 +1 @@ -Connects OpenOffice.org directly with MySQL Servers +The MySQL Connector for Oracle Open Office (formerly StarOffice) and OpenOffice.org installs a native MySQL database driver. It is faster, seamless integrated, easier to administrate and there is no need to install and setup a JDBC or ODBC driver separately. It was never easier to use MySQL databases in OpenOffice.org Base. diff --git a/mysqlc/source/makefile.mk b/mysqlc/source/makefile.mk index ff1c8c83f7c4..bfe46afe05e0 100644 --- a/mysqlc/source/makefile.mk +++ b/mysqlc/source/makefile.mk @@ -56,10 +56,10 @@ EXTENSION_VERSION_BASE=$(MYSQLC_VERSION_MAJOR).$(MYSQLC_VERSION_MINOR).$(MYSQLC_ #---- extension title package name .IF "$(MYSQLC_STATUS)" == "final" EXTENSION_TITLE:=$(MYSQLC_TITLE) - EXTENSION_ZIPNAME:=$(EXTENSIONNAME)-$(EXTENSION_VERSION_BASE)-$(RTL_OS:l)-$(RTL_ARCH:l) + EXTENSION_ZIPNAME:=$(EXTENSIONNAME) .ELSE EXTENSION_TITLE:=$(MYSQLC_TITLE) ($(MYSQLC_STATUS)) - EXTENSION_ZIPNAME:=$(EXTENSIONNAME)-$(EXTENSION_VERSION_BASE)-$(MYSQLC_STATUS:s/ /-/:l)-$(RTL_OS:l)-$(RTL_ARCH:l) + EXTENSION_ZIPNAME:=$(EXTENSIONNAME) .ENDIF #------------------------------------------------------------------- diff --git a/mysqlc/version.mk b/mysqlc/version.mk index 81a2cfd23da8..e9bc6495288f 100644 --- a/mysqlc/version.mk +++ b/mysqlc/version.mk @@ -30,7 +30,7 @@ MYSQLC_VERSION_MINOR=0 MYSQLC_VERSION_MICRO=1 # the title, as displayed in the Extension Manager -MYSQLC_TITLE=MySQL Connector for OpenOffice.org +MYSQLC_TITLE=MySQL Connector # the status of the extension # if this is different from "final", it will be appended to the title displayed in the Extension Manager diff --git a/reportbuilder/images/em42.png b/reportbuilder/images/em42.png Binary files differdeleted file mode 100644 index 31f48ea8fb69..000000000000 --- a/reportbuilder/images/em42.png +++ /dev/null diff --git a/reportbuilder/images/em42_hc.png b/reportbuilder/images/em42_hc.png Binary files differdeleted file mode 100644 index 3870cc4709d4..000000000000 --- a/reportbuilder/images/em42_hc.png +++ /dev/null diff --git a/reportbuilder/images/em47.png b/reportbuilder/images/em47.png Binary files differnew file mode 100644 index 000000000000..a018f1710ea5 --- /dev/null +++ b/reportbuilder/images/em47.png diff --git a/reportbuilder/images/em47_hc.png b/reportbuilder/images/em47_hc.png Binary files differnew file mode 100644 index 000000000000..418cd1479298 --- /dev/null +++ b/reportbuilder/images/em47_hc.png diff --git a/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java b/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java index 79d37c6fcd45..de632a3671f9 100644 --- a/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java +++ b/reportbuilder/java/com/sun/star/report/SDBCReportDataFactory.java @@ -207,7 +207,7 @@ public class SDBCReportDataFactory implements DataSourceFactory final Boolean escapeProcessing = (Boolean) parameters.get(ESCAPE_PROCESSING); final String filter = (String) parameters.get(UNO_FILTER); final Integer maxRows = (Integer) parameters.get("MaxRows"); - RowSetProperties rowSetProps = new RowSetProperties(escapeProcessing, commandType, command, filter, maxRows); + final RowSetProperties rowSetProps = new RowSetProperties(escapeProcessing, commandType, command, filter, maxRows); final Object[] p = createRowSet(rowSetProps, parameters); final XRowSet rowSet = (XRowSet) p[0]; @@ -251,33 +251,35 @@ public class SDBCReportDataFactory implements DataSourceFactory final String quote = connection.getMetaData().getIdentifierQuoteString(); final XComponent[] hold = new XComponent[1]; final XNameAccess columns = getFieldsByCommandDescriptor(commandType, command, hold); - - for (int i = 0; i < count; i++) + if (columns != null) { - final Object[] pair = (Object[]) groupExpressions.get(i); - String expression = (String) pair[0]; - - if (columns.hasByName(expression)) + for (int i = 0; i < count; i++) { - expression = quote + expression + quote; - } - expression = expression.trim(); // Trim away white spaces + final Object[] pair = (Object[]) groupExpressions.get(i); + String expression = (String) pair[0]; - if (expression.length() > 0) - { - order.append(expression); - if (order.length() > 0) + if (!expression.startsWith(quote) && columns.hasByName(expression)) { - order.append(' '); + expression = quote + expression + quote; } - final String sorting = (String) pair[1]; - if (sorting == null || sorting.equals(OfficeToken.FALSE)) - { - order.append("DESC"); - } - if ((i + 1) < count) + expression = expression.trim(); // Trim away white spaces + + if (expression.length() > 0) { - order.append(", "); + order.append(expression); + if (order.length() > 0) + { + order.append(' '); + } + final String sorting = (String) pair[1]; + if (sorting == null || sorting.equals(OfficeToken.FALSE)) + { + order.append("DESC"); + } + if ((i + 1) < count) + { + order.append(", "); + } } } } @@ -293,7 +295,7 @@ public class SDBCReportDataFactory implements DataSourceFactory private XNameAccess getFieldsByCommandDescriptor(final int commandType, final String command, final XComponent[] out) throws SQLException { final Class[] parameter = new Class[3]; - parameter[0] = Integer.class; + parameter[0] = int.class; parameter[1] = String.class; parameter[2] = out.getClass(); final XConnectionTools tools = (XConnectionTools) UnoRuntime.queryInterface(XConnectionTools.class, connection); @@ -306,171 +308,7 @@ public class SDBCReportDataFactory implements DataSourceFactory { } - XNameAccess xFields = null; - // some kind of state machine to ease the sharing of code - int eState = FAILED; - switch (commandType) - { - case CommandType.TABLE: - eState = HANDLE_TABLE; - break; - case CommandType.QUERY: - eState = HANDLE_QUERY; - break; - case CommandType.COMMAND: - eState = HANDLE_SQL; - break; - } - - // needed in various states: - XNameAccess xObjectCollection = null; - XColumnsSupplier xSupplyColumns = null; - - try - { - // go! - while ((DONE != eState) && (FAILED != eState)) - { - switch (eState) - { - case HANDLE_TABLE: - { - // initial state for handling the tables - - // get the table objects - final XTablesSupplier xSupplyTables = (XTablesSupplier) UnoRuntime.queryInterface(XTablesSupplier.class, connection); - if (xSupplyTables != null) - { - xObjectCollection = xSupplyTables.getTables(); - // if something went wrong 'til here, then this will be handled in the next state - - // next state: get the object - } - eState = RETRIEVE_OBJECT; - } - break; - - case HANDLE_QUERY: - { - // initial state for handling the tables - - // get the table objects - final XQueriesSupplier xSupplyQueries = (XQueriesSupplier) UnoRuntime.queryInterface(XQueriesSupplier.class, connection); - if (xSupplyQueries != null) - { - xObjectCollection = xSupplyQueries.getQueries(); - // if something went wrong 'til here, then this will be handled in the next state - - // next state: get the object - } - eState = RETRIEVE_OBJECT; - } - break; - - case RETRIEVE_OBJECT: - // here we should have an object (aka query or table) collection, and are going - // to retrieve the desired object - - // next state: default to FAILED - eState = FAILED; - - if (xObjectCollection != null && xObjectCollection.hasByName(command)) - { - xSupplyColumns = (XColumnsSupplier) UnoRuntime.queryInterface(XColumnsSupplier.class, xObjectCollection.getByName(command)); - - // next: go for the columns - eState = RETRIEVE_COLUMNS; - } - break; - - case RETRIEVE_COLUMNS: - // next state: default to FAILED - eState = FAILED; - - if (xSupplyColumns != null) - { - xFields = xSupplyColumns.getColumns(); - // that's it - eState = DONE; - } - break; - - case HANDLE_SQL: - { - String sStatementToExecute = command; - - // well, the main problem here is to handle statements which contain a parameter - // If we would simply execute a parametrized statement, then this will fail because - // we cannot supply any parameter values. - // Thus, we try to analyze the statement, and to append a WHERE 0=1 filter criterion - // This should cause every driver to not really execute the statement, but to return - // an empty result set with the proper structure. We then can use this result set - // to retrieve the columns. - - try - { - final XMultiServiceFactory xComposerFac = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, connection); - - if (xComposerFac != null) - { - final XSingleSelectQueryComposer xComposer = (XSingleSelectQueryComposer) UnoRuntime.queryInterface(XSingleSelectQueryComposer.class, xComposerFac.createInstance("com.sun.star.sdb.SingleSelectQueryComposer")); - if (xComposer != null) - { - xComposer.setQuery(sStatementToExecute); - - // Now set the filter to a dummy restriction which will result in an empty - // result set. - xComposer.setFilter("0=1"); - - sStatementToExecute = xComposer.getQuery(); - } - } - } - catch (com.sun.star.uno.Exception ex) - { - // silent this error, this was just a try. If we're here, we did not change sStatementToExecute, - // so it will still be _rCommand, which then will be executed without being touched - } - - // now execute - final XPreparedStatement xStatement = connection.prepareStatement(sStatementToExecute); - // transfer ownership of this temporary object to the caller - out[0] = (XComponent) UnoRuntime.queryInterface(XComponent.class, xStatement); - - // set the "MaxRows" to 0. This is just in case our attempt to append a 0=1 filter - // failed - in this case, the MaxRows restriction should at least ensure that there - // is no data returned (which would be potentially expensive) - final XPropertySet xStatementProps = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, xStatement); - try - { - if (xStatementProps != null) - { - xStatementProps.setPropertyValue("MaxRows", Integer.valueOf(0)); - } - } - catch (com.sun.star.uno.Exception ex) - { - // oh damn. Not much of a chance to recover, we will no retrieve the complete - // full blown result set - } - - xSupplyColumns = (XColumnsSupplier) UnoRuntime.queryInterface(XColumnsSupplier.class, xStatement.executeQuery()); - // this should have given us a result set which does not contain any data, but - // the structural information we need - - // so the next state is to get the columns - eState = RETRIEVE_COLUMNS; - } - break; - default: - eState = FAILED; - } - } - } - catch (com.sun.star.uno.Exception ex) - { - } - return xFields; + throw new SQLException(); } private XSingleSelectQueryComposer getComposer(final XConnectionTools tools, @@ -501,61 +339,7 @@ public class SDBCReportDataFactory implements DataSourceFactory // should not happen // assert False } - try - { - final XMultiServiceFactory factory = (XMultiServiceFactory) UnoRuntime.queryInterface(XMultiServiceFactory.class, connection); - final XSingleSelectQueryComposer out = (XSingleSelectQueryComposer) UnoRuntime.queryInterface(XSingleSelectQueryComposer.class, factory.createInstance("com.sun.star.sdb.SingleSelectQueryAnalyzer")); - final String quote = connection.getMetaData().getIdentifierQuoteString(); - String statement = command; - switch (commandType) - { - case CommandType.TABLE: - statement = "SELECT * FROM " + quote + command + quote; - break; - case CommandType.QUERY: - { - final XQueriesSupplier xSupplyQueries = (XQueriesSupplier) UnoRuntime.queryInterface(XQueriesSupplier.class, connection); - final XNameAccess queries = xSupplyQueries.getQueries(); - if (queries.hasByName(command)) - { - final XPropertySet prop = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, queries.getByName(command)); - final Boolean escape = (Boolean) prop.getPropertyValue(ESCAPEPROCESSING); - if (escape) - { - statement = (String) prop.getPropertyValue(UNO_COMMAND); - final XSingleSelectQueryComposer composer = getComposer(tools, statement, CommandType.COMMAND); - if (composer != null) - { - final String order = (String) prop.getPropertyValue(UNO_ORDER); - if (order != null && order.length() != 0) - { - composer.setOrder(order); - } - final Boolean applyFilter = (Boolean) prop.getPropertyValue(UNO_APPLY_FILTER); - if (applyFilter) - { - final String filter = (String) prop.getPropertyValue(UNO_FILTER); - if (filter != null && filter.length() != 0) - { - composer.setFilter(filter); - } - } - statement = composer.getQuery(); - } - } - } - break; - } - case CommandType.COMMAND: - statement = command; - break; - } - out.setElementaryQuery(statement); - return out; - } - catch (Exception e) - { - } + return null; } diff --git a/reportbuilder/java/com/sun/star/report/pentaho/PentahoReportJob.java b/reportbuilder/java/com/sun/star/report/pentaho/PentahoReportJob.java index 032ccb67d965..907bbd230dfd 100644 --- a/reportbuilder/java/com/sun/star/report/pentaho/PentahoReportJob.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/PentahoReportJob.java @@ -254,6 +254,11 @@ public class PentahoReportJob implements ReportJob if (parameters.length > 0) { String name = parameters[0].toString(); + if (parameters[0] instanceof ContextLookup) + { + final ContextLookup context = (ContextLookup) parameters[0]; + name = context.getName(); + } for (int j = 0; j < reportFunctions.length; j++) { if (reportFunctions[j] instanceof FormulaExpression) @@ -367,7 +372,7 @@ public class PentahoReportJob implements ReportJob catch (final Exception e) { String message = e.getMessage(); - if (message.length() == 0) + if (message == null || message.length() == 0) { message = "Failed to process the report"; } diff --git a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java index d5f3d7386114..8be077b4375b 100755 --- a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/FormatValueUtility.java @@ -54,7 +54,7 @@ public class FormatValueUtility private static final String BOOLEAN_VALUE = "boolean-value"; private static final String STRING_VALUE = "string-value"; public static final String VALUE_TYPE = "value-type"; - private static final String VALUE = "value"; + public static final String VALUE = "value"; private static SimpleDateFormat dateFormat; private static SimpleDateFormat timeFormat; diff --git a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java index de718e8fc700..681b8d8e4f0c 100644 --- a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java @@ -77,6 +77,10 @@ public class TableCellLayoutController extends SectionLayoutController { FormatValueUtility.applyValueForCell(value.getValue(), attributeMap, valueType); } + else if ( "float".equals(valueType)) + { + attributeMap.setAttribute(OfficeNamespaces.OFFICE_NS, FormatValueUtility.VALUE, "1.#NAN"); + } } catch (Exception e) { diff --git a/reportbuilder/util/component.txt b/reportbuilder/util/component.txt index 17f312c8ea72..3b6ba3156efc 100644 --- a/reportbuilder/util/component.txt +++ b/reportbuilder/util/component.txt @@ -1 +1 @@ -Create with the Sun Report Builder stylish, smart-looking database reports. The flexible report editor can define group and page headers as well as group and page footers and even calculation fields are available to accomplish complex database reports. +Create with the Oracle Report Builder stylish, smart-looking database reports. The flexible report editor can define group and page headers as well as group and page footers and even calculation fields are available to accomplish complex database reports. diff --git a/reportbuilder/util/description.xml b/reportbuilder/util/description.xml index c254d5bd1a73..82ae8544b48b 100644 --- a/reportbuilder/util/description.xml +++ b/reportbuilder/util/description.xml @@ -3,11 +3,11 @@ xmlns:d="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink"> <display-name> - <name lang="en-US">Sun Report Builder</name> + <name lang="en-US">Oracle Report Builder</name> <!-- <name lang="en-US">Sun(TM) Report Builder</name> --> </display-name> <registration> - <simple-license accept-by="admin" default-license-id="lic-en-US" > + <simple-license accept-by="admin" default-license-id="lic-en-US" suppress-if-required="true" > <license-text xlink:href="licensefile" lang="isocode" license-id="lic-isocode"/> </simple-license> </registration> @@ -17,11 +17,14 @@ <OpenOffice.org-minimal-version value="3.2" d:name="OpenOffice.org 3.2"/> </dependencies> <publisher> - <name xlink:href="http://www.sun.com/software/star/staroffice/extensions.jsp?cid=925095" lang="en">Sun Microsystems, Inc.</name> + <name xlink:href="http://www.sun.com/software/star/staroffice/extensions.jsp?cid=925095" lang="en">Oracle</name> </publisher> <icon> - <default xlink:href="images/em42.png" /> - <high-contrast xlink:href="images/em42_hc.png" /> + <default xlink:href="images/em47.png" /> + <high-contrast xlink:href="images/em47_hc.png" /> </icon> + <extension-description> + <src xlink:href="help/component.txt" lang="en" /> + </extension-description> </description> diff --git a/reportbuilder/util/makefile.mk b/reportbuilder/util/makefile.mk index f36b1f50406c..7ff8f64e7938 100644 --- a/reportbuilder/util/makefile.mk +++ b/reportbuilder/util/makefile.mk @@ -28,7 +28,7 @@ PRJ=.. PRJNAME=reportbuilder TARGET=rpt -EXTENSION_VERSION_BASE=1.2.0 +EXTENSION_VERSION_BASE=1.2.1 .IF "$(CWS_WORK_STAMP)" == "" EXTENSION_VERSION=$(EXTENSION_VERSION_BASE) @@ -41,8 +41,8 @@ EXTENSION_VERSION_BASE=1.2.0 .IF "$(L10N_framework)"=="" # ------------------------------------------------------------------ # calready set in util$/makefile.pmk -# EXTENSIONNAME:=sun-report-builder -EXTENSION_ZIPNAME:=sun-report-builder +# EXTENSIONNAME:=oracle-report-builder +EXTENSION_ZIPNAME:=oracle-report-builder # create Extension ----------------------------- @@ -76,8 +76,8 @@ COMPONENT_OTR_FILES= \ $(EXTENSIONDIR)$/template$/en-US$/wizard$/report$/default.otr COMPONENT_IMAGES= \ - $(EXTENSIONDIR)$/images$/em42.png \ - $(EXTENSIONDIR)$/images$/em42_hc.png + $(EXTENSIONDIR)$/images$/em47.png \ + $(EXTENSIONDIR)$/images$/em47_hc.png COMPONENT_HTMLFILES = $(EXTENSIONDIR)$/THIRDPARTYREADMELICENSE.html \ $(EXTENSIONDIR)$/readme_en-US.html \ diff --git a/reportbuilder/util/manifest.xml b/reportbuilder/util/manifest.xml index 8ea30b6ad08e..1a5a0f84623b 100644 --- a/reportbuilder/util/manifest.xml +++ b/reportbuilder/util/manifest.xml @@ -3,5 +3,3 @@ <manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest"> <manifest:file-entry manifest:media-type="application/vnd.sun.star.uno-component;type=Java" manifest:full-path="sun-report-builder.jar"/> - <manifest:file-entry manifest:media-type="application/vnd.sun.star.package-bundle-description" - manifest:full-path="help/component.txt"/> diff --git a/sdext/prj/build.lst b/sdext/prj/build.lst index 8ced1e83edad..b274920a5281 100644 --- a/sdext/prj/build.lst +++ b/sdext/prj/build.lst @@ -1,9 +1,8 @@ dx sdext : l10n offuh comphelper unotools readlicense_oo cppu tools cppuhelper sal javaunohelper officecfg vcl XPDF:xpdf LIBXSLT:libxslt NULL dx sdext usr1 - all sdext_mkout NULL dx sdext\prj get - all sdext_prj NULL -dx sdext\source\minimizer nmake - all sdext_minimizer sdext_minimizer_rdoooe sdext_minimizer_rdooo sdext_minimizer_rdooou sdext_inc NULL +dx sdext\source\minimizer nmake - all sdext_minimizer sdext_minimizer_rdoooe sdext_minimizer_rdooo sdext_inc NULL dx sdext\source\minimizer\registry\data\org\openoffice\Office\extension nmake - all sdext_minimizer_rdoooe NULL -dx sdext\source\minimizer\registry\data\org\openoffice\Office\UI nmake - all sdext_minimizer_rdooou NULL dx sdext\source\minimizer\registry\data\org\openoffice\Office nmake - all sdext_minimizer_rdooo NULL dx sdext\source\presenter\registry\data\org\openoffice\Office\extension nmake - all sdext_presenter_xcu NULL dx sdext\source\presenter\help\en-US\com.sun.PresenterScreen nmake - all sdext_presenter_help NULL diff --git a/sdext/prj/d.lst b/sdext/prj/d.lst index 802a8b348c35..71a91653c3d2 100644 --- a/sdext/prj/d.lst +++ b/sdext/prj/d.lst @@ -4,5 +4,5 @@ mkdir: %_DEST%\bin%_EXT%\pdfimport ..\%__SRC%\bin\pdf2xml.* %_DEST%\bin%_EXT%\pdf2xml.* ..\%__SRC%\bin\pdfunzip.* %_DEST%\bin%_EXT%\pdfunzip.* ..\%__SRC%\bin\pdfimport.oxt %_DEST%\bin%_EXT%\pdfimport\pdfimport.oxt -..\%__SRC%\bin\sun-presentation-minimizer.oxt %_DEST%\bin%_EXT%\minimizer\sun-presentation-minimizer.oxt +..\%__SRC%\bin\presentation-minimizer.oxt %_DEST%\bin%_EXT%\minimizer\presentation-minimizer.oxt ..\%__SRC%\bin\presenter-screen.oxt %_DEST%\bin%_EXT%\presenter\presenter-screen.oxt diff --git a/sdext/source/minimizer/description.xml b/sdext/source/minimizer/description.xml index 54cb88762a4d..922d47096e6b 100644 --- a/sdext/source/minimizer/description.xml +++ b/sdext/source/minimizer/description.xml @@ -12,21 +12,26 @@ </dependencies> <registration> - <simple-license accept-by="admin" default-license-id="lic-en-US"> + <simple-license accept-by="admin" default-license-id="lic-en-US" suppress-if-required="true" > <license-text xlink:href="licensefile" lang="isocode" license-id="lic-isocode"/> </simple-license> </registration> - <version value="1.0"/> + <version value="1.0.2"/> <platform value="UPDATED_SUPPORTED_PLATFORM"/> <publisher> - <name xlink:href="http://www.sun.com/software/star/staroffice/extensions.jsp?cid=925095" lang="en">Sun Microsystems</name> + <name xlink:href="http://www.sun.com/software/star/staroffice/extensions.jsp?cid=925095" lang="en">Oracle</name> </publisher> <display-name> <name lang="en-US">Presentation Minimizer</name> </display-name> + <icon> + <default xlink:href="bitmaps/em47.png" /> + <high-contrast xlink:href="bitmaps/em47_hc.png" /> + </icon> + </description> diff --git a/sdext/source/minimizer/fileopendialog.cxx b/sdext/source/minimizer/fileopendialog.cxx index 832914e5c8ab..3bb42da1f2f4 100644 --- a/sdext/source/minimizer/fileopendialog.cxx +++ b/sdext/source/minimizer/fileopendialog.cxx @@ -33,6 +33,7 @@ #include "pppoptimizertoken.hxx" #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp> #include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp> #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp> @@ -55,6 +56,7 @@ #include <com/sun/star/container/XEnumeration.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/container/XContainerQuery.hpp> +#include <com/sun/star/view/XControlAccess.hpp> #include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp> @@ -63,6 +65,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; +using namespace ::com::sun::star::view; using namespace ::com::sun::star::ui::dialogs; FileOpenDialog::FileOpenDialog( const Reference< XComponentContext >& rxMSF ) : @@ -75,6 +78,17 @@ FileOpenDialog::FileOpenDialog( const Reference< XComponentContext >& rxMSF ) : OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ), aInitPropSeq, rxMSF ),UNO_QUERY_THROW ); mxFilePicker->setMultiSelectionMode( sal_False ); + Reference< XFilePickerControlAccess > xAccess( mxFilePicker, UNO_QUERY ); + if ( xAccess.is() ) + { + Any aValue( static_cast< sal_Bool >( sal_True ) ); + try + { + xAccess->setValue( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, aValue ); + } + catch( com::sun::star::uno::Exception& ) + {} + } // collecting a list of impress filters Reference< XNameAccess > xFilters( mxMSF->getServiceManager()->createInstanceWithContext( diff --git a/sdext/source/minimizer/help/component.txt b/sdext/source/minimizer/help/component.txt index f6222edc2386..98f2687800ff 100755 --- a/sdext/source/minimizer/help/component.txt +++ b/sdext/source/minimizer/help/component.txt @@ -1,3 +1,2 @@ -The Presentation Minimizer is used to reduce the file size of the current -presentation. Images will be compressed, and data that is no longer needed -will be removed. +The Presentation Minimizer is used to reduce the file size of the current presentation. Images will be compressed, and data that is no longer needed will be removed. +The Presentation Minimizer can optimize the image quality size. Presentations designed for screen or projector do not require the same high quality as presentations designed for print. diff --git a/sdext/source/minimizer/images/em47.png b/sdext/source/minimizer/images/em47.png Binary files differnew file mode 100644 index 000000000000..a018f1710ea5 --- /dev/null +++ b/sdext/source/minimizer/images/em47.png diff --git a/sdext/source/minimizer/images/em47_hc.png b/sdext/source/minimizer/images/em47_hc.png Binary files differnew file mode 100644 index 000000000000..418cd1479298 --- /dev/null +++ b/sdext/source/minimizer/images/em47_hc.png diff --git a/sdext/source/minimizer/makefile.mk b/sdext/source/minimizer/makefile.mk index 449ee5ea54a9..958c9f554df1 100644 --- a/sdext/source/minimizer/makefile.mk +++ b/sdext/source/minimizer/makefile.mk @@ -38,8 +38,8 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : $(PRJ)$/util$/makefile.pmk # set in minimizer.pmk -#EXTENSIONNAME:=SunPresentationMinimizer -EXTENSION_ZIPNAME:=sun-presentation-minimizer +#EXTENSIONNAME:=PresentationMinimizer +EXTENSION_ZIPNAME:=presentation-minimizer .IF "$(ENABLE_MINIMIZER)" != "YES" @all: @@ -83,11 +83,7 @@ DEF1NAME= $(SHL1TARGET) COMPONENT_MERGED_XCU= \ $(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/Addons.xcu \ - $(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/extension$/SunPresentationMinimizer.xcu \ - $(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/UI$/ImpressWindowState.xcu - -COMPONENT_XCU= \ - $(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/ProtocolHandler.xcu + $(EXTENSIONDIR)$/registry$/data$/org$/openoffice$/Office$/extension$/SunPresentationMinimizer.xcu COMPONENT_FILES= \ $(EXTENSIONDIR)$/registry$/schema$/org$/openoffice$/Office$/extension$/SunPresentationMinimizer.xcs @@ -98,7 +94,6 @@ COMPONENT_LIBRARIES= \ # rather freestyle or common to all? COMPONENT_BITMAPS= \ - $(EXTENSIONDIR)$/bitmaps$/aboutlogo.png \ $(EXTENSIONDIR)$/bitmaps$/opt_16.png \ $(EXTENSIONDIR)$/bitmaps$/opt_26.png \ $(EXTENSIONDIR)$/bitmaps$/opt_16_h.png \ @@ -106,6 +101,10 @@ COMPONENT_BITMAPS= \ $(EXTENSIONDIR)$/bitmaps$/minimizepresi_80.png \ $(EXTENSIONDIR)$/bitmaps$/minimizepresi_80_h.png +COMPONENT_IMAGES=\ + $(EXTENSIONDIR)$/bitmaps$/em47.png \ + $(EXTENSIONDIR)$/bitmaps$/em47_hc.png + # rather freestyle or common to all? COMPONENT_HELP= \ $(EXTENSIONDIR)$/help$/help_de.odt \ @@ -113,7 +112,7 @@ COMPONENT_HELP= \ $(EXTENSIONDIR)$/help$/component.txt # make sure to add your custom files here -EXTENSION_PACKDEPS=$(COMPONENT_BITMAPS) $(COMPONENT_HELP) +EXTENSION_PACKDEPS=$(COMPONENT_BITMAPS) $(COMPONENT_IMAGES) $(COMPONENT_HELP) # --- Targets ---------------------------------- @@ -129,6 +128,10 @@ $(COMPONENT_BITMAPS) : $(SOLARSRC)$/$(RSCDEFIMG)$/minimizer$/$$(@:f) @@-$(MKDIRHIER) $(@:d) $(COPY) $< $@ +$(COMPONENT_IMAGES) : images$/$$(@:f) + @@-$(MKDIRHIER) $(@:d) + $(COPY) $< $@ + $(COMPONENT_HELP) : help$/$$(@:f) @@-$(MKDIRHIER) $(@:d) $(COPY) $< $@ diff --git a/sdext/source/minimizer/manifest.xml b/sdext/source/minimizer/manifest.xml index 41587ebcfd69..eac189524f26 100644 --- a/sdext/source/minimizer/manifest.xml +++ b/sdext/source/minimizer/manifest.xml @@ -11,8 +11,6 @@ manifest:full-path="registry/data/org/openoffice/Office/Addons.xcu"/> <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data" manifest:full-path="registry/data/org/openoffice/Office/ProtocolHandler.xcu"/> - <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data" - manifest:full-path="registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu"/> <manifest:file-entry manifest:media-type="application/vnd.sun.star.package-bundle-description" manifest:full-path="help/component.txt"/> </manifest:manifest> diff --git a/sdext/source/minimizer/registry/data/org/openoffice/Office/Addons.xcu b/sdext/source/minimizer/registry/data/org/openoffice/Office/Addons.xcu index 21f951a15c38..2b4465b402f1 100644 --- a/sdext/source/minimizer/registry/data/org/openoffice/Office/Addons.xcu +++ b/sdext/source/minimizer/registry/data/org/openoffice/Office/Addons.xcu @@ -1,24 +1,6 @@ <?xml version='1.0' encoding='UTF-8'?> <oor:component-data xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" oor:name="Addons" oor:package="org.openoffice.Office"> <node oor:name="AddonUI"> - <node oor:name="OfficeToolBar"> - <node oor:name="org.openoffice.Office.SunPresentationMinimizer" oor:op="replace"> - <node oor:name="m1" oor:op="replace"> - <prop oor:name="URL" oor:type="xs:string"> - <value>vnd.com.sun.star.comp.SunPresentationMinimizer:execute</value> - </prop> - <prop oor:name="Title" oor:type="xs:string"> - <value xml:lang="en-US">Minimize Presentation</value> - </prop> - <prop oor:name="Target" oor:type="xs:string"> - <value>_self</value> - </prop> - <prop oor:name="Context" oor:type="xs:string"> - <value>com.sun.star.presentation.PresentationDocument</value> - </prop> - </node> - </node> - </node> <node oor:name="Images"> <node oor:name="opt-image" oor:op="replace"> <prop oor:name="URL"> @@ -77,36 +59,6 @@ </node> </node> </node> - <node oor:name="Command2" oor:op="replace"> - <prop oor:name="MergePoint"> - <value>.uno:HelpMenu\.uno:About</value> - </prop> - <prop oor:name="MergeCommand"> - <value>AddBefore</value> - </prop> - <prop oor:name="MergeFallback"> - <value>AddPath</value> - </prop> - <prop oor:name="MergeContext"> - <value>com.sun.star.presentation.PresentationDocument</value> - </prop> - <node oor:name="MenuItems"> - <node oor:name="SunPresentationMinimizerAbout1" oor:op="replace"> - <prop oor:name="URL" oor:type="xs:string"> - <value>vnd.com.sun.star.comp.SunPresentationMinimizer:about</value> - </prop> - <prop oor:name="Title" oor:type="xs:string"> - <value xml:lang="en-US">About Sun Presentation Minimizer</value> - </prop> - <prop oor:name="Target" oor:type="xs:string"> - <value>_self</value> - </prop> - <prop oor:name="Context" oor:type="xs:string"> - <value>com.sun.star.presentation.PresentationDocument</value> - </prop> - </node> - </node> - </node> </node> </node> </node> diff --git a/sdext/source/minimizer/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu b/sdext/source/minimizer/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu deleted file mode 100644 index 9be906f2da42..000000000000 --- a/sdext/source/minimizer/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<oor:component-data xmlns:oor="http://openoffice.org/2001/registry" -xmlns:xs="http://www.w3.org/2001/XMLSchema" -oor:name="ImpressWindowState" -oor:package="org.openoffice.Office.UI"> - <node oor:name="UIElements"> - <node oor:name="States"> - <node oor:name="private:resource/toolbar/addon_org.openoffice.Office.SunPresentationMinimizer" oor:op="replace"> - <prop oor:name="ContextSensitive" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="UIName" oor:type="xs:string"> - <value xml:lang="en-US">Minimizer</value> - </prop> - <prop oor:name="Visible" oor:type="xs:boolean"> - <value>true</value> - </prop> - <prop oor:name="Docked" oor:type="xs:boolean"> - <value>false</value> - </prop> - <prop oor:name="Style" oor:type="xs:int"> - <value>2</value> - </prop> - </node> - </node> - </node> -</oor:component-data> diff --git a/sdext/source/minimizer/registry/data/org/openoffice/Office/UI/makefile.mk b/sdext/source/minimizer/registry/data/org/openoffice/Office/UI/makefile.mk deleted file mode 100644 index c9c83d21f5c8..000000000000 --- a/sdext/source/minimizer/registry/data/org/openoffice/Office/UI/makefile.mk +++ /dev/null @@ -1,47 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/..$/..$/..$/..$/..$/..$/.. - -PRJNAME=sdext -TARGET=data_ooOUI -PACKAGE=org.openoffice.Office.UI - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/source$/minimizer$/minimizer.pmk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Targets ------------------------------------------------------ - -XCUFILES= \ - ImpressWindowState.xcu - -MODULEFILES= - -LOCALIZEDFILES= \ - ImpressWindowState.xcu - -.INCLUDE : target.mk diff --git a/sdext/source/pdfimport/config/description.xml b/sdext/source/pdfimport/config/description.xml index 08e2f505653a..c2d36bd58be1 100644 --- a/sdext/source/pdfimport/config/description.xml +++ b/sdext/source/pdfimport/config/description.xml @@ -11,7 +11,7 @@ </dependencies> <registration> - <simple-license accept-by="admin" default-license-id="lic-en-US"> + <simple-license accept-by="admin" default-license-id="lic-en-US" suppress-if-required="true" > <license-text xlink:href="licensefile" lang="isocode" license-id="lic-isocode"/> </simple-license> </registration> @@ -21,11 +21,11 @@ <platform value="UPDATED_SUPPORTED_PLATFORM" /> <publisher> - <name xlink:href="http://www.sun.com/software/star/staroffice/extensions.jsp?cid=925095" lang="en">Sun Microsystems</name> + <name xlink:href="http://www.sun.com/software/star/staroffice/extensions.jsp?cid=925095" lang="en">Oracle</name> </publisher> <display-name> - <name lang="en-US">PDF Import Extension</name> + <name lang="en-US">PDF Import</name> </display-name> <icon> diff --git a/sdext/source/pdfimport/help/component.txt b/sdext/source/pdfimport/help/component.txt index e2dfbc9b99f6..969581ef2fbf 100755 --- a/sdext/source/pdfimport/help/component.txt +++ b/sdext/source/pdfimport/help/component.txt @@ -1,3 +1 @@ -PDF documents are imported in Draw and Impress to preserve the layout and to -allow basic editing. It is the perfect solution for changing dates, numbers -or small portions of text. +The PDF Import Extension allows you to import and modify PDF documents. Best results with 100% layout accuracy can be achieved with the "PDF/ODF hybrid file" format, which this extension also enables. A hybrid PDF/ODF file is a PDF file that contains an embedded ODF source file. Hybrid PDF/ODF files will be opened in OpenOffice.org as an ODF file without any layout changes. diff --git a/sdext/source/pdfimport/images/pdfiext.png b/sdext/source/pdfimport/images/pdfiext.png Binary files differindex 31f48ea8fb69..a018f1710ea5 100644 --- a/sdext/source/pdfimport/images/pdfiext.png +++ b/sdext/source/pdfimport/images/pdfiext.png diff --git a/sdext/source/pdfimport/images/pdfiext_hc.png b/sdext/source/pdfimport/images/pdfiext_hc.png Binary files differindex 3870cc4709d4..418cd1479298 100644 --- a/sdext/source/pdfimport/images/pdfiext_hc.png +++ b/sdext/source/pdfimport/images/pdfiext_hc.png diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx index 2d163118a5ec..a2ff6b996ff2 100644 --- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx +++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx @@ -638,8 +638,17 @@ bool PDFObject::getDeflatedStream( char** ppStream, unsigned int* pBytes, const m_pStream->m_pDict->m_aMap.find( "Filter" ); if( it != m_pStream->m_pDict->m_aMap.end() ) { - // is the (first) filter FlateDecode ? PDFName* pFilter = dynamic_cast<PDFName*>(it->second); + if( ! pFilter ) + { + PDFArray* pArray = dynamic_cast<PDFArray*>(it->second); + if( pArray && ! pArray->m_aSubElements.empty() ) + { + pFilter = dynamic_cast<PDFName*>(pArray->m_aSubElements.front()); + } + } + + // is the (first) filter FlateDecode ? if( pFilter && pFilter->m_aName.equals( "FlateDecode" ) ) { bIsDeflated = true; @@ -669,8 +678,6 @@ bool PDFObject::getDeflatedStream( char** ppStream, unsigned int* pBytes, const } else *ppStream = NULL, *pBytes = 0; - // FIXME: one could also deflate if FlateDecode ws the - // first filter in an array return bIsDeflated; } @@ -1196,7 +1203,7 @@ PDFFileImplData* PDFFile::impl_getData() const #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "DocId is <" ); for( int i = 0; i < m_pData->m_aDocID.getLength(); i++ ) - fprintf( stderr, "%.2x", sal_uInt32(sal_uInt8(m_pData->m_aDocID.getStr()[i])) ); + fprintf( stderr, "%.2x", (unsigned int)sal_uInt8(m_pData->m_aDocID.getStr()[i]) ); fprintf( stderr, ">\n" ); #endif } @@ -1258,9 +1265,9 @@ PDFFileImplData* PDFFile::impl_getData() const #if OSL_DEBUG_LEVEL > 1 else { - fprintf( stderr, "O entry has length %d, should be 32 <", aEnt.getLength() ); + fprintf( stderr, "O entry has length %d, should be 32 <", (int)aEnt.getLength() ); for( int i = 0; i < aEnt.getLength(); i++ ) - fprintf( stderr, " %.2X", sal_uInt32(sal_uInt8(aEnt.getStr()[i])) ); + fprintf( stderr, " %.2X", (unsigned int)sal_uInt8(aEnt.getStr()[i]) ); fprintf( stderr, ">\n" ); } #endif @@ -1277,9 +1284,9 @@ PDFFileImplData* PDFFile::impl_getData() const #if OSL_DEBUG_LEVEL > 1 else { - fprintf( stderr, "U entry has length %d, should be 32 <", aEnt.getLength() ); + fprintf( stderr, "U entry has length %d, should be 32 <", (int)aEnt.getLength() ); for( int i = 0; i < aEnt.getLength(); i++ ) - fprintf( stderr, " %.2X", sal_uInt32(sal_uInt8(aEnt.getStr()[i])) ); + fprintf( stderr, " %.2X", (unsigned int)sal_uInt8(aEnt.getStr()[i]) ); fprintf( stderr, ">\n" ); } #endif @@ -1297,13 +1304,13 @@ PDFFileImplData* PDFFile::impl_getData() const if( pNum ) m_pData->m_nPEntry = static_cast<sal_uInt32>(static_cast<sal_Int32>(pNum->m_fValue)); #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "p entry is 0x%x\n", m_pData->m_nPEntry ); + fprintf( stderr, "p entry is %p\n", m_pData->m_nPEntry ); #endif } #if OSL_DEBUG_LEVEL > 1 fprintf( stderr, "Encryption dict: sec handler: %s, version = %d, revision = %d, key length = %d\n", pFilter ? OUStringToOString( pFilter->getFilteredName(), RTL_TEXTENCODING_UTF8 ).getStr() : "<unknown>", - m_pData->m_nAlgoVersion, m_pData->m_nStandardRevision, m_pData->m_nKeyLength ); + (int)m_pData->m_nAlgoVersion, (int)m_pData->m_nStandardRevision, m_pData->m_nKeyLength ); #endif break; } diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx index abab9d783225..0eafbbb83327 100755 --- a/sdext/source/pdfimport/wrapper/wrapper.cxx +++ b/sdext/source/pdfimport/wrapper/wrapper.cxx @@ -197,6 +197,60 @@ public: void parseLine( const ::rtl::OString& rLine ); }; + +namespace +{ + + /** Unescapes line-ending characters in input string. These + characters are encoded as pairs of characters: '\\' 'n', resp. + '\\' 'r'. This function converts them back to '\n', resp. '\r'. + */ + rtl::OString lcl_unescapeLineFeeds(const rtl::OString& i_rStr) + { + const size_t nOrigLen(sal::static_int_cast<size_t>(i_rStr.getLength())); + const sal_Char* const pOrig(i_rStr.getStr()); + sal_Char* const pBuffer(new sal_Char[nOrigLen + 1]); + + const sal_Char* pRead(pOrig); + sal_Char* pWrite(pBuffer); + const sal_Char* pCur(pOrig); + while ((pCur = strchr(pCur, '\\')) != 0) + { + const sal_Char cNext(pCur[1]); + if (cNext == 'n' || cNext == 'r' || cNext == '\\') + { + const size_t nLen(pCur - pRead); + strncpy(pWrite, pRead, nLen); + pWrite += nLen; + *pWrite = cNext == 'n' ? '\n' : (cNext == 'r' ? '\r' : '\\'); + ++pWrite; + pCur = pRead = pCur + 2; + } + else + { + // Just continue on the next character. The current + // block will be copied the next time it goes through the + // 'if' branch. + ++pCur; + } + } + // maybe there are some data to copy yet + if (sal::static_int_cast<size_t>(pRead - pOrig) < nOrigLen) + { + const size_t nLen(nOrigLen - (pRead - pOrig)); + strncpy(pWrite, pRead, nLen); + pWrite += nLen; + } + *pWrite = '\0'; + + rtl::OString aResult(pBuffer); + delete[] pBuffer; + return aResult; + } + +} + + ::rtl::OString Parser::readNextToken() { OSL_PRECOND(m_nCharIndex!=-1,"insufficient input"); @@ -322,7 +376,7 @@ void Parser::readChar() readDouble(aUnoMatrix.m10); readDouble(aUnoMatrix.m11); - rtl::OString aChars = m_aLine.copy( m_nCharIndex ); + rtl::OString aChars = lcl_unescapeLineFeeds( m_aLine.copy( m_nCharIndex ) ); // chars gobble up rest of line m_nCharIndex = -1; @@ -476,7 +530,7 @@ void Parser::readFont() readInt32(nFileLen); nSize = nSize < 0.0 ? -nSize : nSize; - aFontName = m_aLine.copy( m_nCharIndex ); + aFontName = lcl_unescapeLineFeeds( m_aLine.copy( m_nCharIndex ) ); // name gobbles up rest of line m_nCharIndex = -1; @@ -668,8 +722,9 @@ void Parser::readLink() readDouble(aBounds.Y2); m_pSink->hyperLink( aBounds, - rtl::OStringToOUString( m_aLine.copy(m_nCharIndex), - RTL_TEXTENCODING_UTF8 )); + rtl::OStringToOUString( lcl_unescapeLineFeeds( + m_aLine.copy(m_nCharIndex) ), + RTL_TEXTENCODING_UTF8 ) ); // name gobbles up rest of line m_nCharIndex = -1; } diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx index 1fa9ff32b530..5361330fd697 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -37,6 +37,8 @@ #include <math.h> #include <vector> +#include <boost/shared_array.hpp> + #if defined __SUNPRO_CC #pragma disable_warn #elif defined _MSC_VER @@ -78,10 +80,44 @@ inline double normalize( double val ) return fabs(val) < 0.0000001 ? 0.0 : val; } -const char* escapeLineFeed( const char* pStr ) +namespace +{ + +/** Escapes line-ending characters (\n and \r) in input string. + */ +boost::shared_array<char> lcl_escapeLineFeeds(const char* const i_pStr) { - // TODO(Q3): Escape linefeeds - return pStr; + size_t nLength(strlen(i_pStr)); + char* pBuffer = new char[2*nLength+1]; + + const char* pRead = i_pStr; + char* pWrite = pBuffer; + while( nLength-- ) + { + if( *pRead == '\r' ) + { + *pWrite++ = '\\'; + *pWrite++ = 'r'; + } + else if( *pRead == '\n' ) + { + *pWrite++ = '\\'; + *pWrite++ = 'n'; + } + else if( *pRead == '\\' ) + { + *pWrite++ = '\\'; + *pWrite++ = '\\'; + } + else + *pWrite++ = *pRead; + pRead++; + } + *pWrite++ = 0; + + return boost::shared_array<char>(pBuffer); +} + } /// for the temp char buffer the header gets snprintfed in @@ -464,12 +500,14 @@ void PDFOutDev::processLink(Link* link, Catalog*) { const char* pURI = static_cast<LinkURI*>(pAction)->getURI()->getCString(); + boost::shared_array<char> pEsc( lcl_escapeLineFeeds(pURI) ); + printf( "drawLink %f %f %f %f %s\n", normalize(x1), normalize(y1), normalize(x2), normalize(y2), - escapeLineFeed(pURI) ); + pEsc.get() ); } } @@ -634,6 +672,8 @@ void PDFOutDev::updateFont(GfxState *state) printf( " %lld", fontID ); aFont = it->second; + + boost::shared_array<char> pEsc( lcl_escapeLineFeeds(aFont.familyName.getCString()) ); printf( " %d %d %d %d %f %d %s", aFont.isEmbedded, aFont.isBold, @@ -641,7 +681,7 @@ void PDFOutDev::updateFont(GfxState *state) aFont.isUnderline, normalize(state->getTransformedFontSize()), nEmbedSize, - escapeLineFeed(aFont.familyName.getCString()) ); + pEsc.get() ); } printf( "\n" ); @@ -765,7 +805,8 @@ void PDFOutDev::drawChar(GfxState *state, double x, double y, for( int i=0; i<uLen; ++i ) { buf[ m_pUtf8Map->mapUnicode(u[i], buf, sizeof(buf)-1) ] = 0; - printf( "%s", escapeLineFeed(buf) ); + boost::shared_array<char> pEsc( lcl_escapeLineFeeds(buf) ); + printf( "%s", pEsc.get() ); } printf( "\n" ); diff --git a/sdext/source/presenter/bitmaps/em47.png b/sdext/source/presenter/bitmaps/em47.png Binary files differnew file mode 100644 index 000000000000..a018f1710ea5 --- /dev/null +++ b/sdext/source/presenter/bitmaps/em47.png diff --git a/sdext/source/presenter/bitmaps/em47_hc.png b/sdext/source/presenter/bitmaps/em47_hc.png Binary files differnew file mode 100644 index 000000000000..418cd1479298 --- /dev/null +++ b/sdext/source/presenter/bitmaps/em47_hc.png diff --git a/sdext/source/presenter/description.xml b/sdext/source/presenter/description.xml index af1c4fee348e..8a56838ad263 100644 --- a/sdext/source/presenter/description.xml +++ b/sdext/source/presenter/description.xml @@ -12,7 +12,7 @@ </dependencies> <registration> - <simple-license accept-by="admin" default-license-id="lic-en-US"> + <simple-license accept-by="admin" default-license-id="lic-en-US" suppress-if-required="true" > <license-text xlink:href="licensefile" lang="isocode" license-id="lic-isocode"/> </simple-license> </registration> @@ -22,11 +22,16 @@ <platform value="UPDATED_PLATFORM" /> <publisher> - <name xlink:href="http://www.sun.com/software/star/staroffice/extensions.jsp?cid=925095" lang="en">Sun Microsystems</name> + <name xlink:href="http://www.sun.com/software/star/staroffice/extensions.jsp?cid=925095" lang="en">Oracle</name> </publisher> <display-name> <name lang="en">Presenter Console</name> </display-name> + <icon> + <default xlink:href="bitmaps/em47.png" /> + <high-contrast xlink:href="bitmaps/em47_hc.png" /> + </icon> + </description> diff --git a/sdext/source/presenter/help/component.txt b/sdext/source/presenter/help/component.txt index 3be173ddb89d..26a10c622fe9 100755 --- a/sdext/source/presenter/help/component.txt +++ b/sdext/source/presenter/help/component.txt @@ -1,3 +1,2 @@ -The Presenter Console Extension provides more control over your slide show -presentation, such as the ability to see the upcoming slide, the slide notes, -and a presentation timer whereas the audience see only the current slide. +The Presenter Console Extension provides more control over your slide show presentation, such as the ability to see the upcoming slide, the slide notes, and a presentation timer whereas the audience see only the current slide. +To avoid confusions by displaying a large number of presentation elements, the Presenter Console displays the elements on three different easily changeable views. diff --git a/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp b/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp index dd06ace98f95..a1172d540d7e 100644 --- a/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp +++ b/sdext/source/presenter/help/en-US/com.sun.PresenterScreen/presenter.xhp @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> <helpdocument version="1.0"> - + <!-- *********************************************************************** * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -29,11 +29,11 @@ * ************************************************************************ --> - - + + <meta> <topic id="textpresenterxml" indexer="include" status="PUBLISH"> - <title xml-lang="en-US" id="tit" l10n="NEW">Sun Presenter Console Keyboard Shortcuts</title> + <title xml-lang="en-US" id="tit" l10n="NEW">Oracle Presenter Console Keyboard Shortcuts</title> <filename>/com.sun.PresenterScreen-PLATFORMID/presenter.xhp</filename> </topic> </meta> @@ -41,8 +41,8 @@ <bookmark xml-lang="en-US" branch="hid/com.sun.PresenterScreen" id="bm_id3138439" localize="false"/> <bookmark xml-lang="en-US" branch="index" id="bm_id0921200912285678"><bookmark_value>Presenter Console shortcuts</bookmark_value> </bookmark> -<paragraph xml-lang="en-US" id="hd_id0921201912165661" role="heading" level="1" l10n="NEW">Sun Presenter Console Keyboard Shortcuts</paragraph> - <paragraph xml-lang="en-US" id="par_id0921201912165656" role="paragraph" l10n="NEW">When running a slide show using the Sun Presenter Console, you can use the following keys:</paragraph> +<paragraph xml-lang="en-US" id="hd_id0921201912165661" role="heading" level="1" l10n="NEW">Oracle Presenter Console Keyboard Shortcuts</paragraph> + <paragraph xml-lang="en-US" id="par_id0921201912165656" role="paragraph" l10n="NEW">When running a slide show using the Oracle Presenter Console, you can use the following keys:</paragraph> <table id="tbl_id0921200901051232"> <tablerow> <tablecell> diff --git a/sdext/source/presenter/makefile.mk b/sdext/source/presenter/makefile.mk index 2c761d12de92..b0bedecd4f8b 100644 --- a/sdext/source/presenter/makefile.mk +++ b/sdext/source/presenter/makefile.mk @@ -231,7 +231,9 @@ COMPONENT_BITMAPS= \ \ $(ZIP1DIR)$/bitmaps$/LabelMouseOverLeft.png \ $(ZIP1DIR)$/bitmaps$/LabelMouseOverCenter.png \ - $(ZIP1DIR)$/bitmaps$/LabelMouseOverRight.png + $(ZIP1DIR)$/bitmaps$/LabelMouseOverRight.png \ + $(ZIP1DIR)$/bitmaps$/em47.png \ + $(ZIP1DIR)$/bitmaps$/em47_hc.png COMPONENT_MANIFEST= \ $(ZIP1DIR)$/META-INF$/manifest.xml diff --git a/swext/mediawiki/help/component.txt b/swext/mediawiki/help/component.txt index 8afa12126e03..c5ac1de36066 100755 --- a/swext/mediawiki/help/component.txt +++ b/swext/mediawiki/help/component.txt @@ -1,3 +1 @@ -The @WIKIEXTENSIONPRODUCTNAME@ enables you to create Wiki articles on MediaWiki servers -without having to know the syntax of the MediaWiki markup language. Publish -your new and existing documents transparently with the Writer to a wiki page. +The @WIKIEXTENSIONPRODUCTNAME@ enables you to create Wiki articles on MediaWiki servers without having to know the syntax of the MediaWiki markup language. Publish your new and existing documents transparently with the Writer to a wiki page. diff --git a/swext/mediawiki/src/description.xml b/swext/mediawiki/src/description.xml index 2b90d149ae8a..30863c07e63c 100644 --- a/swext/mediawiki/src/description.xml +++ b/swext/mediawiki/src/description.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <description xmlns="http://openoffice.org/extensions/description/2006" xmlns:d="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink"> - <version value="1.1"/> + <version value="1.1.1"/> <identifier value="@WIKIEXTENSIONID@"/> <display-name> <name lang="en-US">@WIKIEXTENSIONPRODUCTNAME@</name> @@ -14,6 +14,6 @@ <OpenOffice.org-minimal-version value="3.0" d:name="OpenOffice.org 3.0 or StarOffice 9"/> </dependencies> <publisher> - <name xlink:href="http://www.sun.com/software/star/staroffice/extensions.jsp?cid=925095" lang="en">Sun Microsystems</name> + <name xlink:href="http://www.sun.com/software/star/staroffice/extensions.jsp?cid=925095" lang="en">Oracle</name> </publisher> </description> |