change test to use Calibri instead of Cambria
[LibreOffice.git] / sd / res / webview / savepic.pl
blob3502312e50676a6c0689c4f446a21c0c14a5eec7
1 #!/usr/bin/env perl
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 # This file incorporates work covered by the following license notice:
11 # Licensed to the Apache Software Foundation (ASF) under one or more
12 # contributor license agreements. See the NOTICE file distributed
13 # with this work for additional information regarding copyright
14 # ownership. The ASF licenses this file to you under the Apache
15 # License, Version 2.0 (the "License"); you may not use this file
16 # except in compliance with the License. You may obtain a copy of
17 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 require "common.pl";
22 %aRequestMap = common::HTTP_getRequest();
24 # get new picture
25 $sCurrPic = $aRequestMap{ "CurrPic" };
27 @aPictureArray = common::File_read( "picture.txt" );
28 $nPictureArrayLen = @aPictureArray;
30 # check if + or - was pressed
31 if( $aRequestMap{ "Auswahl" } eq "+" )
33 $sCurrPic = abs( $sCurrPic ) + 1;
36 if( $aRequestMap{ "Auswahl" } eq "-" )
38 $sCurrPic = abs( $sCurrPic ) - 1;
41 # save picture name
42 if( (abs( $sCurrPic ) > 0) && ( abs( $sCurrPic ) < ( $nPictureArrayLen ) ) )
44 open( F_CURRPIC, ">currpic.txt");
45 print F_CURRPIC abs( $sCurrPic );
46 close( F_CURRPIC );
49 # return to edit page
50 print "Content-type: text/html\n\n";
51 print "<HTML>\n<HEAD>\n";
52 print "<META http-equiv=\"refresh\" CONTENT=\"0 ;URL=editpic.pl\">";
53 print "<title>savepic.pl</title>";
54 print "</HEAD>\n";
55 print "<BODY>\n";
56 print "</BODY>\n";
57 print "</HTML>\n";