Skip to content

Commit ed48250

Browse files
authored
Merge pull request #779 from rpatters1/mss-bugfixes
Mss bugfixes
2 parents 05f2410 + 52b983a commit ed48250

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

src/document_options_to_musescore.lua

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ function plugindef()
44
finaleplugin.NoStore = true
55
finaleplugin.Author = "Robert Patterson"
66
finaleplugin.Copyright = "CC0 https://creativecommons.org/publicdomain/zero/1.0/"
7-
finaleplugin.Version = "1.0.2"
8-
finaleplugin.Date = "October 20, 2024"
7+
finaleplugin.Version = "1.0.3"
8+
finaleplugin.Date = "December 31, 2024"
99
finaleplugin.CategoryTags = "Document"
1010
finaleplugin.MinJWLuaVersion = 0.75
1111
finaleplugin.Notes = [[
@@ -190,10 +190,10 @@ function muse_font_efx(font_info)
190190
retval = retval | 0x02
191191
end
192192
if font_info.Underline then
193-
retval = retval | 0x03
193+
retval = retval | 0x04
194194
end
195195
if font_info.Strikethrough then
196-
retval = retval | 0x04
196+
retval = retval | 0x08
197197
end
198198
return retval
199199
end
@@ -266,7 +266,7 @@ function write_page_prefs(style_element)
266266
set_element_text(style_element, "pageWidth", page_prefs.PageWidth / EVPU_PER_INCH)
267267
set_element_text(style_element, "pageHeight", page_prefs.PageHeight / EVPU_PER_INCH)
268268
set_element_text(style_element, "pagePrintableWidth",
269-
(page_prefs.PageWidth - page_prefs.LeftPageRightMargin - page_prefs.LeftPageRightMargin) / EVPU_PER_INCH)
269+
(page_prefs.PageWidth - page_prefs.LeftPageLeftMargin - page_prefs.LeftPageRightMargin) / EVPU_PER_INCH)
270270
set_element_text(style_element, "pageEvenLeftMargin", page_prefs.LeftPageLeftMargin / EVPU_PER_INCH)
271271
set_element_text(style_element, "pageOddLeftMargin",
272272
(page_prefs.UseFacingPages and page_prefs.RightPageLeftMargin or page_prefs.LeftPageLeftMargin) / EVPU_PER_INCH)
@@ -281,7 +281,7 @@ function write_page_prefs(style_element)
281281
set_element_text(style_element, "firstSystemIndentationValue", page_prefs.FirstSystemLeft / EVPU_PER_SPACE)
282282
local page_percent = page_prefs.PageScaling / 100
283283
local staff_percent = (page_prefs.SystemStaffHeight / (EVPU_PER_SPACE * 4 * 16)) * (page_prefs.SystemScaling / 100)
284-
set_element_text(style_element, "Spatium", (EVPU_PER_SPACE * staff_percent * page_percent) / EVPU_PER_MM)
284+
set_element_text(style_element, "spatium", (EVPU_PER_SPACE * staff_percent * page_percent) / EVPU_PER_MM)
285285
if default_music_font.IsSMuFLFont then
286286
set_element_text(style_element, "musicalSymbolFont", default_music_font.Name)
287287
set_element_text(style_element, "musicalTextFont", default_music_font.Name .. " Text")

src/musicxml_massage_export.lua

+7-8
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ function plugindef()
55
finaleplugin.NoStore = true
66
finaleplugin.Author = "Robert Patterson and Carl Vine"
77
finaleplugin.Copyright = "CC0 https://creativecommons.org/publicdomain/zero/1.0/"
8-
finaleplugin.Version = "2.5.1"
9-
finaleplugin.Date = "November 7, 2024"
8+
finaleplugin.Version = "2.5.2"
9+
finaleplugin.Date = "December 31, 2024"
1010
finaleplugin.LoadLuaOSUtils = true
1111
finaleplugin.CategoryTags = "Document"
1212
finaleplugin.MinJWLuaVersion = 0.77
@@ -544,10 +544,9 @@ function process_one_file(path, full_file_name)
544544
if abort_if(not score_partwise, "file does not appear to be exported from Finale") then
545545
return
546546
end
547-
local encoding_element = tinyxml2.XMLHandle(score_partwise)
548-
:FirstChildElement("identification")
549-
:FirstChildElement("encoding")
550-
:ToElement()
547+
local information_element = tinyxml2.XMLHandle(score_partwise):FirstChildElement("identification"):ToElement()
548+
local encoding_element = tinyxml2.XMLHandle(information_element):FirstChildElement("encoding"):ToElement()
549+
551550
local software_element = encoding_element and encoding_element:FirstChildElement("software")
552551
local encoding_date_element = encoding_element and encoding_element:FirstChildElement("encoding-date")
553552
if abort_if(not software_element or not encoding_date_element, "missing required element 'software' and/or 'encoding-date'") then
@@ -561,9 +560,9 @@ function process_one_file(path, full_file_name)
561560
finaleplugin.Version .. " for " .. (finenv.UI():IsOnMac() and "Mac" or "Windows"))
562561
local original_encoding_date = encoding_date_element:GetText()
563562
encoding_date_element:SetText(os.date("%Y-%m-%d"))
564-
local miscellaneous_element = encoding_element:FirstChildElement("miscellaneous")
563+
local miscellaneous_element = information_element:FirstChildElement("miscellaneous")
565564
if not miscellaneous_element then
566-
miscellaneous_element = encoding_element:InsertNewChildElement("miscellaneous")
565+
miscellaneous_element = information_element:InsertNewChildElement("miscellaneous")
567566
end
568567
local function insert_miscellaneous_field(name, value)
569568
local element = miscellaneous_element:InsertNewChildElement("miscellaneous-field")

0 commit comments

Comments
 (0)