From a17ddfab0a4f68e70a629e0b6fe28feccf29fba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Wed, 29 Nov 2017 17:35:54 +0800 Subject: [PATCH] * Updated to check and set the title in the DocumentProperties instead of the document title. This prevents error and preserves the document to be reuse even after saving to the disk. The title of the document itself should not be messed-up. * Advanced to version 0.8.2. --- PokemonGoIV/2Report.vb | 4 ++-- VERSION | 2 +- excludes/pokemongoiv.update.xml | 4 ++-- oxt/PokemonGoIV/2Report.xba | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/PokemonGoIV/2Report.vb b/PokemonGoIV/2Report.vb index 6a19671..ffe27c8 100644 --- a/PokemonGoIV/2Report.vb +++ b/PokemonGoIV/2Report.vb @@ -464,7 +464,7 @@ Function fnFindPokemonGOIVSheet (sPokemon As String) As Object If IsNull (oDoc) Then oDoc = StarDesktop.loadComponentFromURL ( _ "private:factory/scalc", "_default", 0, mProps) - oDoc.setTitle (sDocTitle) + oDoc.getDocumentProperties.Title = sDocTitle oSheets = oDoc.getSheets mNames = oSheets.getElementNames oSheets.insertNewByName (sPokemon, 0) @@ -494,7 +494,7 @@ Function fnFindDocByTitle (sTitle) As Object oDoc = oEnum.nextElement If oDoc.supportsService ( _ "com.sun.star.sheet.SpreadsheetDocument") Then - If oDoc.getTitle = sTitle Then + If oDoc.getDocumentProperties.Title = sTitle Then fnFindDocByTitle = oDoc Exit Function End If diff --git a/VERSION b/VERSION index 6f4eebd..100435b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.8.1 +0.8.2 diff --git a/excludes/pokemongoiv.update.xml b/excludes/pokemongoiv.update.xml index 910758c..f6bc89e 100644 --- a/excludes/pokemongoiv.update.xml +++ b/excludes/pokemongoiv.update.xml @@ -2,8 +2,8 @@ - + - + diff --git a/oxt/PokemonGoIV/2Report.xba b/oxt/PokemonGoIV/2Report.xba index 7b9dde6..8873d63 100644 --- a/oxt/PokemonGoIV/2Report.xba +++ b/oxt/PokemonGoIV/2Report.xba @@ -466,7 +466,7 @@ Function fnFindPokemonGOIVSheet (sPokemon As String) As Object If IsNull (oDoc) Then oDoc = StarDesktop.loadComponentFromURL ( _ "private:factory/scalc", "_default", 0, mProps) - oDoc.setTitle (sDocTitle) + oDoc.getDocumentProperties.Title = sDocTitle oSheets = oDoc.getSheets mNames = oSheets.getElementNames oSheets.insertNewByName (sPokemon, 0) @@ -496,7 +496,7 @@ Function fnFindDocByTitle (sTitle) As Object oDoc = oEnum.nextElement If oDoc.supportsService ( _ "com.sun.star.sheet.SpreadsheetDocument") Then - If oDoc.getTitle = sTitle Then + If oDoc.getDocumentProperties.Title = sTitle Then fnFindDocByTitle = oDoc Exit Function End If