diff options
Diffstat (limited to 'admin/survey/export/latexclasses/Analize/AnalizaBreak.php')
-rw-r--r-- | admin/survey/export/latexclasses/Analize/AnalizaBreak.php | 219 |
1 files changed, 110 insertions, 109 deletions
diff --git a/admin/survey/export/latexclasses/Analize/AnalizaBreak.php b/admin/survey/export/latexclasses/Analize/AnalizaBreak.php index 3317de4..86064ab 100644 --- a/admin/survey/export/latexclasses/Analize/AnalizaBreak.php +++ b/admin/survey/export/latexclasses/Analize/AnalizaBreak.php @@ -2,41 +2,41 @@ global $site_path;
- include_once('../../function.php');
- include_once('../survey/definition.php');
+/* include_once('../../function.php');
+ include_once('../survey/definition.php'); */
- define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
- define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
+ if(!defined("ALLOW_HIDE_ZERRO_REGULAR"))define("ALLOW_HIDE_ZERRO_REGULAR", false); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za navadne odgovore
+ if(!defined("ALLOW_HIDE_ZERRO_MISSING"))define("ALLOW_HIDE_ZERRO_MISSING", true); // omogočimo delovanje prikazovanja/skrivanja ničelnih vnosti za missinge
- define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
- define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
+ if(!defined("NUM_DIGIT_AVERAGE"))define("NUM_DIGIT_AVERAGE", 2); // stevilo digitalnih mest za povprecje
+ if(!defined("NUM_DIGIT_DEVIATION"))define("NUM_DIGIT_DEVIATION", 2); // stevilo digitalnih mest za povprecje
- define("M_ANALIZA_DESCRIPTOR", "descriptor");
- define("M_ANALIZA_FREQUENCY", "frequency");
+ if(!defined("M_ANALIZA_DESCRIPTOR"))define("M_ANALIZA_DESCRIPTOR", "descriptor");
+ if(!defined("M_ANALIZA_FREQUENCY"))define("M_ANALIZA_FREQUENCY", "frequency");
- define("FNT_FREESERIF", "freeserif");
- define("FNT_FREESANS", "freesans");
- define("FNT_HELVETICA", "helvetica");
+ if(!defined("FNT_FREESERIF"))define("FNT_FREESERIF", "freeserif");
+ if(!defined("FNT_FREESANS"))define("FNT_FREESANS", "freesans");
+ if(!defined("FNT_HELVETICA"))define("FNT_HELVETICA", "helvetica");
- define("FNT_MAIN_TEXT", FNT_FREESANS);
- define("FNT_QUESTION_TEXT", FNT_FREESANS);
- define("FNT_HEADER_TEXT", FNT_FREESANS);
+ if(!defined("FNT_MAIN_TEXT"))define("FNT_MAIN_TEXT", FNT_FREESANS);
+ if(!defined("FNT_QUESTION_TEXT"))define("FNT_QUESTION_TEXT", FNT_FREESANS);
+ if(!defined("FNT_HEADER_TEXT"))define("FNT_HEADER_TEXT", FNT_FREESANS);
- define("FNT_MAIN_SIZE", 10);
- define("FNT_QUESTION_SIZE", 9);
- define("FNT_HEADER_SIZE", 10);
+ if(!defined("FNT_MAIN_SIZE"))define("FNT_MAIN_SIZE", 10);
+ if(!defined("FNT_QUESTION_SIZE"))define("FNT_QUESTION_SIZE", 9);
+ if(!defined("FNT_HEADER_SIZE"))define("FNT_HEADER_SIZE", 10);
- define("RADIO_BTN_SIZE", 3);
- define("CHCK_BTN_SIZE", 3);
- define("LINE_BREAK", 6);
+ if(!defined("RADIO_BTN_SIZE"))define("RADIO_BTN_SIZE", 3);
+ if(!defined("CHCK_BTN_SIZE"))define("CHCK_BTN_SIZE", 3);
+ if(!defined("LINE_BREAK"))define("LINE_BREAK", 6);
- define ('PDF_MARGIN_HEADER', 8);
- define ('PDF_MARGIN_FOOTER', 12);
- define ('PDF_MARGIN_TOP', 18);
- define ('PDF_MARGIN_BOTTOM', 18);
- define ('PDF_MARGIN_LEFT', 15);
- define ('PDF_MARGIN_RIGHT', 15);
+ if(!defined("PDF_MARGIN_HEADER"))define ('PDF_MARGIN_HEADER', 8);
+ if(!defined("PDF_MARGIN_FOOTER"))define ('PDF_MARGIN_FOOTER', 12);
+ if(!defined("PDF_MARGIN_TOP"))define ('PDF_MARGIN_TOP', 18);
+ if(!defined("PDF_MARGIN_BOTTOM"))define ('PDF_MARGIN_BOTTOM', 18);
+ if(!defined("PDF_MARGIN_LEFT"))define ('PDF_MARGIN_LEFT', 15);
+ if(!defined("PDF_MARGIN_RIGHT"))define ('PDF_MARGIN_RIGHT', 15);
/** Class za generacijo latex
@@ -346,7 +346,7 @@ class AnalizaBreak extends LatexAnalysisElement { //Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -359,14 +359,14 @@ class AnalizaBreak extends LatexAnalysisElement { // PRVA VRSTICA
$prvaVrstica = array();
- $prvaVrstica[] = $this->encodeText($forSpremenljivka['naslov'].' ('.$forSpremenljivka['variable'].')');
- //$prvaVrstica[] = $this->encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')');
- //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.$this->encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')').'}';
- //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.$this->encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).')').'}';
+ $prvaVrstica[] = LatexDocument::encodeText($forSpremenljivka['naslov'].' ('.$forSpremenljivka['variable'].')');
+ //$prvaVrstica[] = LatexDocument::encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')');
+ //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.LatexDocument::encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')').'}';
+ //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.LatexDocument::encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).')').'}';
if($this->export_format == 'pdf'){
- $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.$this->encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).')').'}';
+ $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.LatexDocument::encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).')').'}';
}elseif($this->export_format == 'rtf'){
- $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.$this->encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')').'}';
+ $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.LatexDocument::encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')').'}';
}
@@ -380,19 +380,19 @@ class AnalizaBreak extends LatexAnalysisElement { if ($tip != 1 && $tip != 3) {
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
foreach ($grid['variables'] AS $vkey => $variable) {
- $text = $this->encodeText($variable['naslov'].' ('.$variable['variable'].')');
+ $text = LatexDocument::encodeText($variable['naslov'].' ('.$variable['variable'].')');
$drugaVrstica[]=$text;
- $tretjaVrstica[] = $this->encodeText($lang['srv_analiza_crosstab_average']);
+ $tretjaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_crosstab_average']);
}
}
}
else if (count($spremenljivka['options']) < 15) {
//echo "options :".count($spremenljivka['options'])."</br>";
foreach ($spremenljivka['options'] AS $okey => $option) {
- //$this->pdf->MultiCell($singleWidth, $height, $this->encodeText($option.' ('.$okey.')'), 1, 'C', 0, 0, 0 ,0, true);
- $text = $this->encodeText($option.' ('.$okey.')');
+ //$this->pdf->MultiCell($singleWidth, $height, LatexDocument::encodeText($option.' ('.$okey.')'), 1, 'C', 0, 0, 0 ,0, true);
+ $text = LatexDocument::encodeText($option.' ('.$okey.')');
$drugaVrstica[]=$text;
- $tretjaVrstica[] = $this->encodeText($lang['srv_analiza_crosstab_average']);
+ $tretjaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_crosstab_average']);
}
//$this->pdf->MultiCell($singleWidth, $height, 'povprečje', 1, 'C', 0, 1, 0 ,0, true);
}
@@ -413,16 +413,16 @@ class AnalizaBreak extends LatexAnalysisElement { // VRSTICE S PODATKI
foreach ($frequencys AS $fkey => $fkeyFrequency) {
$podatkiVrstica = array();
- $podatkiVrstica[]=$this->encodeText($forSpremenljivka['options'][$fkey]); //naslov horizontalne vrstice
+ $podatkiVrstica[]=LatexDocument::encodeText($forSpremenljivka['options'][$fkey]); //naslov horizontalne vrstice
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
foreach ($grid['variables'] AS $vkey => $variable) {
if ($variable['other'] != 1) {
$sequence = $variable['sequence'];
if (($tip == 1 || $tip == 3) && count($spremenljivka['options']) < 15) {
foreach ($spremenljivka['options'] AS $okey => $option) {
- //$this->pdf->MultiCell($singleWidth, $height, $this->encodeText($frequencys[$fkey][$sequence]['valid'][$okey]['cnt']), 1, 'C', 0, 0, 0 ,0, true);
- $podatkiVrstica[]=$this->encodeText($frequencys[$fkey][$sequence]['valid'][$okey]['cnt']);
- //echo "podatkiVrstica 1 :".$this->encodeText($frequencys[$fkey][$sequence]['valid'][$okey]['cnt'])."</br>";
+ //$this->pdf->MultiCell($singleWidth, $height, LatexDocument::encodeText($frequencys[$fkey][$sequence]['valid'][$okey]['cnt']), 1, 'C', 0, 0, 0 ,0, true);
+ $podatkiVrstica[]=LatexDocument::encodeText($frequencys[$fkey][$sequence]['valid'][$okey]['cnt']);
+ //echo "podatkiVrstica 1 :".LatexDocument::encodeText($frequencys[$fkey][$sequence]['valid'][$okey]['cnt'])."</br>";
}
}
$podatkiVrstica[]=$this->formatNumber($means[$fkey][$sequence],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
@@ -435,7 +435,7 @@ class AnalizaBreak extends LatexAnalysisElement { //Izpis vrstic tabele - konec ##################
/*zakljucek latex tabele*/
- $tabela .= ($this->export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tabela .= ($this->export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
/*zaljucek latex tabele - konec */
//echo "tabela :".$tabela."</br>";
}elseif($presirokaTabela == 1){ //ce tabela je presiroka
@@ -477,7 +477,7 @@ class AnalizaBreak extends LatexAnalysisElement { //Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -490,11 +490,11 @@ class AnalizaBreak extends LatexAnalysisElement { // PRVA VRSTICA
$prvaVrstica = array();
- $prvaVrstica[] = $this->encodeText($forSpremenljivka['naslov'].' ('.$forSpremenljivka['variable'].')');
+ $prvaVrstica[] = LatexDocument::encodeText($forSpremenljivka['naslov'].' ('.$forSpremenljivka['variable'].')');
if($this->export_format == 'pdf'){
- $prvaVrstica[] = '\multicolumn{'.($steviloPodstolpcev-1).'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.$this->encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).')').'}';
+ $prvaVrstica[] = '\multicolumn{'.($steviloPodstolpcev-1).'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.LatexDocument::encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).')').'}';
}elseif($this->export_format == 'rtf'){
- $prvaVrstica[] = '\multicolumn{'.($steviloPodstolpcev-1).'}{c|}{'.$this->encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')').'}';
+ $prvaVrstica[] = '\multicolumn{'.($steviloPodstolpcev-1).'}{c|}{'.LatexDocument::encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')').'}';
}
// DRUGA IN TRETJA VRSTICA
@@ -508,10 +508,10 @@ class AnalizaBreak extends LatexAnalysisElement { if ($tip != 1 && $tip != 3) {
for($s=$indeksPodatkov; $s<($steviloPodstolpcev-1+$indeksPodatkovOld); $s++){
$grid = $spremenljivka['grids'][$s];
- $text = $this->encodeText($grid['variables'][0]['naslov'].' ('.$grid['variables'][0]['variable'].')');
+ $text = LatexDocument::encodeText($grid['variables'][0]['naslov'].' ('.$grid['variables'][0]['variable'].')');
//echo "grid podatek: ".$text."</br>";
$drugaVrstica[] = $text;
- $tretjaVrstica[] = $this->encodeText($lang['srv_analiza_crosstab_average']);
+ $tretjaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_crosstab_average']);
$indeksPodatkov = $s;
}
$indeksPodatkov = $indeksPodatkov + 1;
@@ -521,10 +521,10 @@ class AnalizaBreak extends LatexAnalysisElement { //echo "options :".count($spremenljivka['options'])."</br>";
//echo "znotraj </br>";
foreach ($spremenljivka['options'] AS $okey => $option) {
- //$this->pdf->MultiCell($singleWidth, $height, $this->encodeText($option.' ('.$okey.')'), 1, 'C', 0, 0, 0 ,0, true);
- $text = $this->encodeText($option.' ('.$okey.')');
+ //$this->pdf->MultiCell($singleWidth, $height, LatexDocument::encodeText($option.' ('.$okey.')'), 1, 'C', 0, 0, 0 ,0, true);
+ $text = LatexDocument::encodeText($option.' ('.$okey.')');
$drugaVrstica[]=$text;
- $tretjaVrstica[] = $this->encodeText($lang['srv_analiza_crosstab_average']);
+ $tretjaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_crosstab_average']);
}
//$this->pdf->MultiCell($singleWidth, $height, 'povprečje', 1, 'C', 0, 1, 0 ,0, true);
}
@@ -552,8 +552,8 @@ class AnalizaBreak extends LatexAnalysisElement { for($fkey=1; $fkey<=($steviloVrsticSPodatki); $fkey++){ //izpis vsake vrstice posebej
//echo "indeks freq: ".$fkey."</br>";
$podatkiVrstica = array();
- $podatkiVrstica[] = $this->encodeText($forSpremenljivka['options'][$fkey]); //naslov horizontalne vrstice
- //echo "debug text: ".$this->encodeText($forSpremenljivka['options'][$fkey])."</br>";
+ $podatkiVrstica[] = LatexDocument::encodeText($forSpremenljivka['options'][$fkey]); //naslov horizontalne vrstice
+ //echo "debug text: ".LatexDocument::encodeText($forSpremenljivka['options'][$fkey])."</br>";
//foreach ($spremenljivka['grids'] AS $gkey => $grid) {
for($s1=$indeksPodatkov1; $s1<($steviloPodstolpcev-1+$indeksPodatkovOld1); $s1++){
@@ -564,8 +564,8 @@ class AnalizaBreak extends LatexAnalysisElement { //echo "sdvsdv </br>";
/* if (($tip == 1 || $tip == 3) && count($spremenljivka['options']) < 15) {
foreach ($spremenljivka['options'] AS $okey => $option) {
- $podatkiVrstica[] = $this->encodeText($frequencys[$fkey][$sequence]['valid'][$okey]['cnt']);
- //echo "podatki Vrstica 1 :".$this->encodeText($frequencys[$fkey][$sequence]['valid'][$okey]['cnt'])."</br>";
+ $podatkiVrstica[] = LatexDocument::encodeText($frequencys[$fkey][$sequence]['valid'][$okey]['cnt']);
+ //echo "podatki Vrstica 1 :".LatexDocument::encodeText($frequencys[$fkey][$sequence]['valid'][$okey]['cnt'])."</br>";
}
} */
$podatkiVrstica[] = $this->formatNumber($means[$fkey][$sequence],SurveyDataSettingProfiles :: getSetting('NUM_DIGIT_AVERAGE'),'');
@@ -582,7 +582,7 @@ class AnalizaBreak extends LatexAnalysisElement { //Izpis vrstic tabele - konec ##################
/*zakljucek latex tabele*/
- $tabela .= ($this->export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tabela .= ($this->export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
/*zaljucek latex tabele - konec */
//echo "tabela :".$tabela."</br>";
@@ -601,12 +601,12 @@ class AnalizaBreak extends LatexAnalysisElement { foreach ($frequencys AS $fkey => $frequency) {
/* $this->pdf->setFont('','B','6');
- $this->pdf->MultiCell(200, 5, $this->encodeText('Tabela za: ('.$forSpremenljivka['variable'].') = '.$forSpremenljivka['options'][$fkey]), 0, 'L', 0, 1, 0 ,0, true); */
+ $this->pdf->MultiCell(200, 5, LatexDocument::encodeText('Tabela za: ('.$forSpremenljivka['variable'].') = '.$forSpremenljivka['options'][$fkey]), 0, 'L', 0, 1, 0 ,0, true); */
$text = $spremenljivka['naslov'].' ('.$spremenljivka['variable'].')';
$height = $this->getCellHeight($text, 260);
- //$this->pdf->MultiCell(260, $height, $this->encodeText($text), 1, 'C', 0, 1, 0 ,0, true);
+ //$this->pdf->MultiCell(260, $height, LatexDocument::encodeText($text), 1, 'C', 0, 1, 0 ,0, true);
//$this->pdf->setFont('','','6');
@@ -617,7 +617,7 @@ class AnalizaBreak extends LatexAnalysisElement { //$this->pdf->MultiCell(60, $height, '', 1, 'C', 0, 0, 0 ,0, true);
foreach ($spremenljivka['grids'][0]['variables'] AS $vkey => $variable) {
- //$this->pdf->MultiCell($singleWidth, $height, $this->encodeText($variable['naslov']), 1, 'C', 0, 0, 0 ,0, true);
+ //$this->pdf->MultiCell($singleWidth, $height, LatexDocument::encodeText($variable['naslov']), 1, 'C', 0, 0, 0 ,0, true);
}
//$this->pdf->MultiCell(1, $height,'', 0, 'C', 0, 1, 0 ,0, true);
@@ -626,7 +626,7 @@ class AnalizaBreak extends LatexAnalysisElement { $text = '('.$grid['variable'].') '.$grid['naslov'];
/* $height = $this->getCellHeight($text, 60);
- $this->pdf->MultiCell(60, $height, $this->encodeText($text), 1, 'C', 0, 0, 0 ,0, true); */
+ $this->pdf->MultiCell(60, $height, LatexDocument::encodeText($text), 1, 'C', 0, 0, 0 ,0, true); */
foreach ($grid['variables'] AS $vkey => $variable) {
$sequence = $variable['sequence'];
@@ -680,7 +680,8 @@ class AnalizaBreak extends LatexAnalysisElement { foreach ($spremenljivka['grids'] AS $gkey => $grid) {
// Izrisujemo samo 1 graf v creportu
- if($_GET['m'] == 'analysis_creport'){
+ $tmp_m = isset($_GET['m'])?$_GET['m'] : '';
+ if($tmp_m == 'analysis_creport'){
if($spremenljivka['break_sub_table']['key'] == $gkey){
//$this->displayChart($forSpr,$frequencys,$spremenljivka,$type = 'number');
@@ -713,25 +714,25 @@ class AnalizaBreak extends LatexAnalysisElement { $drugaVrstica[] = '';
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
foreach ($grid['variables'] AS $vkey => $variable) {
- $drugaVrstica[] = $this->encodeText($variable['naslov'].' ('.$variable['variable'].')');
+ $drugaVrstica[] = LatexDocument::encodeText($variable['naslov'].' ('.$variable['variable'].')');
}
}
// PRVA VRSTICA
$prvaVrstica = array();
- $prvaVrstica[] = $this->encodeText($forSpremenljivka['naslov'].' ('.$forSpremenljivka['variable'].')');
- //$prvaVrstica[] = $this->encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')'); //\multicolumn{".$steviloVmesnihStolpcevPodvrstic."}{X|}
+ $prvaVrstica[] = LatexDocument::encodeText($forSpremenljivka['naslov'].' ('.$forSpremenljivka['variable'].')');
+ //$prvaVrstica[] = LatexDocument::encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')'); //\multicolumn{".$steviloVmesnihStolpcevPodvrstic."}{X|}
$steviloPodstolpcev = count($drugaVrstica) - 1;
- //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.$this->encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')').'}';
+ //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.LatexDocument::encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')').'}';
//$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}
//{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}
- //{'.$this->encodeText($this->snippet($spremenljivka['naslov']).'('.$this->snippet($spremenljivka['variable']).')').'}';
+ //{'.LatexDocument::encodeText($this->snippet($spremenljivka['naslov']).'('.$this->snippet($spremenljivka['variable']).')').'}';
if($this->export_format == 'pdf'){
$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}
{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}
- {'.$this->encodeText($this->snippet($spremenljivka['naslov']).'('.$this->snippet($spremenljivka['variable']).')').'}';
+ {'.LatexDocument::encodeText($this->snippet($spremenljivka['naslov']).'('.$this->snippet($spremenljivka['variable']).')').'}';
}elseif($this->export_format == 'rtf'){
- $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.$this->encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')').'}';
+ $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.LatexDocument::encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].')').'}';
}
// TRETJA VRSTICA
@@ -739,7 +740,7 @@ class AnalizaBreak extends LatexAnalysisElement { $tretjaVrstica[] = '';
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
foreach ($grid['variables'] AS $vkey => $variable) {
- $tretjaVrstica[] = $this->encodeText($lang['srv_analiza_crosstab_average']);
+ $tretjaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_crosstab_average']);
}
}
@@ -766,7 +767,7 @@ class AnalizaBreak extends LatexAnalysisElement { //Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -794,7 +795,7 @@ class AnalizaBreak extends LatexAnalysisElement { //VRSTICE S PODATKI - priprava in izpis podatkov
foreach ($frequencys AS $fkey => $fkeyFrequency) {
$podatkiVrstica = array();
- $podatkiVrstica[]=$this->encodeText($forSpremenljivka['options'][$fkey]);
+ $podatkiVrstica[]=LatexDocument::encodeText($forSpremenljivka['options'][$fkey]);
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
foreach ($grid['variables'] AS $vkey => $variable) {
@@ -813,7 +814,7 @@ class AnalizaBreak extends LatexAnalysisElement { // dodamo še skupno sumo in povprečje
$sumaVrstica = array();
- $sumaVrstica[]=$this->encodeText($lang['srv_analiza_crosstab_skupaj']);
+ $sumaVrstica[]=LatexDocument::encodeText($lang['srv_analiza_crosstab_skupaj']);
foreach ($spremenljivka['grids'] AS $gkey => $grid) {
foreach ($grid['variables'] AS $vkey => $variable) {
@@ -832,7 +833,7 @@ class AnalizaBreak extends LatexAnalysisElement { //Izpis vrstic tabele - konec
/*zakljucek latex tabele*/
- $tabela .= ($this->export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tabela .= ($this->export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
/*zaljucek latex tabele - konec */
}
@@ -845,7 +846,7 @@ class AnalizaBreak extends LatexAnalysisElement { foreach ($spremenljivka['grids'] AS $gkey => $grid) {
//izpis opisnega besedila pred tabelo
- $tabela .= $this->encodeText('Tabela za: '.$spremenljivka['naslov'].' ('.$spremenljivka['variable'].') = '.$grid['naslov'].' ('.$grid['variable'].')');
+ $tabela .= LatexDocument::encodeText('Tabela za: '.$spremenljivka['naslov'].' ('.$spremenljivka['variable'].') = '.$grid['naslov'].' ('.$grid['variable'].')');
//$tabela .= $this->texNewLine;
//Priprava parametrov za tabelo
@@ -867,7 +868,7 @@ class AnalizaBreak extends LatexAnalysisElement { //Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -880,20 +881,20 @@ class AnalizaBreak extends LatexAnalysisElement { // PRVA VRSTICA
$prvaVrstica = array();
- $prvaVrstica[] = $this->encodeText($forSpremenljivka['naslov'].' ('.$forSpremenljivka['variable'].')');
- //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.$this->encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
- //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.$this->encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
+ $prvaVrstica[] = LatexDocument::encodeText($forSpremenljivka['naslov'].' ('.$forSpremenljivka['variable'].')');
+ //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.LatexDocument::encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
+ //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.LatexDocument::encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
if($this->export_format == 'pdf'){
- $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.$this->encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
+ $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.LatexDocument::encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
}elseif($this->export_format == 'rtf'){
- $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.$this->encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
+ $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.LatexDocument::encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
}
// DRUGA VRSTICA
$drugaVrstica = array();
$drugaVrstica[]='';
foreach ($grid['variables'] AS $vkey => $variable) {
- $text = $this->encodeText($variable['naslov'].' ('.$variable['variable'].')');
+ $text = LatexDocument::encodeText($variable['naslov'].' ('.$variable['variable'].')');
$drugaVrstica[]=$text;
}
@@ -901,7 +902,7 @@ class AnalizaBreak extends LatexAnalysisElement { $tretjaVrstica = array();
$tretjaVrstica[] = '';
foreach ($grid['variables'] AS $vkey => $variable) {
- $tretjaVrstica[] = $this->encodeText($lang['srv_analiza_crosstab_average']);
+ $tretjaVrstica[] = LatexDocument::encodeText($lang['srv_analiza_crosstab_average']);
}
//Izpis vrstic tabele
@@ -920,9 +921,9 @@ class AnalizaBreak extends LatexAnalysisElement { // VRSTICE Z VSEBINO
foreach ($forSpremenljivka['options'] AS $okey => $option) {
$podatkiVrstica = array();
- $podatkiVrstica[]=$this->encodeText($option);
+ $podatkiVrstica[]=LatexDocument::encodeText($option);
//$height = $this->getCellHeight($option, 60);
- //$this->pdf->MultiCell(60, $height, $this->encodeText($option), 1, 'C', 0, 0, 0 ,0, true);
+ //$this->pdf->MultiCell(60, $height, LatexDocument::encodeText($option), 1, 'C', 0, 0, 0 ,0, true);
foreach ($grid['variables'] AS $vkey => $variable) {
$sequence = $variable['sequence'];
@@ -939,7 +940,7 @@ class AnalizaBreak extends LatexAnalysisElement { // dodamo še skupno sumo in povprečje
$sumaVrstica = array();
- $sumaVrstica[]=$this->encodeText($lang['srv_analiza_crosstab_skupaj']);
+ $sumaVrstica[]=LatexDocument::encodeText($lang['srv_analiza_crosstab_skupaj']);
foreach ($grid['variables'] AS $vkey => $variable) {
$sequence = $variable['sequence'];
@@ -955,7 +956,7 @@ class AnalizaBreak extends LatexAnalysisElement { //Izpis vrstic tabele - konec
/*zakljucek latex tabele*/
- $tabela .= ($this->export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tabela .= ($this->export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
/*zaljucek latex tabele - konec */
}
}
@@ -996,7 +997,7 @@ class AnalizaBreak extends LatexAnalysisElement { foreach ($spremenljivka['grids'] AS $gkey => $grid) {
//izpis opisnega besedila pred tabelo
- $tabela .= $this->encodeText('Tabela za: '.$spremenljivka['naslov'].' ('.$spremenljivka['variable'].') = '.$grid['naslov'].' ('.$grid['variable'].')');
+ $tabela .= LatexDocument::encodeText('Tabela za: '.$spremenljivka['naslov'].' ('.$spremenljivka['variable'].') = '.$grid['naslov'].' ('.$grid['variable'].')');
//Priprava parametrov za tabelo
$steviloStolpcevParameterTabular = $steviloPodstolpcev+1;
@@ -1019,7 +1020,7 @@ class AnalizaBreak extends LatexAnalysisElement { //Priprava parametrov za tabelo - konec
//zacetek latex tabele z obrobo za prvo tabelo
- $pdfTable = 'tabularx';
+ $pdfTable = 'xltabular';
$rtfTable = 'tabular';
$pdfTableWidth = 1;
$rtfTableWidth = 1;
@@ -1033,20 +1034,20 @@ class AnalizaBreak extends LatexAnalysisElement { // PRVA VRSTICA
$prvaVrstica = array();
- $prvaVrstica[] = $this->encodeText($forSpremenljivka['naslov'].' ('.$forSpremenljivka['variable'].')');
- //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.$this->encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
- //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.$this->encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).') - '.$this->snippet($grid['naslov']).' ('.$this->snippet($grid['variable']).')').'}';
+ $prvaVrstica[] = LatexDocument::encodeText($forSpremenljivka['naslov'].' ('.$forSpremenljivka['variable'].')');
+ //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.LatexDocument::encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
+ //$prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.LatexDocument::encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).') - '.$this->snippet($grid['naslov']).' ('.$this->snippet($grid['variable']).')').'}';
if($this->export_format == 'pdf'){
- $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.$this->encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).') - '.$this->snippet($grid['naslov']).' ('.$this->snippet($grid['variable']).')').'}';
+ $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{>{\hsize=\dimexpr '.($steviloPodstolpcev).'\hsize + '.($steviloPodstolpcev).'\tabcolsep + \arrayrulewidth}X|}{'.LatexDocument::encodeText($this->snippet($spremenljivka['naslov']).' ('.$this->snippet($spremenljivka['variable']).') - '.$this->snippet($grid['naslov']).' ('.$this->snippet($grid['variable']).')').'}';
}elseif($this->export_format == 'rtf'){
- $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.$this->encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
+ $prvaVrstica[] = '\multicolumn{'.$steviloPodstolpcev.'}{c|}{'.LatexDocument::encodeText($spremenljivka['naslov'].' ('.$spremenljivka['variable'].') - '.$grid['naslov'].' ('.$grid['variable'].')').'}';
}
// DRUGA VRSTICA
$drugaVrstica = array();
$drugaVrstica[]='';
foreach ($grid['variables'] AS $vkey => $variable) {
- $text = $this->encodeText($variable['naslov'].' ('.$variable['variable'].')');
+ $text = LatexDocument::encodeText($variable['naslov'].' ('.$variable['variable'].')');
$drugaVrstica[]=$text;
}
@@ -1062,10 +1063,10 @@ class AnalizaBreak extends LatexAnalysisElement { // VRSTICE Z VSEBINO
foreach ($forSpremenljivka['options'] AS $okey => $option) {
$podatkiVrstica = array();
- $podatkiVrstica[]=$this->encodeText($option);
+ $podatkiVrstica[]=LatexDocument::encodeText($option);
// Izrisemo vrstico
- //$this->pdf->MultiCell(60, $height, $this->encodeText($option), 1, 'C', 0, 0, 0 ,0, true);
+ //$this->pdf->MultiCell(60, $height, LatexDocument::encodeText($option), 1, 'C', 0, 0, 0 ,0, true);
foreach ($grid['variables'] AS $vkey => $variable) {
$sequence = $variable['sequence'];
if (count($texts[$okey][$sequence]) > 0) {
@@ -1075,8 +1076,8 @@ class AnalizaBreak extends LatexAnalysisElement { $text .= $units['text']."; ";
}
$text = substr($text,0,-2);
- $podatkiVrstica[]=$this->encodeText($text);
- //$this->pdf->MultiCell($singleWidth, $height, $this->encodeText($text), 1, 'C', 0, 0, 0 ,0, true);
+ $podatkiVrstica[]=LatexDocument::encodeText($text);
+ //$this->pdf->MultiCell($singleWidth, $height, LatexDocument::encodeText($text), 1, 'C', 0, 0, 0 ,0, true);
}
else{
//$this->pdf->MultiCell($singleWidth, $height, '', 1, 'C', 0, 0, 0 ,0, true);
@@ -1088,7 +1089,7 @@ class AnalizaBreak extends LatexAnalysisElement { //Izpis vrstic tabele - konec
/*zakljucek latex tabele*/
- $tabela .= ($this->export_format == 'pdf' ? "\\end{tabularx}" : "\\end{tabular}");
+ $tabela .= ($this->export_format == 'pdf' ? "\\end{xltabular}" : "\\end{tabular}");
/*zaljucek latex tabele - konec */
}
return $tabela;
@@ -1125,7 +1126,7 @@ class AnalizaBreak extends LatexAnalysisElement { if ($spremenljivka['tip'] != 6) {
$text .= ' ('.$grid['variable'].')';
}
- $tabela .= $this->encodeText($text);
+ $tabela .= LatexDocument::encodeText($text);
}
$seq2 = $grid['variables'][0]['sequence'];
@@ -1205,10 +1206,10 @@ class AnalizaBreak extends LatexAnalysisElement { }
}
- $boldedTitle = $this->returnBold($this->encodeText($title)).$this->texNewLine; //vrni boldan naslov in skoci v novo vrstico
+ $boldedTitle = $this->returnBold(LatexDocument::encodeText($title)).$this->texNewLine; //vrni boldan naslov in skoci v novo vrstico
$boldedSubTitle = '';
if($spremenljivka['tip'] == 20 || $spremenljivka['tip'] == 16 || $spremenljivka['tip'] == 6){
- $boldedSubTitle = $this->returnBold($this->encodeText($subtitle)).$this->texNewLine; //vrni boldan naslov in skoci v novo vrstico
+ $boldedSubTitle = $this->returnBold(LatexDocument::encodeText($subtitle)).$this->texNewLine; //vrni boldan naslov in skoci v novo vrstico
}
if($imgName){
@@ -1217,7 +1218,7 @@ class AnalizaBreak extends LatexAnalysisElement { $texImageOnly = $lang['srv_export_no_chart'];
}
- $texImage .= $this->returnCentered($boldedTitle.$boldedSubTitle.$texImageOnly); //vrni sredinsko poravnana naslov in slika
+ $texImage = $this->returnCentered($boldedTitle.$boldedSubTitle.$texImageOnly); //vrni sredinsko poravnana naslov in slika
return $texImage;
}
@@ -1246,7 +1247,7 @@ class AnalizaBreak extends LatexAnalysisElement { //izrisemo frekvence
if($frekvence == 1){
- $this->pdf->MultiCell($width, $height, $this->encodeText($data[$i]), 1, 'C', 0, 1, 0 ,0, true);
+ $this->pdf->MultiCell($width, $height, LatexDocument::encodeText($data[$i]), 1, 'C', 0, 1, 0 ,0, true);
$i++;
}
@@ -1256,10 +1257,10 @@ class AnalizaBreak extends LatexAnalysisElement { $singleWidth = round($width/$numColumnPercent);
for($j=1; $j<$numColumnPercent; $j++){
- $this->pdf->MultiCell($singleWidth, $height, $this->encodeText($data[$i]), 1, 'C', 0, 0, 0 ,0, true);
+ $this->pdf->MultiCell($singleWidth, $height, LatexDocument::encodeText($data[$i]), 1, 'C', 0, 0, 0 ,0, true);
$i++;
}
- $this->pdf->MultiCell($width - (($numColumnPercent-1)*$singleWidth), $height, $this->encodeText($data[$i]), 1, 'C', 0, 1, 0 ,0, true);
+ $this->pdf->MultiCell($width - (($numColumnPercent-1)*$singleWidth), $height, LatexDocument::encodeText($data[$i]), 1, 'C', 0, 1, 0 ,0, true);
$i++;
}
@@ -1269,10 +1270,10 @@ class AnalizaBreak extends LatexAnalysisElement { $singleWidth = round($width/$numColumnResidual);
for($j=1; $j<$numColumnResidual; $j++){
- $this->pdf->MultiCell($singleWidth, $height, $this->encodeText($data[$i]), 1, 'C', 0, 0, 0 ,0, true);
+ $this->pdf->MultiCell($singleWidth, $height, LatexDocument::encodeText($data[$i]), 1, 'C', 0, 0, 0 ,0, true);
$i++;
}
- $this->pdf->MultiCell($width - (($numColumnResidual-1)*$singleWidth), $height, $this->encodeText($data[$i]), 1, 'C', 0, 1, 0 ,0, true);
+ $this->pdf->MultiCell($width - (($numColumnResidual-1)*$singleWidth), $height, LatexDocument::encodeText($data[$i]), 1, 'C', 0, 1, 0 ,0, true);
$i++;
}
|