forked from KolibriOS/kolibrios
View3DS: support kpacked files
WebView: DOCX support git-svn-id: svn://kolibrios.org@7788 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
6bc343bd07
commit
7ff31d4724
@ -8,6 +8,7 @@ rtf=3
|
||||
log=3
|
||||
dic=3
|
||||
doc=3
|
||||
docx=3
|
||||
exc=3
|
||||
wtx=3
|
||||
inf=3
|
||||
@ -225,8 +226,8 @@ obj=92
|
||||
dll=92
|
||||
skn=80
|
||||
kex=88
|
||||
rft=85
|
||||
rft=85
|
||||
kf=118
|
||||
mgb=121
|
||||
txt=122
|
||||
txt=122
|
||||
rtf=122
|
||||
docx=122
|
||||
|
@ -27,16 +27,17 @@ skn=/sys/skincfg
|
||||
lap=/sys/media/listplay
|
||||
asf=/sys/media/listplay
|
||||
m3u=/sys/media/AC97SND
|
||||
wav=/sys/media/AC97SND
|
||||
wav=/sys/media/pixie
|
||||
mp3=/sys/media/pixie
|
||||
xm=/sys/media/AC97SND
|
||||
xm=/sys/media/pixie
|
||||
mid=/sys/media/MIDAMP
|
||||
cvs=/sys/graph
|
||||
obj=/sys/develop/cObj
|
||||
htm=/sys/network/WebView
|
||||
html=/sys/network/WebView
|
||||
fb2=/sys/fb2read
|
||||
mht=/sys/network/WebView
|
||||
docx=/sys/network/WebView
|
||||
fb2=/sys/fb2read
|
||||
kla=/sys/games/klavisha
|
||||
pdf=/kolibrios/media/updf
|
||||
avi=/kolibrios/media/fplay_run
|
||||
|
@ -172,9 +172,9 @@ tif /sys/media/kiv
|
||||
tiff /sys/media/kiv
|
||||
wbmp /sys/media/kiv
|
||||
m3u /sys/media/ac97snd
|
||||
wav /sys/media/ac97snd
|
||||
wav /sys/media/pixie
|
||||
mp3 /sys/media/pixie
|
||||
xm /sys/media/ac97snd
|
||||
xm /sys/media/pixie
|
||||
mid /sys/media/midamp
|
||||
rtf /sys/rtfread
|
||||
3ds /sys/3d/view3ds
|
||||
@ -211,6 +211,7 @@ obj /sys/develop/cObj
|
||||
htm /sys/network/WebView
|
||||
html /sys/network/WebView
|
||||
mht /sys/network/WebView
|
||||
docx /sys/network/WebView
|
||||
fb2 /sys/fb2read
|
||||
kla /sys/games/klavisha
|
||||
bin /sys/develop/heed
|
||||
|
@ -13,6 +13,10 @@ exec=/sys/txtread
|
||||
icon=85
|
||||
next=$HexEditor
|
||||
|
||||
[Run]
|
||||
exec=/sys/run
|
||||
icon=55
|
||||
|
||||
[FB2Read]
|
||||
exec=/sys/fb2read
|
||||
icon=44
|
||||
@ -92,6 +96,7 @@ fb2=$FB2Read
|
||||
htm=$WebView
|
||||
html=$WebView
|
||||
mht=$WebView
|
||||
docx=$WebView
|
||||
|
||||
avi=$FPlay
|
||||
mkv=$FPlay
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 7.3 KiB |
@ -89,7 +89,7 @@ enum {
|
||||
#include "tabs.h"
|
||||
|
||||
char default_dir[] = "/rd/1";
|
||||
od_filter filter2 = { 16, "TXT\0HTM\0HTML\0\0" };
|
||||
od_filter filter2 = { 22, "TXT\0HTM\0HTML\0DOCX\0\0" };
|
||||
|
||||
char editURL[URL_SIZE+1];
|
||||
edit_box address_box = {, PADDING+TSZE*2+PADDING+6, PADDING+3, 0xffffff,
|
||||
@ -519,6 +519,7 @@ bool GetLocalFileData(dword _path)
|
||||
void OpenPage(dword _open_URL)
|
||||
{
|
||||
char new_url[URL_SIZE+1];
|
||||
int unz_id;
|
||||
|
||||
StopLoading();
|
||||
|
||||
@ -571,6 +572,13 @@ void OpenPage(dword _open_URL)
|
||||
}
|
||||
} else {
|
||||
//LOCAL PAGE
|
||||
if (UrlExtIs(#new_url,".docx")) {
|
||||
DeleteFile("/tmp0/1/temp/word/document.xml");
|
||||
CreateDir("/tmp0/1/temp");
|
||||
unz_id = RunProgram("/sys/unz", sprintf(#param, "-o \"/tmp0/1/temp\" -h \"%s\"", #new_url));
|
||||
while (GetProcessSlot(unz_id)) pause(2);
|
||||
strcpy(#new_url, "/tmp0/1/temp/word/document.xml");
|
||||
}
|
||||
if (!GetLocalFileData(#new_url)) {
|
||||
LoadInternalPage(#page_not_found, sizeof(page_not_found));
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
char version[]="WebView 2.41";
|
||||
char version[]="WebView 2.45";
|
||||
|
||||
#ifdef LANG_RUS
|
||||
char page_not_found[] = FROM "html\\page_not_found_ru.htm""\0";
|
||||
|
@ -1,7 +1,7 @@
|
||||
struct od_filter
|
||||
{
|
||||
dword size; //size = len(#ext) + sizeof(dword)
|
||||
char ext[16];
|
||||
char ext[25];
|
||||
};
|
||||
|
||||
proc_info pr_inf;
|
||||
|
@ -344,7 +344,7 @@ base_vector:
|
||||
if Ext=SSE2
|
||||
db ' (SSE2)'
|
||||
end if
|
||||
db ' 0.068',0
|
||||
db ' 0.069',0
|
||||
labellen:
|
||||
STRdata db '-1 '
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
; application : View3ds ver. 0.068b - tiny .3ds and .asc files viewer
|
||||
; application : View3ds ver. 0.069 - tiny .3ds and .asc files viewer
|
||||
; with a few graphics effects demonstration.
|
||||
; compiler : FASM
|
||||
; system : KolibriOS
|
||||
@ -3379,34 +3379,55 @@ end if
|
||||
read_from_disk:
|
||||
if USE_LFN
|
||||
;-
|
||||
mov eax, 70
|
||||
mov ebx, file_info
|
||||
mov dword[ebx], 5 ; -> subfunction number
|
||||
int 0x40 ; -> read file size
|
||||
mov ebx, [fptr]
|
||||
mov ebx, dword[ebx+32]
|
||||
inc ebx
|
||||
mov [fsize], ebx
|
||||
|
||||
mov eax, 68
|
||||
mov ebx, 11
|
||||
int 0x40 ; -> create heap
|
||||
int 0x40 ; -> init heap
|
||||
|
||||
mov eax, 68
|
||||
mov ebx, 12
|
||||
mov ecx, [fsize]
|
||||
int 0x40 ; -> allocate memory for file
|
||||
mov [fptr], eax ; -> eax = pointer to allocated mem
|
||||
;mov eax, 70
|
||||
;mov ebx, file_info
|
||||
;mov dword[ebx], 5 ; -> subfunction number
|
||||
;int 0x40 ; -> read file size
|
||||
;mov ebx, [fptr]
|
||||
;mov ebx, dword[ebx+32]
|
||||
;inc ebx
|
||||
;mov [fsize], ebx
|
||||
|
||||
mov eax, 70
|
||||
mov ebx, file_info
|
||||
mov dword[ebx],0
|
||||
int 0x40 ; -> read file
|
||||
;mov eax, 68
|
||||
;mov ebx, 12
|
||||
;mov ecx, [fsize]
|
||||
;int 0x40 ; -> allocate memory for file
|
||||
;mov [fptr], eax ; -> eax = pointer to allocated mem
|
||||
|
||||
mov [fsize],ebx
|
||||
cmp eax,6
|
||||
jnz @f
|
||||
xor eax,eax ;;;;---
|
||||
;mov eax, 70
|
||||
;mov ebx, file_info
|
||||
;mov dword[ebx],0
|
||||
;int 0x40 ; -> read file
|
||||
|
||||
;mov [fsize],ebx
|
||||
;cmp eax,6
|
||||
;jnz @f
|
||||
;xor eax,eax ;;;;---
|
||||
|
||||
;cmp eax,6
|
||||
;jnz @f
|
||||
;xor eax,eax ;;;;---
|
||||
|
||||
;load kpacked files by Leency
|
||||
|
||||
mov eax,68
|
||||
mov ebx,27
|
||||
mov ecx,I_Param
|
||||
int 0x40
|
||||
|
||||
mov [fsize],edx
|
||||
mov [file_info+16],eax
|
||||
|
||||
test eax,eax
|
||||
jnz .open_opened_well
|
||||
mov eax,6 ;otherwise => failed
|
||||
jmp @f
|
||||
.open_opened_well:
|
||||
xor eax,eax
|
||||
@@:
|
||||
else
|
||||
mov eax,58
|
||||
|
Loading…
Reference in New Issue
Block a user