line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# $Id$ |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# remote::msoffice Brik |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
package Metabrik::Remote::Msoffice; |
7
|
1
|
|
|
1
|
|
636
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
8
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
5
|
use base qw(Metabrik::Remote::Winexe); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
285
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub brik_properties { |
13
|
|
|
|
|
|
|
return { |
14
|
0
|
|
|
0
|
1
|
|
revision => '$Revision$', |
15
|
|
|
|
|
|
|
tags => [ qw(unstable) ], |
16
|
|
|
|
|
|
|
author => 'GomoR ', |
17
|
|
|
|
|
|
|
license => 'http://opensource.org/licenses/BSD-3-Clause', |
18
|
|
|
|
|
|
|
attributes => { |
19
|
|
|
|
|
|
|
datadir => [ qw(datadir) ], |
20
|
|
|
|
|
|
|
host => [ qw(host) ], |
21
|
|
|
|
|
|
|
user => [ qw(username) ], |
22
|
|
|
|
|
|
|
password => [ qw(password) ], |
23
|
|
|
|
|
|
|
winword_exe_path => [ qw(path) ], |
24
|
|
|
|
|
|
|
}, |
25
|
|
|
|
|
|
|
attributes_default => { |
26
|
|
|
|
|
|
|
winword_exe_path => 'C:\Program Files (x86)\Microsoft Office\Office12\WINWORD.EXE', |
27
|
|
|
|
|
|
|
}, |
28
|
|
|
|
|
|
|
commands => { |
29
|
|
|
|
|
|
|
install => [ ], # Inherited |
30
|
|
|
|
|
|
|
open_word_document => [ qw(path) ], |
31
|
|
|
|
|
|
|
}, |
32
|
|
|
|
|
|
|
}; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub open_word_document { |
36
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
37
|
0
|
|
|
|
|
|
my ($doc) = @_; |
38
|
|
|
|
|
|
|
|
39
|
0
|
0
|
|
|
|
|
$self->brik_help_run_undef_arg('open_word_document', $doc) or return; |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
my $winword_exe_path = $self->winword_exe_path; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
# winexe -UUSER%PASS //IP '"C:\Program Files (x86)\Microsoft Office\Office12\WINWORD.EXE" "test.docx"' |
44
|
0
|
|
|
|
|
|
return $self->execute("'\"$winword_exe_path\" \"$doc\"'"); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
__END__ |