diff options
-rw-r--r-- | CHANGELOG_v2 | 3 | ||||
-rw-r--r-- | data/doc/sisu/v2/CHANGELOG | 3 | ||||
-rw-r--r-- | lib/sisu/v2/odf.rb | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/CHANGELOG_v2 b/CHANGELOG_v2 index d1fb5136..67439f8a 100644 --- a/CHANGELOG_v2 +++ b/CHANGELOG_v2 @@ -23,6 +23,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.4.orig.tar.gz * texpdf, scaling of images (below the set maximum size), fix (requested fix) + * odf:odt, incorporation and scaling of images, fix + (requested fix) + %% 2.7.3.orig.tar.gz (2010-10-06:40/3) http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.3.orig.tar.gz 01da42186d8b7381356739ef612221b55e93c9a4f94c431744f8bdb123fd8f15 2744721 sisu_2.7.3.orig.tar.gz diff --git a/data/doc/sisu/v2/CHANGELOG b/data/doc/sisu/v2/CHANGELOG index 9c98d229..d2990379 100644 --- a/data/doc/sisu/v2/CHANGELOG +++ b/data/doc/sisu/v2/CHANGELOG @@ -23,6 +23,9 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.4.orig.tar.gz * texpdf, scaling of images (below the set maximum size), fix (requested fix) + * odf:odt, incorporation and scaling of images, fix + (requested fix) + %% 2.7.3.orig.tar.gz (2010-10-06:40/3) http://www.jus.uio.no/sisu/pkg/src/sisu_2.7.3.orig.tar.gz 01da42186d8b7381356739ef612221b55e93c9a4f94c431744f8bdb123fd8f15 2744721 sisu_2.7.3.orig.tar.gz diff --git a/lib/sisu/v2/odf.rb b/lib/sisu/v2/odf.rb index bb071683..41229249 100644 --- a/lib/sisu/v2/odf.rb +++ b/lib/sisu/v2/odf.rb @@ -197,7 +197,7 @@ module SiSU_ODF m,u=img[1],img[2] i=/^(\S+?\.(?:png|jpg|gif))/.match(m).captures.join if m =~/^(\S+?\.(?:png|jpg|gif))/ c=/^\S+?\.(?:png|jpg|gif)\s+.+?"(.*?)"/.match(m).captures.join if m =~/^\S+?\.(?:png|jpg|gif)\s+.+?"(.*?)"/ - w,h=/(\d+)x(\d+)/.match(m).captures if m =~/\d+x\d+/ + w,h=/\s(\d+)x(\d+)/.match(m).captures if m =~/\s\d+x\d+/ w=(w.to_i/37.79485).to_s h=(h.to_i/37.79485).to_s h=/([0-9]+\.\d{0,3})/.match(h).captures.join @@ -225,7 +225,8 @@ module SiSU_ODF cont.gsub!(/([)(\]\[])/,"\\\\\\1") cont.gsub!(/([+?])/,"\\\\\\1") # incorrect handling of + url.gsub!(/([+?])/,"\\\\\\1") - dob.obj.sub!(/#{Mx[:lnk_o]}[ ]*#{cont}[ ]*#{Mx[:lnk_c]}#{Mx[:url_o]}#{url}#{Mx[:url_c]}/m,image_odf(i)) #watch + dob.obj.sub!(/#{Mx[:lnk_o]}[ ]*#{cont}[ ]*#{Mx[:lnk_c]}image/m,image_odf(i)) + dob.obj.sub!(/#{Mx[:lnk_o]}[ ]*#{cont}[ ]*#{Mx[:lnk_c]}#{Mx[:url_o]}#{url}#{Mx[:url_c]}/m,image_odf(i)) dob.obj.gsub!(/\\([)(\]\[?])/,'\1') #clumsy fix end m=nil |