Commit b8060d03 authored by Ivan Ilin's avatar Ivan Ilin

Merge branch 'master' of github.com:Sankore/Sankore-3.1

parents 8764f0b7 70a204a9
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
]>
<svg version="1.0" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1206.59px"
height="1121.583px" viewBox="0 0 1206.59 1121.583" enable-background="new 0 0 1206.59 1121.583" xml:space="preserve">
<switch>
<g i:extraneous="self">
<g id="Arrière-plan">
</g>
<g id="Guides">
</g>
<g id="Premier_plan">
<g>
<g>
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="1140.2407" y1="51.2153" x2="451.9729" y2="733.2268">
<stop offset="0" style="stop-color:#FFFFFF"/>
<stop offset="1" style="stop-color:#EDFFFF"/>
</linearGradient>
<polygon fill-rule="evenodd" clip-rule="evenodd" fill="url(#SVGID_1_)" points="1131.978,56.837 1132.222,707.661
480.173,707.801 480.168,56.788 "/>
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="10.6201" y1="413.2202" x2="480.0916" y2="706.8041">
<stop offset="0" style="stop-color:#FFFFFF"/>
<stop offset="1" style="stop-color:#FFF5FF"/>
</linearGradient>
<polygon fill-rule="evenodd" clip-rule="evenodd" fill="url(#SVGID_2_)" points="44.015,433.498 44.26,1084.322
480.173,707.801 480.168,56.788 "/>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="705.7593" y1="1093.8228" x2="472.1647" y2="699.6325">
<stop offset="0" style="stop-color:#FFFFFF"/>
<stop offset="1" style="stop-color:#FFFFDC"/>
</linearGradient>
<polygon fill-rule="evenodd" clip-rule="evenodd" fill="url(#SVGID_3_)" points="699.716,1084.131 44.26,1084.322
480.173,707.801 1132.434,707.058 "/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="480.333" y1="707.702" x2="38.006" y2="1089.623"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="480.19" y1="707.802" x2="1187.203" y2="707.758"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="480.172" y1="707.814" x2="480.172" y2="9.556"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="436.565" y1="745.475" x2="436.565" y2="74.479"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="392.884" y1="783.2" x2="392.884" y2="111.872"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="349.209" y1="820.917" x2="349.209" y2="149.261"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="305.534" y1="858.635" x2="305.534" y2="186.649"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="261.859" y1="896.355" x2="261.859" y2="224.039"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="218.185" y1="934.073" x2="218.185" y2="261.427"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="174.51" y1="971.791" x2="174.51" y2="298.815"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="130.834" y1="1009.508" x2="130.834" y2="336.203"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="87.16" y1="1047.226" x2="87.16" y2="373.592"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="524.78" y1="707.696" x2="524.78" y2="34.299"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="568.194" y1="707.649" x2="568.194" y2="34.18"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="611.597" y1="707.604" x2="611.597" y2="34.062"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="655" y1="707.558" x2="655" y2="33.945"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="698.403" y1="707.511" x2="698.403" y2="33.826"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="741.806" y1="707.465" x2="741.806" y2="33.708"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="785.199" y1="707.42" x2="785.199" y2="33.589"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="828.602" y1="707.375" x2="828.602" y2="33.471"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="872.016" y1="707.327" x2="872.016" y2="33.353"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="915.419" y1="707.284" x2="915.419" y2="33.234"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="958.824" y1="707.237" x2="958.824" y2="33.116"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="1002.215" y1="707.191" x2="1002.215" y2="32.998"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="1045.618" y1="707.145" x2="1045.618" y2="32.88"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="1089.021" y1="707.1" x2="1089.021" y2="32.762"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="1132.426" y1="707.054" x2="1132.426" y2="32.644"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.6397" stroke-miterlimit="3.8637" x1="524.887" y1="707.726" x2="76.231" y2="1098.628"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.6397" stroke-miterlimit="3.8637" x1="568.294" y1="707.678" x2="119.638" y2="1098.58"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.6397" stroke-miterlimit="3.8637" x1="611.69" y1="707.631" x2="163.035" y2="1098.534"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.6397" stroke-miterlimit="3.8637" x1="655.086" y1="707.583" x2="206.43" y2="1098.487"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="698.484" y1="707.536" x2="249.827" y2="1098.436"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.6397" stroke-miterlimit="3.8637" x1="741.879" y1="707.487" x2="293.223" y2="1098.389"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.6397" stroke-miterlimit="3.8637" x1="785.265" y1="707.441" x2="336.608" y2="1098.34"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.6397" stroke-miterlimit="3.8637" x1="828.661" y1="707.392" x2="380.004" y2="1098.294"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.6397" stroke-miterlimit="3.8637" x1="872.068" y1="707.344" x2="423.411" y2="1098.246"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="915.462" y1="707.297" x2="466.807" y2="1098.2"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.6397" stroke-miterlimit="3.8637" x1="958.859" y1="707.25" x2="510.203" y2="1098.153"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.6397" stroke-miterlimit="3.8637" x1="1002.245" y1="707.202" x2="553.589" y2="1098.104"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.6397" stroke-miterlimit="3.8637" x1="1045.641" y1="707.156" x2="596.985" y2="1098.055"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.6397" stroke-miterlimit="3.8637" x1="1089.038" y1="707.106" x2="640.381" y2="1098.009"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="1132.434" y1="707.058" x2="699.608" y2="1084.142"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="480.169" y1="56.775" x2="1166.026" y2="56.689"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="480.169" y1="100.179" x2="1166.056" y2="100.092"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="480.169" y1="143.582" x2="1166.083" y2="143.496"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="480.169" y1="186.985" x2="1166.115" y2="186.898"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="480.17" y1="230.389" x2="1166.143" y2="230.302"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="480.17" y1="273.78" x2="1166.172" y2="273.694"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="480.17" y1="317.184" x2="1166.203" y2="317.097"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="480.17" y1="360.598" x2="1166.233" y2="360.511"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="480.17" y1="404.001" x2="1166.261" y2="403.914"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="480.172" y1="447.405" x2="1166.291" y2="447.318"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="480.172" y1="490.797" x2="1166.32" y2="490.711"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="480.172" y1="534.2" x2="1166.349" y2="534.113"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="480.172" y1="577.603" x2="1166.379" y2="577.516"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="480.172" y1="621.006" x2="1166.409" y2="620.919"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="480.172" y1="664.41" x2="1166.439" y2="664.324"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="480.173" y1="707.801" x2="1191.486" y2="707.751"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="28.121" y1="447.149" x2="480.169" y2="56.768"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.8446" stroke-miterlimit="3.8637" x1="28.159" y1="490.519" x2="480.169" y2="100.171"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.8446" stroke-miterlimit="3.8637" x1="28.197" y1="533.889" x2="480.17" y2="143.575"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.8446" stroke-miterlimit="3.8637" x1="28.235" y1="577.259" x2="480.17" y2="186.979"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.8446" stroke-miterlimit="3.8637" x1="28.274" y1="620.628" x2="480.17" y2="230.383"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="28.312" y1="663.988" x2="480.172" y2="273.774"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.8446" stroke-miterlimit="3.8637" x1="28.352" y1="707.358" x2="480.172" y2="317.178"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.8446" stroke-miterlimit="3.8637" x1="28.389" y1="750.74" x2="480.172" y2="360.594"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.8446" stroke-miterlimit="3.8637" x1="28.428" y1="794.11" x2="480.173" y2="403.997"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.8446" stroke-miterlimit="3.8637" x1="28.466" y1="837.479" x2="480.175" y2="447.401"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="28.505" y1="880.84" x2="480.176" y2="490.793"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.8446" stroke-miterlimit="3.8637" x1="28.543" y1="924.209" x2="480.176" y2="534.197"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.8446" stroke-miterlimit="3.8637" x1="28.582" y1="967.579" x2="480.176" y2="577.6"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.8446" stroke-miterlimit="3.8637" x1="28.62" y1="1010.951" x2="480.177" y2="621.004"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.8446" stroke-miterlimit="3.8637" x1="28.659" y1="1054.317" x2="480.177" y2="664.408"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="12.276" y1="1112.514" x2="480.179" y2="707.801"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.7285" stroke-miterlimit="3.8637" x1="436.571" y1="745.471" x2="1122.935" y2="745.385"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.7285" stroke-miterlimit="3.8637" x1="392.896" y1="783.2" x2="1079.262" y2="783.113"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.7285" stroke-miterlimit="3.8637" x1="349.229" y1="820.923" x2="1035.592" y2="820.836"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.7285" stroke-miterlimit="3.8637" x1="305.561" y1="858.646" x2="991.924" y2="858.559"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="261.893" y1="896.369" x2="948.256" y2="896.282"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.7285" stroke-miterlimit="3.8637" x1="218.225" y1="934.094" x2="904.588" y2="934.005"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.7285" stroke-miterlimit="3.8637" x1="174.557" y1="971.818" x2="860.922" y2="971.731"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.7285" stroke-miterlimit="3.8637" x1="130.889" y1="1009.541" x2="817.252" y2="1009.454"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.7285" stroke-miterlimit="3.8637" x1="87.221" y1="1047.264" x2="773.584" y2="1047.177"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="43.984" y1="1084.631" x2="43.984" y2="410.521"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="44.003" y1="1084.194" x2="730.408" y2="1084.107"/>
</g>
<g>
<polygon fill-rule="evenodd" clip-rule="evenodd" points="480.638,0 490.458,16.188 470.817,16.159 "/>
</g>
<g>
<polygon fill-rule="evenodd" clip-rule="evenodd" points="1206.59,707.576 1190.417,717.372 1190.417,697.732 "/>
</g>
<g>
<polygon fill-rule="evenodd" clip-rule="evenodd" points="0,1121.583 6.699,1103.895 18.79,1119.391 "/>
</g>
</g>
</g>
</g>
</switch>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
]>
<svg version="1.0" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1218.036px"
height="1131.559px" viewBox="0 0 1218.036 1131.559" enable-background="new 0 0 1218.036 1131.559" xml:space="preserve">
<switch>
<g i:extraneous="self">
<g id="Arrière-plan">
</g>
<g id="Guides">
</g>
<g id="Premier_plan">
<g>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="479.251" y1="719.909" x2="38.662" y2="1099.05"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="479.104" y1="720.011" x2="1198.314" y2="719.967"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="479.086" y1="720.024" x2="479.086" y2="9.721"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="524.464" y1="732.634" x2="524.464" y2="708.382"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="568.627" y1="732.586" x2="568.627" y2="708.262"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="612.778" y1="732.54" x2="612.778" y2="708.142"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="656.93" y1="732.494" x2="656.93" y2="708.022"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="701.083" y1="736.69" x2="701.083" y2="703.658"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="745.235" y1="732.399" x2="745.235" y2="707.781"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="789.375" y1="732.354" x2="789.375" y2="707.66"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="833.527" y1="732.307" x2="833.527" y2="707.54"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="877.691" y1="732.258" x2="877.691" y2="707.418"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="921.842" y1="736.458" x2="921.842" y2="703.056"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="965.996" y1="732.167" x2="965.996" y2="707.179"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="1010.134" y1="732.12" x2="1010.134" y2="707.059"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="1054.287" y1="732.074" x2="1054.287" y2="706.939"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="1098.438" y1="732.028" x2="1098.438" y2="706.818"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="1142.592" y1="736.225" x2="1142.592" y2="702.456"/>
<g>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="460.696" y1="57.754" x2="496.627" y2="57.667"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="466.354" y1="101.907" x2="491" y2="101.818"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="466.354" y1="146.058" x2="491.028" y2="145.97"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="466.354" y1="190.21" x2="491.059" y2="190.122"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="466.355" y1="234.362" x2="491.089" y2="234.274"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="460.697" y1="278.503" x2="496.778" y2="278.416"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="466.355" y1="322.655" x2="491.149" y2="322.567"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="466.355" y1="366.819" x2="491.179" y2="366.73"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="466.355" y1="410.971" x2="491.209" y2="410.881"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="466.356" y1="455.123" x2="491.238" y2="455.034"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="460.698" y1="499.263" x2="496.927" y2="499.175"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="466.356" y1="543.415" x2="491.298" y2="543.327"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="466.356" y1="587.567" x2="491.328" y2="587.478"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="466.356" y1="631.718" x2="491.359" y2="631.629"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.927" stroke-miterlimit="3.8637" x1="466.356" y1="675.871" x2="491.389" y2="675.783"/>
</g>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="479.088" y1="720.01" x2="1202.671" y2="719.96"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="12.489" y1="1122.334" x2="479.093" y2="720.01"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.7285" stroke-miterlimit="3.8637" d="
M461.167,748.873"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.7285" stroke-miterlimit="3.8637" d="
M444.102,748.96"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.7285" stroke-miterlimit="3.8637" d="
M416.74,787.252"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.7285" stroke-miterlimit="3.8637" d="
M399.674,787.341"/>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.7285" stroke-miterlimit="3.8637" d="
M355.253,825.715"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="444.096" y1="760.281" x2="444.096" y2="736.598"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="399.661" y1="798.655" x2="399.661" y2="774.636"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="355.234" y1="837.026" x2="355.234" y2="812.67"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="310.805" y1="875.394" x2="310.805" y2="850.704"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="266.376" y1="919.42" x2="266.376" y2="883.081"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="221.948" y1="952.133" x2="221.948" y2="926.769"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="177.52" y1="990.501" x2="177.52" y2="964.802"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="133.092" y1="1028.871" x2="133.092" y2="1002.837"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="0.9159" stroke-miterlimit="3.8637" x1="88.664" y1="1067.238" x2="88.664" y2="1040.872"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="#FFFFEB" stroke="#231F20" stroke-width="1.8318" stroke-miterlimit="3.8637" x1="44.743" y1="1105.289" x2="44.743" y2="1077.089"/>
<g>
<polygon fill-rule="evenodd" clip-rule="evenodd" points="479.561,0 489.55,16.467 469.571,16.437 "/>
</g>
<g>
<polygon fill-rule="evenodd" clip-rule="evenodd" points="1218.036,719.781 1201.583,729.747 1201.583,709.768 "/>
</g>
<g>
<polygon fill-rule="evenodd" clip-rule="evenodd" points="0,1131.559 6.814,1113.569 19.114,1129.33 "/>
</g>
</g>
</g>
</g>
</switch>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
]>
<svg version="1.0" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1156.532px"
height="1156.2px" viewBox="0 0 1156.532 1156.2" enable-background="new 0 0 1156.532 1156.2" xml:space="preserve">
<switch>
<g i:extraneous="self">
<g id="Arrière-plan">
</g>
<g id="Guides">
</g>
<g id="Premier_plan">
<rect x="19.983" y="33.591" fill="#FFFFFF" width="1102.795" height="1102.875"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="586.58" y1="33.591" x2="586.58" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="601.899" y1="33.591" x2="601.899" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="617.22" y1="33.591" x2="617.22" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="632.531" y1="33.591" x2="632.531" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="647.85" y1="33.591" x2="647.85" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="663.164" y1="33.591" x2="663.164" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="678.48" y1="33.591" x2="678.48" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="693.793" y1="33.591" x2="693.793" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="709.113" y1="33.591" x2="709.113" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="724.423" y1="33.591" x2="724.423" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="739.744" y1="33.591" x2="739.744" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="755.053" y1="33.591" x2="755.053" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="770.367" y1="33.591" x2="770.367" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="785.675" y1="33.591" x2="785.675" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="800.997" y1="33.591" x2="800.997" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="816.308" y1="33.591" x2="816.308" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="831.626" y1="33.591" x2="831.626" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="846.94" y1="33.591" x2="846.94" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="862.259" y1="33.591" x2="862.259" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="877.578" y1="33.591" x2="877.578" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="892.888" y1="33.591" x2="892.888" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="908.209" y1="33.591" x2="908.209" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="923.521" y1="33.591" x2="923.521" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="938.832" y1="33.591" x2="938.832" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="954.143" y1="33.591" x2="954.143" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="969.464" y1="33.591" x2="969.464" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="984.773" y1="33.591" x2="984.773" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1000.092" y1="33.591" x2="1000.092" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1015.405" y1="33.591" x2="1015.405" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1030.724" y1="33.591" x2="1030.724" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1046.035" y1="33.591" x2="1046.035" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1061.354" y1="33.591" x2="1061.354" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1076.667" y1="33.591" x2="1076.667" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1091.986" y1="33.591" x2="1091.986" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1107.29" y1="33.591" x2="1107.29" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="33.591" x2="1122.609" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="19.983" y1="33.591" x2="19.983" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="35.295" y1="33.591" x2="35.295" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="50.614" y1="33.591" x2="50.614" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="65.934" y1="33.591" x2="65.934" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="81.245" y1="33.591" x2="81.245" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="96.565" y1="33.591" x2="96.565" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="111.876" y1="33.591" x2="111.876" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="127.196" y1="33.591" x2="127.196" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="142.507" y1="33.591" x2="142.507" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="157.827" y1="33.591" x2="157.827" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="173.138" y1="33.591" x2="173.138" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="188.458" y1="33.591" x2="188.458" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="203.769" y1="33.591" x2="203.769" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="219.08" y1="33.591" x2="219.08" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="234.393" y1="33.591" x2="234.393" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="249.711" y1="33.591" x2="249.711" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="265.023" y1="33.591" x2="265.023" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="280.342" y1="33.591" x2="280.342" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="295.653" y1="33.591" x2="295.653" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="310.974" y1="33.591" x2="310.974" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="326.292" y1="33.591" x2="326.292" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="341.604" y1="33.591" x2="341.604" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="356.925" y1="33.591" x2="356.925" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="372.234" y1="33.591" x2="372.234" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="387.547" y1="33.591" x2="387.547" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="402.856" y1="33.591" x2="402.856" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="418.177" y1="33.591" x2="418.177" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="433.488" y1="33.591" x2="433.488" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="448.807" y1="33.591" x2="448.807" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="464.12" y1="33.591" x2="464.12" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="479.439" y1="33.591" x2="479.439" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="494.75" y1="33.591" x2="494.75" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="510.071" y1="33.591" x2="510.071" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="525.38" y1="33.591" x2="525.38" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="540.701" y1="33.591" x2="540.701" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="556.002" y1="33.591" x2="556.002" y2="1136.27"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="1.5" stroke-miterlimit="3.8637" x1="571.324" y1="13.662" x2="571.324" y2="1156.2"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="33.591" x2="19.93" y2="33.591"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="48.902" x2="19.93" y2="48.902"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="64.221" x2="19.93" y2="64.221"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="79.542" x2="19.93" y2="79.542"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="94.854" x2="19.93" y2="94.854"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="110.172" x2="19.93" y2="110.172"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="125.483" x2="19.93" y2="125.483"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="140.803" x2="19.93" y2="140.803"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="156.115" x2="19.93" y2="156.115"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="171.435" x2="19.93" y2="171.435"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="186.746" x2="19.93" y2="186.746"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="202.065" x2="19.93" y2="202.065"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="217.376" x2="19.93" y2="217.376"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="232.688" x2="19.93" y2="232.688"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="247.999" x2="19.93" y2="247.999"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="263.319" x2="19.93" y2="263.319"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="278.63" x2="19.93" y2="278.63"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="293.95" x2="19.93" y2="293.95"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="309.261" x2="19.93" y2="309.261"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="324.581" x2="19.93" y2="324.581"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="339.9" x2="19.93" y2="339.9"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="355.211" x2="19.93" y2="355.211"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="370.531" x2="19.93" y2="370.531"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="385.842" x2="19.93" y2="385.842"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="401.153" x2="19.93" y2="401.153"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="416.465" x2="19.93" y2="416.465"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="431.784" x2="19.93" y2="431.784"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="447.095" x2="19.93" y2="447.095"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="462.416" x2="19.93" y2="462.416"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="477.727" x2="19.93" y2="477.727"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="493.046" x2="19.93" y2="493.046"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="508.357" x2="19.93" y2="508.357"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="523.677" x2="19.93" y2="523.677"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="538.989" x2="19.93" y2="538.989"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="554.308" x2="19.93" y2="554.308"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="569.611" x2="19.93" y2="569.611"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="1.5" stroke-miterlimit="3.8637" x1="1142.538" y1="584.957" x2="0" y2="584.957"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="600.268" x2="19.93" y2="600.268"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="615.588" x2="19.93" y2="615.588"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="630.909" x2="19.93" y2="630.909"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="646.218" x2="19.93" y2="646.218"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="661.539" x2="19.93" y2="661.539"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="676.85" x2="19.93" y2="676.85"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="692.169" x2="19.93" y2="692.169"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="707.48" x2="19.93" y2="707.48"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="722.799" x2="19.93" y2="722.799"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="738.11" x2="19.93" y2="738.11"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="753.431" x2="19.93" y2="753.431"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="768.743" x2="19.93" y2="768.743"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="784.053" x2="19.93" y2="784.053"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="799.365" x2="19.93" y2="799.365"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="814.685" x2="19.93" y2="814.685"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="829.995" x2="19.93" y2="829.995"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="845.316" x2="19.93" y2="845.316"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="860.626" x2="19.93" y2="860.626"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="875.948" x2="19.93" y2="875.948"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="891.266" x2="19.93" y2="891.266"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="906.578" x2="19.93" y2="906.578"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="921.897" x2="19.93" y2="921.897"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="937.208" x2="19.93" y2="937.208"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="952.519" x2="19.93" y2="952.519"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="967.832" x2="19.93" y2="967.832"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="983.149" x2="19.93" y2="983.149"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="998.462" x2="19.93" y2="998.462"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="1013.781" x2="19.93" y2="1013.781"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="1029.092" x2="19.93" y2="1029.092"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="1044.411" x2="19.93" y2="1044.411"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="1059.724" x2="19.93" y2="1059.724"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="1075.043" x2="19.93" y2="1075.043"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="1090.354" x2="19.93" y2="1090.354"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="1105.673" x2="19.93" y2="1105.673"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="1120.976" x2="19.93" y2="1120.976"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#9A9999" stroke-width="0.5" stroke-miterlimit="3.8637" x1="1122.609" y1="1136.295" x2="19.93" y2="1136.295"/>
<g>
<polygon fill-rule="evenodd" clip-rule="evenodd" points="1156.532,584.902 1140.918,594.38 1140.918,575.422 "/>
</g>
<g>
<polygon fill-rule="evenodd" clip-rule="evenodd" points="571.386,0 580.866,15.612 561.908,15.612 "/>
</g>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="647.85" y1="569.129" x2="647.85" y2="600.792"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="724.423" y1="569.129" x2="724.423" y2="600.792"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="800.997" y1="569.129" x2="800.997" y2="600.792"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="877.578" y1="569.129" x2="877.578" y2="600.792"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="954.143" y1="569.129" x2="954.143" y2="600.792"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="1030.724" y1="569.129" x2="1030.724" y2="600.792"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="1107.29" y1="569.129" x2="1107.29" y2="600.792"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="35.301" y1="569.129" x2="35.301" y2="600.792"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="111.874" y1="569.129" x2="111.874" y2="600.792"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="188.447" y1="569.129" x2="188.447" y2="600.792"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="265.027" y1="569.129" x2="265.027" y2="600.792"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="341.592" y1="569.129" x2="341.592" y2="600.792"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="418.173" y1="569.129" x2="418.173" y2="600.792"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="494.739" y1="569.129" x2="494.739" y2="600.792"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="555.463" y1="508.405" x2="587.125" y2="508.405"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="555.463" y1="431.833" x2="587.125" y2="431.833"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="555.463" y1="355.26" x2="587.125" y2="355.26"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="555.463" y1="278.678" x2="587.125" y2="278.678"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="555.463" y1="202.113" x2="587.125" y2="202.113"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="555.463" y1="125.531" x2="587.125" y2="125.531"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="555.463" y1="48.967" x2="587.125" y2="48.967"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="555.463" y1="1120.956" x2="587.125" y2="1120.956"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="555.463" y1="1044.381" x2="587.125" y2="1044.381"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="555.463" y1="967.809" x2="587.125" y2="967.809"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="555.463" y1="891.227" x2="587.125" y2="891.227"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="555.463" y1="814.663" x2="587.125" y2="814.663"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="555.463" y1="738.083" x2="587.125" y2="738.083"/>
<line fill-rule="evenodd" clip-rule="evenodd" fill="none" stroke="#231F20" stroke-miterlimit="3.8637" x1="555.463" y1="661.516" x2="587.125" y2="661.516"/>
</g>
</g>
</switch>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
]>
<svg version="1.0" id="Layer_1" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1799.108px"
height="1116.847px" viewBox="0 0 1799.108 1116.847" enable-background="new 0 0 1799.108 1116.847" xml:space="preserve">
<switch>
<g i:extraneous="self">
<g>
<rect x="0.5" y="0.5" fill="#FFFFFF" stroke="#231F20" width="1797.651" height="1115.586"/>
<g>
<rect x="517.457" y="40.999" fill="#E6F5F5" width="115.883" height="1074.926"/>
<rect x="749.83" y="40.999" fill="#E6F5F5" width="115.882" height="1074.831"/>
<rect x="983.14" y="40.999" fill="#E6F5F5" width="115.878" height="1074.831"/>
<rect x="1214.576" y="40.999" fill="#E6F5F5" width="115.883" height="1075.775"/>
<rect x="1445.075" y="40.999" fill="#E6F5F5" width="115.884" height="1075.775"/>
<polyline fill="#E6F5F5" points="1797.09,40.999 1679.327,40.999 1679.327,1115.69 1797.09,1115.69 "/>
</g>
<g>
<rect x="0.5" y="115.412" opacity="0.5" fill="#F0F0F0" width="1797.651" height="70.398"/>
<rect x="0.5" y="258.145" opacity="0.5" fill="#F0F0F0" width="1797.651" height="70.398"/>
<rect x="0.5" y="400.877" opacity="0.5" fill="#F0F0F0" width="1797.651" height="70.398"/>
<rect x="0.5" y="543.61" opacity="0.5" fill="#F0F0F0" width="1797.651" height="70.398"/>
<rect x="0.5" y="686.343" opacity="0.5" fill="#F0F0F0" width="1797.651" height="70.398"/>
<rect x="0.5" y="829.077" opacity="0.5" fill="#F0F0F0" width="1797.651" height="70.396"/>
<rect x="0.5" y="973.021" opacity="0.5" fill="#F0F0F0" width="1797.651" height="70.396"/>
</g>
<path fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" d="M672.494,39.551"/>
<path fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" d="M896.82,39.551"/>
<path fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" d="M672.484,39.551"/>
<path fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" d="M1121.156,39.551"/>
<path fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" d="M896.82,39.551"/>
<path fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" d="M1798.822,39.551"/>
<path fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" d="M1569.817,39.551"/>
<g>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="2.77" y1="114.347" x2="1799.108" y2="114.347"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="2.77" y1="185.811" x2="1799.108" y2="185.811"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="3.947" y1="1116.042" x2="1798.971" y2="1116.086"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="2.77" y1="257.278" x2="1799.108" y2="257.278"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="2.77" y1="328.742" x2="1799.108" y2="328.742"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="2.77" y1="400.208" x2="1799.108" y2="400.208"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="2.77" y1="471.674" x2="1799.108" y2="471.674"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="2.77" y1="686.07" x2="1799.108" y2="686.07"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="2.77" y1="757.537" x2="1799.108" y2="757.537"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="2.77" y1="829" x2="1799.108" y2="829"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="2.77" y1="971.93" x2="1799.108" y2="971.93"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="2.77" y1="1043.396" x2="1799.108" y2="1043.396"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="2.77" y1="543.139" x2="1799.108" y2="543.139"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="2.77" y1="614.604" x2="1799.108" y2="614.604"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="2.77" y1="900.467" x2="1799.108" y2="900.467"/>
</g>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="1798.151" y1="1116.847" x2="1798.151" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="1680.088" y1="1115.914" x2="1680.088" y2="40.156"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="1562.029" y1="1115.914" x2="1562.029" y2="40.156"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="1445.84" y1="1115.914" x2="1445.84" y2="40.156"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="1331.529" y1="1115.914" x2="1331.529" y2="40.156"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="1215.341" y1="1115.914" x2="1215.341" y2="40.156"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="1099.154" y1="1115.914" x2="1099.154" y2="40.156"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="982.969" y1="1115.914" x2="982.969" y2="40.156"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="866.783" y1="1115.914" x2="866.783" y2="40.156"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="750.594" y1="1115.914" x2="750.594" y2="40.156"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="634.409" y1="1115.914" x2="634.409" y2="40.156"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="518.224" y1="1115.914" x2="518.224" y2="40.156"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="403.909" y1="1115.914" x2="403.909" y2="40.156"/>
<g>
<g>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="1768.167" y1="1116.272" x2="1768.167" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="1738.184" y1="1116.272" x2="1738.184" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="1708.203" y1="1116.272" x2="1708.203" y2="23.503"/>
</g>
<g>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="1651.981" y1="1116.272" x2="1651.981" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="1621.997" y1="1116.272" x2="1621.997" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="1592.014" y1="1116.272" x2="1592.014" y2="23.503"/>
</g>
<g>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="1536.734" y1="1116.272" x2="1536.734" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="1506.75" y1="1116.272" x2="1506.75" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="1476.767" y1="1116.272" x2="1476.767" y2="23.503"/>
</g>
</g>
<g>
<g>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="1417.755" y1="1115.332" x2="1417.755" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="1387.768" y1="1115.332" x2="1387.768" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="1357.783" y1="1115.332" x2="1357.783" y2="23.503"/>
</g>
<g>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="1301.562" y1="1115.332" x2="1301.562" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="1271.578" y1="1115.332" x2="1271.578" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="1241.598" y1="1115.332" x2="1241.598" y2="23.503"/>
</g>
<g>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="1186.318" y1="1115.332" x2="1186.318" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="1156.335" y1="1115.332" x2="1156.335" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="1126.356" y1="1115.332" x2="1126.356" y2="23.503"/>
</g>
</g>
<g>
<g>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="1069.209" y1="1116.272" x2="1069.209" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="1039.224" y1="1116.272" x2="1039.224" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="1009.243" y1="1116.272" x2="1009.243" y2="23.503"/>
</g>
<g>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="953.021" y1="1116.272" x2="953.021" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="923.036" y1="1116.272" x2="923.036" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="893.052" y1="1116.272" x2="893.052" y2="23.503"/>
</g>
<g>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="837.774" y1="1116.272" x2="837.774" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="807.796" y1="1116.272" x2="807.796" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="777.808" y1="1116.272" x2="777.808" y2="23.503"/>
</g>
</g>
<g>
<g>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="720.665" y1="1115.801" x2="720.665" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="690.681" y1="1115.801" x2="690.681" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="660.699" y1="1115.801" x2="660.699" y2="23.503"/>
</g>
<g>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="604.478" y1="1115.801" x2="604.478" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="574.495" y1="1115.801" x2="574.495" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="544.511" y1="1115.801" x2="544.511" y2="23.503"/>
</g>
<g>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="489.232" y1="1115.801" x2="489.232" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="459.25" y1="1115.801" x2="459.25" y2="23.503"/>
<line fill="none" stroke="#231F20" stroke-width="0.1876" stroke-miterlimit="10" x1="429.267" y1="1115.801" x2="429.267" y2="23.503"/>
</g>
</g>
<g>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="1.227" y1="253.878" x2="1.227" y2="40.156"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="1.227" y1="469.271" x2="1.227" y2="255.548"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="1.227" y1="684.662" x2="1.227" y2="470.941"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="1.227" y1="900.059" x2="1.227" y2="686.336"/>
<line fill="none" stroke="#231F20" stroke-width="0.9281" stroke-miterlimit="10" x1="1.227" y1="1115.457" x2="1.227" y2="901.74"/>
</g>
<rect x="0.451" y="0.399" fill="#333333" width="1798.52" height="41.937"/>
<g>
<g>
<g>
<path fill="#FFFFFF" d="M1718.311,14.921h7.002c2.377,0,4.219,0.759,5.529,2.278c1.168,1.37,1.752,3.125,1.752,5.265
c0,1.653-0.344,3.147-1.033,4.481c-1.217,2.359-3.309,3.539-6.271,3.539h-6.979V14.921z M1724.846,28.683
c0.785,0,1.431-0.074,1.936-0.222c0.902-0.275,1.64-0.805,2.216-1.589c0.457-0.628,0.788-1.433,0.989-2.416
c0.117-0.586,0.176-1.13,0.176-1.631c0-1.928-0.422-3.426-1.264-4.492c-0.844-1.066-2.203-1.599-4.074-1.599h-4.117v11.95
H1724.846z"/>
<path fill="#FFFFFF" d="M1736.062,14.921h12.71v1.907h-10.396v4.725h9.608v1.801h-9.608v5.275h10.574v1.854h-12.889V14.921z"
/>
<path fill="#FFFFFF" d="M1764.512,16.055c1.209,1.038,1.881,2.218,2.015,3.539h-2.312c-0.259-1.003-0.772-1.797-1.541-2.384
s-1.848-0.879-3.238-0.879c-1.692,0-3.061,0.539-4.104,1.616c-1.041,1.079-1.562,2.73-1.562,4.957
c0,1.824,0.471,3.302,1.411,4.438c0.941,1.134,2.346,1.702,4.211,1.702c1.719,0,3.026-0.597,3.923-1.791
c0.478-0.628,0.832-1.455,1.066-2.479h2.312c-0.203,1.638-0.88,3.012-2.026,4.121c-1.375,1.334-3.229,2.002-5.562,2.002
c-2.012,0-3.701-0.548-5.067-1.644c-1.801-1.448-2.698-3.685-2.698-6.71c0-2.297,0.675-4.181,2.024-5.65
c1.462-1.597,3.477-2.396,6.047-2.396C1761.602,14.498,1763.301,15.017,1764.512,16.055z"/>
</g>
</g>
<g>
<g>
<path fill="#FFFFFF" d="M1600.144,14.921h2.794l8.734,12.574V14.921h2.267v15.563h-2.666l-8.864-12.559v12.559h-2.265V14.921z
"/>
<path fill="#FFFFFF" d="M1632.202,17.146c1.16,1.377,1.74,3.139,1.74,5.287c0,2.324-0.662,4.255-1.99,5.795
c-1.558,1.809-3.78,2.712-6.665,2.712c-2.695,0-4.812-0.791-6.354-2.373c-1.377-1.526-2.064-3.454-2.064-5.785
c0-2.104,0.59-3.905,1.766-5.402c1.51-1.921,3.743-2.882,6.699-2.882C1628.427,14.498,1630.717,15.38,1632.202,17.146z
M1630.109,27.065c0.936-1.332,1.401-2.864,1.401-4.596c0-1.831-0.538-3.305-1.615-4.422c-1.077-1.117-2.55-1.675-4.417-1.675
c-1.812,0-3.291,0.553-4.436,1.659s-1.717,2.737-1.717,4.893c0,1.725,0.49,3.179,1.473,4.364
c0.98,1.184,2.572,1.775,4.775,1.775C1627.664,29.064,1629.177,28.398,1630.109,27.065z"/>
<path fill="#FFFFFF" d="M1638.159,14.921l5.031,13.253l4.971-13.253h2.66l-6.39,15.563h-2.516l-6.38-15.563H1638.159z"/>
</g>
</g>
<g>
<g>
<path fill="#FFFFFF" d="M1496.511,17.146c1.159,1.377,1.739,3.139,1.739,5.287c0,2.324-0.662,4.255-1.99,5.795
c-1.557,1.809-3.779,2.712-6.665,2.712c-2.694,0-4.812-0.791-6.354-2.373c-1.376-1.526-2.063-3.454-2.063-5.785
c0-2.104,0.589-3.905,1.766-5.402c1.509-1.921,3.742-2.882,6.699-2.882C1492.734,14.498,1495.025,15.38,1496.511,17.146z
M1494.418,27.065c0.935-1.332,1.401-2.864,1.401-4.596c0-1.831-0.538-3.305-1.616-4.422c-1.077-1.117-2.55-1.675-4.416-1.675
c-1.813,0-3.291,0.553-4.437,1.659c-1.144,1.106-1.716,2.737-1.716,4.893c0,1.725,0.49,3.179,1.473,4.364
c0.98,1.184,2.572,1.775,4.774,1.775C1491.972,29.064,1493.484,28.398,1494.418,27.065z"/>
<path fill="#FFFFFF" d="M1513.465,16.055c1.209,1.038,1.881,2.218,2.014,3.539h-2.312c-0.258-1.003-0.771-1.797-1.54-2.384
s-1.848-0.879-3.238-0.879c-1.692,0-3.061,0.539-4.104,1.616c-1.041,1.079-1.562,2.73-1.562,4.957
c0,1.824,0.47,3.302,1.411,4.438c0.941,1.134,2.345,1.702,4.211,1.702c1.718,0,3.026-0.597,3.923-1.791
c0.478-0.628,0.832-1.455,1.066-2.479h2.312c-0.203,1.638-0.88,3.012-2.027,4.121c-1.374,1.334-3.229,2.002-5.562,2.002
c-2.013,0-3.701-0.548-5.067-1.644c-1.801-1.448-2.699-3.685-2.699-6.71c0-2.297,0.675-4.181,2.025-5.65
c1.462-1.597,3.477-2.396,6.047-2.396C1510.554,14.498,1512.254,15.017,1513.465,16.055z"/>
<path fill="#FFFFFF" d="M1531.445,14.921v1.854h-5.902v13.709h-2.396V16.775h-5.902v-1.854H1531.445z"/>
</g>
</g>
<g>
<g>
<path fill="#FFFFFF" d="M1371.195,25.463c0.054,0.883,0.28,1.599,0.677,2.15c0.758,1.031,2.095,1.546,4.009,1.546
c0.858,0,1.64-0.113,2.344-0.338c1.363-0.438,2.044-1.222,2.044-2.352c0-0.848-0.289-1.452-0.866-1.812
c-0.585-0.354-1.502-0.66-2.749-0.921l-2.298-0.477c-1.502-0.311-2.565-0.653-3.189-1.028
c-1.077-0.649-1.617-1.621-1.617-2.914c0-1.397,0.531-2.545,1.59-3.442c1.06-0.897,2.562-1.346,4.503-1.346
c1.785,0,3.304,0.393,4.554,1.181c1.249,0.787,1.873,2.046,1.873,3.777h-2.229c-0.115-0.833-0.358-1.473-0.731-1.917
c-0.693-0.812-1.872-1.218-3.533-1.218c-1.341,0-2.305,0.261-2.893,0.784c-0.587,0.522-0.88,1.13-0.88,1.822
c0,0.763,0.348,1.321,1.039,1.674c0.456,0.226,1.484,0.508,3.085,0.848l2.38,0.497c1.147,0.241,2.033,0.569,2.656,0.985
c1.08,0.729,1.618,1.784,1.618,3.168c0,1.724-0.688,2.956-2.064,3.697c-1.375,0.742-2.975,1.112-4.795,1.112
c-2.124,0-3.787-0.494-4.989-1.482c-1.202-0.981-1.791-2.313-1.767-3.994H1371.195z"/>
<path fill="#FFFFFF" d="M1386.157,14.921h12.71v1.907h-10.396v4.725h9.608v1.801h-9.608v5.275h10.575v1.854h-12.89V14.921z"/>
<path fill="#FFFFFF" d="M1402.443,14.921h7.838c1.55,0,2.801,0.391,3.754,1.171c0.952,0.78,1.43,1.877,1.43,3.29
c0,1.215-0.427,2.272-1.275,3.172c-0.851,0.901-2.151,1.351-3.904,1.351h-5.469v6.579h-2.373V14.921z M1411.648,17.062
c-0.521-0.219-1.237-0.328-2.145-0.328h-4.688v5.392h4.688c1.058,0,1.917-0.201,2.576-0.604
c0.658-0.403,0.988-1.112,0.988-2.129C1413.068,18.248,1412.594,17.472,1411.648,17.062z"/>
</g>
</g>
<g>
<g>
<path fill="#FFFFFF" d="M1258.57,14.921h2.679l6.357,15.563h-2.6l-1.828-4.662h-6.872l-1.898,4.662h-2.434L1258.57,14.921z
M1262.506,24.106l-2.697-6.875l-2.803,6.875H1262.506z"/>
<path fill="#FFFFFF" d="M1272.31,14.921v9.62c0,1.13,0.24,2.069,0.722,2.818c0.713,1.13,1.913,1.695,3.605,1.695
c2.025,0,3.404-0.611,4.133-1.833c0.394-0.664,0.589-1.557,0.589-2.68v-9.62h2.397v8.741c0,1.913-0.291,3.386-0.873,4.417
c-1.07,1.879-3.088,2.818-6.054,2.818c-2.968,0-4.982-0.939-6.043-2.818c-0.582-1.031-0.873-2.504-0.873-4.417v-8.741H1272.31
z"/>
<path fill="#FFFFFF" d="M1299.037,15.367c1.717,0.812,2.767,2.235,3.15,4.269h-2.349c-0.28-1.137-0.86-1.965-1.74-2.484
c-0.88-0.519-1.988-0.778-3.328-0.778c-1.588,0-2.925,0.541-4.01,1.621c-1.087,1.08-1.628,2.69-1.628,4.831
c0,1.851,0.446,3.356,1.343,4.518s2.356,1.743,4.382,1.743c1.549,0,2.833-0.408,3.849-1.223
c1.018-0.816,1.537-2.135,1.561-3.957h-5.482v-1.748h7.689v8.327h-1.526l-0.572-2.003c-0.791,0.784-1.489,1.329-2.099,1.632
c-1.024,0.522-2.327,0.784-3.906,0.784c-2.042,0-3.796-0.597-5.267-1.791c-1.604-1.497-2.404-3.552-2.404-6.166
c0-2.606,0.783-4.679,2.351-6.218c1.487-1.469,3.416-2.204,5.781-2.204C1296.452,14.519,1297.855,14.801,1299.037,15.367z"/>
</g>
</g>
<g>
<g>
<path fill="#FFFFFF" d="M1149.626,25.844c0,1.314-0.22,2.334-0.657,3.062c-0.812,1.328-2.356,1.992-4.632,1.992
c-1.312,0-2.436-0.316-3.366-0.948c-0.93-0.632-1.396-1.757-1.396-3.374v-1.112h2.23v1.112c0,0.847,0.212,1.485,0.639,1.912
c0.426,0.427,1.09,0.641,1.99,0.641c1.266,0,2.095-0.385,2.484-1.155c0.24-0.473,0.358-1.367,0.358-2.68V14.921h2.35V25.844z"
/>
<path fill="#FFFFFF" d="M1155.789,14.921v9.62c0,1.13,0.24,2.069,0.721,2.818c0.714,1.13,1.914,1.695,3.606,1.695
c2.025,0,3.405-0.611,4.133-1.833c0.394-0.664,0.589-1.557,0.589-2.68v-9.62h2.397v8.741c0,1.913-0.291,3.386-0.873,4.417
c-1.07,1.879-3.088,2.818-6.054,2.818c-2.968,0-4.982-0.939-6.043-2.818c-0.582-1.031-0.873-2.504-0.873-4.417v-8.741
H1155.789z"/>
<path fill="#FFFFFF" d="M1170.861,14.921h2.371V28.63h8.787v1.854h-11.158V14.921z"/>
</g>
</g>
<g>
<g>
<path fill="#FFFFFF" d="M1025.944,25.844c0,1.314-0.22,2.334-0.656,3.062c-0.812,1.328-2.356,1.992-4.633,1.992
c-1.312,0-2.435-0.316-3.366-0.948c-0.93-0.632-1.396-1.757-1.396-3.374v-1.112h2.229v1.112c0,0.847,0.213,1.485,0.639,1.912
c0.427,0.427,1.091,0.641,1.99,0.641c1.267,0,2.096-0.385,2.485-1.155c0.239-0.473,0.358-1.367,0.358-2.68V14.921h2.349
V25.844z"/>
<path fill="#FFFFFF" d="M1032.108,14.921v9.62c0,1.13,0.239,2.069,0.721,2.818c0.714,1.13,1.914,1.695,3.606,1.695
c2.024,0,3.404-0.611,4.133-1.833c0.393-0.664,0.589-1.557,0.589-2.68v-9.62h2.396v8.741c0,1.913-0.291,3.386-0.873,4.417
c-1.07,1.879-3.088,2.818-6.054,2.818c-2.967,0-4.981-0.939-6.043-2.818c-0.582-1.031-0.872-2.504-0.872-4.417v-8.741
H1032.108z"/>
<path fill="#FFFFFF" d="M1047.18,14.921h2.794l8.734,12.574V14.921h2.267v15.563h-2.666l-8.863-12.559v12.559h-2.266V14.921z"
/>
</g>
</g>
<g>
<g>
<path fill="#FFFFFF" d="M901.091,14.921h3.398l5.037,13.158l5-13.158h3.376v15.563h-2.265v-9.186
c0-0.317,0.007-0.843,0.023-1.578c0.015-0.735,0.023-1.522,0.023-2.363l-5.002,13.126h-2.351l-5.048-13.126v0.477
c0,0.381,0.013,0.962,0.037,1.742c0.023,0.78,0.034,1.355,0.034,1.722v9.186h-2.265V14.921z"/>
<path fill="#FFFFFF" d="M926.602,14.921h2.679l6.357,15.563h-2.6l-1.828-4.662h-6.872l-1.898,4.662h-2.434L926.602,14.921z
M930.537,24.106l-2.697-6.875l-2.803,6.875H930.537z"/>
<path fill="#FFFFFF" d="M936.426,14.921h2.767l5.035,7.48l5.034-7.48h2.792l-6.634,9.291v6.272h-2.373v-6.272L936.426,14.921z
"/>
</g>
</g>
<g>
<g>
<path fill="#FFFFFF" d="M791.949,14.921h2.678l6.356,15.563h-2.6l-1.828-4.662h-6.872l-1.899,4.662h-2.433L791.949,14.921z
M795.882,24.106l-2.697-6.875l-2.803,6.875H795.882z"/>
<path fill="#FFFFFF" d="M803.35,14.921h7.838c1.548,0,2.799,0.391,3.75,1.171c0.955,0.78,1.431,1.877,1.431,3.29
c0,1.215-0.424,2.272-1.275,3.172c-0.851,0.901-2.151,1.351-3.902,1.351h-5.47v6.579h-2.371V14.921z M812.553,17.062
c-0.521-0.219-1.237-0.328-2.144-0.328h-4.688v5.392h4.688c1.057,0,1.917-0.201,2.576-0.604
c0.659-0.403,0.988-1.112,0.988-2.129C813.973,18.248,813.499,17.472,812.553,17.062z"/>
<path fill="#FFFFFF" d="M819.695,14.921h7.962c1.31,0,2.391,0.174,3.242,0.52c1.615,0.664,2.424,1.889,2.424,3.675
c0,0.933-0.218,1.695-0.649,2.289c-0.434,0.593-1.039,1.07-1.818,1.43c0.684,0.248,1.196,0.572,1.544,0.975
c0.344,0.402,0.538,1.056,0.578,1.959l0.084,2.087c0.022,0.593,0.079,1.035,0.165,1.325c0.145,0.494,0.398,0.812,0.765,0.953
v0.35h-2.909c-0.081-0.135-0.143-0.308-0.19-0.519c-0.048-0.212-0.088-0.622-0.121-1.229l-0.143-2.595
c-0.055-1.017-0.468-1.698-1.24-2.044c-0.439-0.191-1.131-0.286-2.073-0.286h-5.247v6.674h-2.373V14.921z M827.401,22.051
c1.083,0,1.939-0.197,2.568-0.593c0.629-0.395,0.944-1.108,0.944-2.141c0-1.108-0.439-1.864-1.321-2.267
c-0.472-0.212-1.101-0.317-1.89-0.317h-5.635v5.317H827.401z"/>
</g>
</g>
<g>
<g>
<path fill="#FFFFFF" d="M668.719,14.921h3.399l5.035,13.158l5.002-13.158h3.374v15.563h-2.265v-9.186
c0-0.317,0.007-0.843,0.024-1.578c0.016-0.735,0.023-1.522,0.023-2.363l-5,13.126h-2.351l-5.049-13.126v0.477
c0,0.381,0.013,0.962,0.037,1.742s0.037,1.355,0.037,1.722v9.186h-2.265V14.921z"/>
<path fill="#FFFFFF" d="M694.23,14.921h2.678l6.356,15.563h-2.6l-1.828-4.662h-6.872l-1.899,4.662h-2.434L694.23,14.921z
M698.164,24.106l-2.697-6.875l-2.803,6.875H698.164z"/>
<path fill="#FFFFFF" d="M705.69,14.921h7.962c1.31,0,2.391,0.174,3.242,0.52c1.615,0.664,2.424,1.889,2.424,3.675
c0,0.933-0.218,1.695-0.649,2.289c-0.434,0.593-1.039,1.07-1.818,1.43c0.684,0.248,1.196,0.572,1.544,0.975
c0.344,0.402,0.538,1.056,0.578,1.959l0.084,2.087c0.022,0.593,0.079,1.035,0.165,1.325c0.145,0.494,0.398,0.812,0.765,0.953
v0.35h-2.909c-0.08-0.135-0.143-0.308-0.19-0.519c-0.048-0.212-0.088-0.622-0.121-1.229l-0.143-2.595
c-0.055-1.017-0.468-1.698-1.24-2.044c-0.439-0.191-1.131-0.286-2.073-0.286h-5.247v6.674h-2.373V14.921z M713.396,22.051
c1.083,0,1.939-0.197,2.568-0.593c0.629-0.395,0.944-1.108,0.944-2.141c0-1.108-0.439-1.864-1.321-2.267
c-0.472-0.212-1.101-0.317-1.89-0.317h-5.635v5.317H713.396z"/>
</g>
</g>
<g>
<g>
<path fill="#FFFFFF" d="M560.311,14.921h12.149v1.907h-9.776v4.725h8.596v1.854h-8.596v7.077h-2.373V14.921z"/>
<path fill="#FFFFFF" d="M575.226,14.921h12.71v1.907h-10.397v4.725h9.611v1.801h-9.611v5.275h10.576v1.854h-12.888V14.921z"/>
<path fill="#FFFFFF" d="M591.226,14.921h7.573c2.063,0,3.533,0.544,4.405,1.632c0.512,0.642,0.769,1.384,0.769,2.225
c0,0.981-0.315,1.787-0.944,2.415c-0.325,0.332-0.794,0.636-1.405,0.911c0.896,0.304,1.57,0.647,2.014,1.028
c0.787,0.678,1.18,1.614,1.18,2.807c0,1.003-0.355,1.91-1.068,2.723c-1.061,1.215-2.755,1.822-5.073,1.822h-7.45V14.921z
M597.913,21.5c1.012,0,1.798-0.123,2.36-0.37c0.883-0.389,1.324-1.088,1.324-2.098c0-1.017-0.468-1.702-1.409-2.056
c-0.53-0.197-1.317-0.296-2.36-0.296h-4.277v4.82H597.913z M598.714,28.683c1.467,0,2.516-0.375,3.142-1.123
c0.393-0.474,0.591-1.046,0.591-1.717c0-1.13-0.575-1.899-1.724-2.309c-0.609-0.219-1.416-0.329-2.418-0.329h-4.753v5.477
H598.714z"/>
</g>
</g>
<g>
<g>
<path fill="#FFFFFF" d="M448.759,25.844c0,1.314-0.22,2.334-0.657,3.062c-0.812,1.328-2.356,1.992-4.632,1.992
c-1.313,0-2.435-0.316-3.366-0.948c-0.931-0.632-1.397-1.757-1.397-3.374v-1.112h2.229v1.112c0,0.847,0.213,1.485,0.64,1.912
c0.426,0.427,1.089,0.641,1.989,0.641c1.267,0,2.095-0.385,2.485-1.155c0.239-0.473,0.359-1.367,0.359-2.68V14.921h2.349
V25.844z"/>
<path fill="#FFFFFF" d="M457.47,14.921h2.679l6.356,15.563h-2.6l-1.828-4.662h-6.872l-1.9,4.662h-2.432L457.47,14.921z
M461.404,24.106l-2.697-6.875l-2.802,6.875H461.404z"/>
<path fill="#FFFFFF" d="M468.645,14.921h2.795l8.734,12.574V14.921h2.265v15.563h-2.666l-8.863-12.559v12.559h-2.266V14.921z"
/>
</g>
</g>
</g>
</g>
</g>
</switch>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="1409px" height="868.523px" viewBox="0 0 1409 868.523" enable-background="new 0 0 1409 868.523" xml:space="preserve">
<g>
<g>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="0.333" x2="1409" y2="0.333"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="9.463" x2="1409" y2="9.463"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="36.851" x2="1409" y2="36.851"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="27.723" x2="1409" y2="27.723"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="18.592" x2="1409" y2="18.592"/>
</g>
<g>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="138.89" x2="1409" y2="138.89"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="148.02" x2="1409" y2="148.02"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="175.408" x2="1409" y2="175.408"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="166.279" x2="1409" y2="166.279"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="157.149" x2="1409" y2="157.149"/>
</g>
<g>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="277.447" x2="1409" y2="277.447"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="286.577" x2="1409" y2="286.577"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="313.966" x2="1409" y2="313.966"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="304.835" x2="1409" y2="304.835"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="295.705" x2="1409" y2="295.705"/>
</g>
<g>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="416.002" x2="1409" y2="416.002"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="425.131" x2="1409" y2="425.131"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="452.522" x2="1409" y2="452.522"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="443.393" x2="1409" y2="443.393"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="434.261" x2="1409" y2="434.261"/>
</g>
<g>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="554.56" x2="1409" y2="554.56"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="563.688" x2="1409" y2="563.688"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="591.078" x2="1409" y2="591.078"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="581.946" x2="1409" y2="581.946"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="572.817" x2="1409" y2="572.817"/>
</g>
<g>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="693.118" x2="1409" y2="693.118"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="702.244" x2="1409" y2="702.244"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="729.629" x2="1409" y2="729.629"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="720.501" x2="1409" y2="720.501"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="711.373" x2="1409" y2="711.373"/>
</g>
<g>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="831.673" x2="1409" y2="831.673"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="840.798" x2="1409" y2="840.798"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="868.189" x2="1409" y2="868.189"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="859.06" x2="1409" y2="859.06"/>
<line fill="none" stroke="#000000" stroke-width="0.6673" x1="0" y1="849.93" x2="1409" y2="849.93"/>
</g>
</g>
</svg>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="924.381px" height="678.461px" viewBox="0 0 924.381 678.461" enable-background="new 0 0 924.381 678.461"
xml:space="preserve">
<rect x="395.18" y="24.693" fill="#E6F5F5" width="131.569" height="653.069"/>
<rect x="658.344" y="24.693" fill="#E6F5F5" width="131.546" height="653.125"/>
<rect x="132.034" y="24.638" fill="#E6F5F5" width="131.637" height="653.125"/>
<g>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="0.462" y1="154.167" x2="0.462" y2="24.18"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="0.462" y1="285.169" x2="0.462" y2="155.182"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="0.462" y1="416.168" x2="0.462" y2="286.186"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="0.462" y1="547.173" x2="0.462" y2="417.19"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="0.462" y1="678.18" x2="0.462" y2="548.196"/>
</g>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="132.034" y1="23.811" x2="263.609" y2="23.811"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="263.605" y1="23.811" x2="395.18" y2="23.811"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="395.18" y1="23.811" x2="526.756" y2="23.811"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="526.75" y1="23.811" x2="658.327" y2="23.811"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="658.325" y1="23.811" x2="789.899" y2="23.811"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="789.899" y1="23.811" x2="924.215" y2="23.811"/>
<g>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="263.605" y1="677.763" x2="263.605" y2="24.18"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="395.18" y1="677.763" x2="395.18" y2="24.18"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="526.75" y1="677.763" x2="526.75" y2="24.18"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="658.325" y1="677.763" x2="658.325" y2="24.18"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="789.899" y1="677.763" x2="789.899" y2="24.18"/>
</g>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="923.82" y1="678.461" x2="923.82" y2="24.18"/>
<g>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="132.034" y1="154.095" x2="132.034" y2="24.18"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="132.034" y1="285.025" x2="132.034" y2="155.109"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="132.034" y1="415.954" x2="132.034" y2="286.042"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="132.034" y1="546.885" x2="132.034" y2="416.974"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="132.034" y1="677.818" x2="132.034" y2="547.906"/>
</g>
<text transform="matrix(1.0853 0 0 1 100.0732 478.4854)" fill="#6D6F71" font-family="'Univers-Condensed'" font-size="7.3311"> </text>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="1.086" y1="69.303" x2="924.381" y2="69.303"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="1.086" y1="112.768" x2="924.381" y2="112.768"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="1.086" y1="677.818" x2="924.381" y2="677.818"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="1.086" y1="156.233" x2="924.381" y2="156.233"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="1.086" y1="199.699" x2="924.381" y2="199.699"/>
<line fill="none" stroke="#000000" stroke-miterlimit="10" x1="1.086" y1="243.165" x2="924.381" y2="243.165"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="1.086" y1="286.631" x2="924.381" y2="286.631"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="1.086" y1="417.027" x2="924.381" y2="417.027"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="1.086" y1="460.491" x2="924.381" y2="460.491"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="1.086" y1="503.957" x2="924.381" y2="503.957"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="1.086" y1="590.888" x2="924.381" y2="590.888"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="1.086" y1="634.354" x2="924.381" y2="634.354"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="1.086" y1="330.096" x2="924.381" y2="330.096"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="1.086" y1="373.561" x2="924.381" y2="373.561"/>
<line fill="none" stroke="#000000" stroke-width="0.1941" stroke-miterlimit="10" x1="1.086" y1="547.422" x2="924.381" y2="547.422"/>
<g>
<rect x="5.259" y="30.715" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 5.2598 37.2954)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">7:00 AM</text>
<rect x="5.259" y="74.809" fill="none" width="64.294" height="22.784"/>
<text transform="matrix(1.0853 0 0 1 5.2598 81.3892)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">8:00 AM</text>
<rect x="5.259" y="117.889" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 5.2598 124.4692)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">9:00 AM</text>
<rect x="5.259" y="161.981" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 5.2598 168.561)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">10:00 AM</text>
<rect x="5.259" y="205.062" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 5.2598 211.6421)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">11:00 AM</text>
<rect x="5.259" y="249.155" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 5.2598 255.7358)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">12:00 PM</text>
<rect x="5.259" y="292.234" fill="none" width="64.294" height="22.787"/>
<text transform="matrix(1.0853 0 0 1 5.2598 298.8149)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">1:00 PM</text>
<rect x="5.259" y="335.315" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 5.2598 341.8965)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">2:00 PM</text>
<rect x="5.259" y="379.41" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 5.2598 385.9912)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">3:00 PM</text>
<rect x="5.259" y="422.488" fill="none" width="64.294" height="22.787"/>
<text transform="matrix(1.0853 0 0 1 5.2598 429.0684)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">4:00 PM</text>
<rect x="5.259" y="465.57" fill="none" width="64.294" height="22.787"/>
<text transform="matrix(1.0853 0 0 1 5.2598 472.1514)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">5:00 PM</text>
<rect x="5.259" y="509.663" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 5.2598 516.2441)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">6:00 PM</text>
<rect x="5.259" y="552.745" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 5.2598 559.3262)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">7:00 PM</text>
<rect x="5.259" y="595.823" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 5.2598 602.4043)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">8:00 PM</text>
<rect x="5.259" y="640.722" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 5.2598 647.3027)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">9:00 PM</text>
</g>
<g>
<rect x="139.344" y="30.715" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 139.3438 37.2954)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">7:00 AM</text>
<rect x="139.344" y="74.809" fill="none" width="64.294" height="22.784"/>
<text transform="matrix(1.0853 0 0 1 139.3438 81.3892)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">8:00 AM</text>
<rect x="139.344" y="117.889" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 139.3438 124.4692)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">9:00 AM</text>
<rect x="139.344" y="161.981" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 139.3438 168.561)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">10:00 AM</text>
<rect x="139.344" y="205.062" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 139.3438 211.6421)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">11:00 AM</text>
<rect x="139.344" y="249.155" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 139.3438 255.7358)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">12:00 PM</text>
<rect x="139.344" y="292.234" fill="none" width="64.294" height="22.787"/>
<text transform="matrix(1.0853 0 0 1 139.3438 298.8149)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">1:00 PM</text>
<rect x="139.344" y="335.315" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 139.3438 341.8965)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">2:00 PM</text>
<rect x="139.344" y="379.41" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 139.3438 385.9912)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">3:00 PM</text>
<rect x="139.344" y="422.488" fill="none" width="64.294" height="22.787"/>
<text transform="matrix(1.0853 0 0 1 139.3438 429.0684)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">4:00 PM</text>
<rect x="139.344" y="465.57" fill="none" width="64.294" height="22.787"/>
<text transform="matrix(1.0853 0 0 1 139.3438 472.1514)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">5:00 PM</text>
<rect x="139.344" y="509.663" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 139.3438 516.2441)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">6:00 PM</text>
<rect x="139.344" y="552.745" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 139.3438 559.3262)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">7:00 PM</text>
<rect x="139.344" y="595.823" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 139.3438 602.4043)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">8:00 PM</text>
<rect x="139.344" y="640.722" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 139.3438 647.3027)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">9:00 PM</text>
</g>
<g>
<rect x="269.582" y="30.715" fill="none" width="64.295" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 269.582 37.2954)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">7:00 AM</text>
<rect x="269.582" y="74.809" fill="none" width="64.295" height="22.784"/>
<text transform="matrix(1.0853 0 0 1 269.582 81.3892)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">8:00 AM</text>
<rect x="269.582" y="117.889" fill="none" width="64.295" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 269.582 124.4692)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">9:00 AM</text>
<rect x="269.582" y="161.981" fill="none" width="64.295" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 269.582 168.561)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">10:00 AM</text>
<rect x="269.582" y="205.062" fill="none" width="64.295" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 269.582 211.6421)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">11:00 AM</text>
<rect x="269.582" y="249.155" fill="none" width="64.295" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 269.582 255.7358)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">12:00 PM</text>
<rect x="269.582" y="292.234" fill="none" width="64.295" height="22.787"/>
<text transform="matrix(1.0853 0 0 1 269.582 298.8149)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">1:00 PM</text>
<rect x="269.582" y="335.315" fill="none" width="64.295" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 269.582 341.8965)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">2:00 PM</text>
<rect x="269.582" y="379.41" fill="none" width="64.295" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 269.582 385.9912)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">3:00 PM</text>
<rect x="269.582" y="422.488" fill="none" width="64.295" height="22.787"/>
<text transform="matrix(1.0853 0 0 1 269.582 429.0684)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">4:00 PM</text>
<rect x="269.582" y="465.57" fill="none" width="64.295" height="22.787"/>
<text transform="matrix(1.0853 0 0 1 269.582 472.1514)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">5:00 PM</text>
<rect x="269.582" y="509.663" fill="none" width="64.295" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 269.582 516.2441)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">6:00 PM</text>
<rect x="269.582" y="552.745" fill="none" width="64.295" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 269.582 559.3262)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">7:00 PM</text>
<rect x="269.582" y="595.823" fill="none" width="64.295" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 269.582 602.4043)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">8:00 PM</text>
<rect x="269.582" y="640.722" fill="none" width="64.295" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 269.582 647.3027)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">9:00 PM</text>
</g>
<g>
<rect x="402.018" y="30.715" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 402.0176 37.2954)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">7:00 AM</text>
<rect x="402.018" y="74.809" fill="none" width="64.294" height="22.784"/>
<text transform="matrix(1.0853 0 0 1 402.0176 81.3892)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">8:00 AM</text>
<rect x="402.018" y="117.889" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 402.0176 124.4692)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">9:00 AM</text>
<rect x="402.018" y="161.981" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 402.0176 168.561)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">10:00 AM</text>
<rect x="402.018" y="205.062" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 402.0176 211.6421)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">11:00 AM</text>
<rect x="402.018" y="249.155" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 402.0176 255.7358)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">12:00 PM</text>
<rect x="402.018" y="292.234" fill="none" width="64.294" height="22.787"/>
<text transform="matrix(1.0853 0 0 1 402.0176 298.8149)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">1:00 PM</text>
<rect x="402.018" y="335.315" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 402.0176 341.8965)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">2:00 PM</text>
<rect x="402.018" y="379.41" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 402.0176 385.9912)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">3:00 PM</text>
<rect x="402.018" y="422.488" fill="none" width="64.294" height="22.787"/>
<text transform="matrix(1.0853 0 0 1 402.0176 429.0684)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">4:00 PM</text>
<rect x="402.018" y="465.57" fill="none" width="64.294" height="22.787"/>
<text transform="matrix(1.0853 0 0 1 402.0176 472.1514)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">5:00 PM</text>
<rect x="402.018" y="509.663" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 402.0176 516.2441)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">6:00 PM</text>
<rect x="402.018" y="552.745" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 402.0176 559.3262)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">7:00 PM</text>
<rect x="402.018" y="595.823" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 402.0176 602.4043)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">8:00 PM</text>
<rect x="402.018" y="640.722" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 402.0176 647.3027)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">9:00 PM</text>
</g>
<g>
<rect x="535.004" y="30.715" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 535.0044 37.2954)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">7:00 AM</text>
<rect x="535.004" y="74.809" fill="none" width="64.294" height="22.784"/>
<text transform="matrix(1.0853 0 0 1 535.0044 81.3892)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">8:00 AM</text>
<rect x="535.004" y="117.889" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 535.0044 124.4692)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">9:00 AM</text>
<rect x="535.004" y="161.981" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 535.0044 168.561)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">10:00 AM</text>
<rect x="535.004" y="205.062" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 535.0044 211.6421)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">11:00 AM</text>
<rect x="535.004" y="249.155" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 535.0044 255.7358)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">12:00 PM</text>
<rect x="535.004" y="292.234" fill="none" width="64.294" height="22.787"/>
<text transform="matrix(1.0853 0 0 1 535.0044 298.8149)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">1:00 PM</text>
<rect x="535.004" y="335.315" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 535.0044 341.8965)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">2:00 PM</text>
<rect x="535.004" y="379.41" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 535.0044 385.9912)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">3:00 PM</text>
<rect x="535.004" y="422.488" fill="none" width="64.294" height="22.787"/>
<text transform="matrix(1.0853 0 0 1 535.0044 429.0684)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">4:00 PM</text>
<rect x="535.004" y="465.57" fill="none" width="64.294" height="22.787"/>
<text transform="matrix(1.0853 0 0 1 535.0044 472.1514)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">5:00 PM</text>
<rect x="535.004" y="509.663" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 535.0044 516.2441)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">6:00 PM</text>
<rect x="535.004" y="552.745" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 535.0044 559.3262)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">7:00 PM</text>
<rect x="535.004" y="595.823" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 535.0044 602.4043)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">8:00 PM</text>
<rect x="535.004" y="640.722" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 535.0044 647.3027)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">9:00 PM</text>
</g>
<g>
<rect x="667.991" y="30.715" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 667.9907 37.2954)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">7:00 AM</text>
<rect x="667.991" y="74.809" fill="none" width="64.294" height="22.784"/>
<text transform="matrix(1.0853 0 0 1 667.9907 81.3892)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">8:00 AM</text>
<rect x="667.991" y="117.889" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 667.9907 124.4692)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">9:00 AM</text>
<rect x="667.991" y="161.981" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 667.9907 168.561)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">10:00 AM</text>
<rect x="667.991" y="205.062" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 667.9907 211.6421)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">11:00 AM</text>
<rect x="667.991" y="249.155" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 667.9907 255.7358)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">12:00 PM</text>
<rect x="667.991" y="292.234" fill="none" width="64.294" height="22.787"/>
<text transform="matrix(1.0853 0 0 1 667.9907 298.8149)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">1:00 PM</text>
<rect x="667.991" y="335.315" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 667.9907 341.8965)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">2:00 PM</text>
<rect x="667.991" y="379.41" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 667.9907 385.9912)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">3:00 PM</text>
<rect x="667.991" y="422.488" fill="none" width="64.294" height="22.787"/>
<text transform="matrix(1.0853 0 0 1 667.9907 429.0684)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">4:00 PM</text>
<rect x="667.991" y="465.57" fill="none" width="64.294" height="22.787"/>
<text transform="matrix(1.0853 0 0 1 667.9907 472.1514)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">5:00 PM</text>
<rect x="667.991" y="509.663" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 667.9907 516.2441)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">6:00 PM</text>
<rect x="667.991" y="552.745" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 667.9907 559.3262)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">7:00 PM</text>
<rect x="667.991" y="595.823" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 667.9907 602.4043)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">8:00 PM</text>
<rect x="667.991" y="640.722" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 667.9907 647.3027)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">9:00 PM</text>
</g>
<g>
<rect x="798.785" y="30.715" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 798.7856 37.2954)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">7:00 AM</text>
<rect x="798.785" y="74.809" fill="none" width="64.294" height="22.784"/>
<text transform="matrix(1.0853 0 0 1 798.7856 81.3892)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">8:00 AM</text>
<rect x="798.785" y="117.889" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 798.7856 124.4692)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">9:00 AM</text>
<rect x="798.785" y="161.981" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 798.7856 168.561)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">10:00 AM</text>
<rect x="798.785" y="205.062" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 798.7856 211.6421)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">11:00 AM</text>
<rect x="798.785" y="249.155" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 798.7856 255.7358)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">12:00 PM</text>
<rect x="798.785" y="292.234" fill="none" width="64.294" height="22.787"/>
<text transform="matrix(1.0853 0 0 1 798.7856 298.8149)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">1:00 PM</text>
<rect x="798.785" y="335.315" fill="none" width="64.294" height="22.786"/>
<text transform="matrix(1.0853 0 0 1 798.7856 341.8965)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">2:00 PM</text>
<rect x="798.785" y="379.41" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 798.7856 385.9912)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">3:00 PM</text>
<rect x="798.785" y="422.488" fill="none" width="64.294" height="22.787"/>
<text transform="matrix(1.0853 0 0 1 798.7856 429.0684)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">4:00 PM</text>
<rect x="798.785" y="465.57" fill="none" width="64.294" height="22.787"/>
<text transform="matrix(1.0853 0 0 1 798.7856 472.1514)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">5:00 PM</text>
<rect x="798.785" y="509.663" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 798.7856 516.2441)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">6:00 PM</text>
<rect x="798.785" y="552.745" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 798.7856 559.3262)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">7:00 PM</text>
<rect x="798.785" y="595.823" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 798.7856 602.4043)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">8:00 PM</text>
<rect x="798.785" y="640.722" fill="none" width="64.294" height="22.785"/>
<text transform="matrix(1.0853 0 0 1 798.7856 647.3027)" font-family="'TradeGothic-BoldCondTwenty'" font-size="9.1147">9:00 PM</text>
</g>
<rect fill="#333333" width="924.159" height="25.506"/>
<text transform="matrix(1.0853 0 0 1 831.2505 19.2715)"><tspan x="0" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">SUND</tspan><tspan x="29.334" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">A</tspan><tspan x="35.944" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">Y</tspan></text>
<text transform="matrix(1.0853 0 0 1 40.6143 19.2715)"><tspan x="0" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">MOND</tspan><tspan x="33.003" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">A</tspan><tspan x="39.627" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">Y</tspan></text>
<text transform="matrix(1.0853 0 0 1 171.8506 19.2715)"><tspan x="0" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">TUESD</tspan><tspan x="32.989" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">A</tspan><tspan x="39.613" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">Y</tspan></text>
<text transform="matrix(1.0853 0 0 1 293.6875 19.2715)"><tspan x="0" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">WEDNESD</tspan><tspan x="52.044" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">A</tspan><tspan x="58.668" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">Y</tspan></text>
<text transform="matrix(1.0853 0 0 1 430.8813 19.2715)"><tspan x="0" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">THURSD</tspan><tspan x="41.065" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">A</tspan><tspan x="47.676" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">Y</tspan></text>
<text transform="matrix(1.0853 0 0 1 572.4614 19.2715)"><tspan x="0" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">FRID</tspan><tspan x="21.997" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">A</tspan><tspan x="28.622" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">Y</tspan></text>
<text transform="matrix(1.0853 0 0 1 693.8481 19.2715)"><tspan x="0" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">S</tspan><tspan x="6.598" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">A</tspan><tspan x="13.024" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">TURD</tspan><tspan x="40.155" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">A</tspan><tspan x="46.779" y="0" fill="#FFFFFF" font-family="'Univers-CondensedLight'" font-size="13.1959">Y</tspan></text>
</svg>
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -35,7 +35,7 @@ UBImportAdaptor::~UBImportAdaptor()
UBDocumentProxy* UBImportAdaptor::importFile(const QFile& pFile, const QString& pGroup)
{
QString documentName = QFileInfo(pFile.fileName()).baseName();
QString documentName = QFileInfo(pFile.fileName()).completeBaseName();
UBDocumentProxy* newDocument = UBPersistenceManager::persistenceManager()->createDocument(pGroup, documentName);
......
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "UBImportDocument.h"
#include "document/UBDocumentProxy.h"
#include "frameworks/UBFileSystemUtils.h"
#include "core/UBApplication.h"
#include "core/UBSettings.h"
#include "core/UBPersistenceManager.h"
#include "globals/UBGlobals.h"
THIRD_PARTY_WARNINGS_DISABLE
#include "quazip.h"
#include "quazipfile.h"
#include "quazipfileinfo.h"
THIRD_PARTY_WARNINGS_ENABLE
#include "core/memcheck.h"
UBImportDocument::UBImportDocument(QObject *parent)
:UBImportAdaptor(parent)
{
// NOOP
}
UBImportDocument::~UBImportDocument()
{
// NOOP
}
QStringList UBImportDocument::supportedExtentions()
{
return QStringList("ubz");
}
QString UBImportDocument::importFileFilter()
{
return tr("Open-Sankore (*.ubz)");
}
QString UBImportDocument::expandFileToDir(const QFile& pZipFile, const QString& pDir)
{
QDir rootDir(pDir);
QuaZip zip(pZipFile.fileName());
if(!zip.open(QuaZip::mdUnzip))
{
qWarning() << "Import failed. Cause zip.open(): " << zip.getZipError();
return "";
}
zip.setFileNameCodec("UTF-8");
QuaZipFileInfo info;
QuaZipFile file(&zip);
// TODO UB 4.x implement a mechanism that can replace an existing
// document based on the UID of the document.
bool createNewDocument = true;
QString documentRootFolder;
// first we search the metadata.rdf to check the document properties
for(bool more = zip.goToFirstFile(); more; more = zip.goToNextFile())
{
if(!zip.getCurrentFileInfo(&info))
{
qWarning() << "Import failed. Cause: getCurrentFileInfo(): " << zip.getZipError();
return "";
}
QFileInfo currentFileInfo(pDir + "/" + file.getActualFileName());
}
if (createNewDocument)
documentRootFolder = UBPersistenceManager::persistenceManager()->generateUniqueDocumentPath();
QFile out;
char c;
for(bool more=zip.goToFirstFile(); more; more=zip.goToNextFile())
{
if(!zip.getCurrentFileInfo(&info))
{
//TOD UB 4.3 O display error to user or use crash reporter
qWarning() << "Import failed. Cause: getCurrentFileInfo(): " << zip.getZipError();
return "";
}
if(!file.open(QIODevice::ReadOnly))
{
qWarning() << "Import failed. Cause: file.open(): " << zip.getZipError();
return "";
}
if(file.getZipError()!= UNZ_OK)
{
qWarning() << "Import failed. Cause: file.getFileName(): " << zip.getZipError();
return "";
}
QString newFileName = documentRootFolder + "/" + file.getActualFileName();
QFileInfo newFileInfo(newFileName);
rootDir.mkpath(newFileInfo.absolutePath());
out.setFileName(newFileName);
out.open(QIODevice::WriteOnly);
// Slow like hell (on GNU/Linux at least), but it is not my fault.
// Not ZIP/UNZIP package's fault either.
// The slowest thing here is out.putChar(c).
QByteArray outFileContent = file.readAll();
if (out.write(outFileContent) == -1)
{
qWarning() << "Import failed. Cause: Unable to write file";
out.close();
return "";
}
while(file.getChar(&c))
out.putChar(c);
out.close();
if(file.getZipError()!=UNZ_OK)
{
qWarning() << "Import failed. Cause: " << zip.getZipError();
return "";
}
if(!file.atEnd())
{
qWarning() << "Import failed. Cause: read all but not EOF";
return "";
}
file.close();
if(file.getZipError()!=UNZ_OK)
{
qWarning() << "Import failed. Cause: file.close(): " << file.getZipError();
return "";
}
}
zip.close();
if(zip.getZipError()!=UNZ_OK)
{
qWarning() << "Import failed. Cause: zip.close(): " << zip.getZipError();
return "";
}
return documentRootFolder;
}
UBDocumentProxy* UBImportDocument::importFile(const QFile& pFile, const QString& pGroup)
{
Q_UNUSED(pGroup); // group is defined in the imported file
QFileInfo fi(pFile);
UBApplication::showMessage(tr("Importing file %1...").arg(fi.baseName()), true);
// first unzip the file to the correct place
QString path = UBSettings::settings()->uniboardDocumentDirectory();
QString documentRootFolder = expandFileToDir(pFile, path);
if(!documentRootFolder.length()){
UBApplication::showMessage(tr("Import of file %1 failed.").arg(fi.baseName()));
return 0;
}
else{
UBDocumentProxy* newDocument = UBPersistenceManager::persistenceManager()->createDocumentFromDir(documentRootFolder, pGroup);
UBApplication::showMessage(tr("Import successful."));
return newDocument;
}
}
bool UBImportDocument::addFileToDocument(UBDocumentProxy* pDocument, const QFile& pFile)
{
QFileInfo fi(pFile);
UBApplication::showMessage(tr("Importing file %1...").arg(fi.baseName()), true);
QString path = UBFileSystemUtils::createTempDir();
QString documentRootFolder = expandFileToDir(pFile, path);
UBPersistenceManager::persistenceManager()->addDirectoryContentToDocument(documentRootFolder, pDocument);
UBFileSystemUtils::deleteDir(path);
UBApplication::showMessage(tr("Import successful."));
return true;
}
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "UBImportDocument.h"
#include "document/UBDocumentProxy.h"
#include "frameworks/UBFileSystemUtils.h"
#include "core/UBApplication.h"
#include "core/UBSettings.h"
#include "core/UBPersistenceManager.h"
#include "globals/UBGlobals.h"
THIRD_PARTY_WARNINGS_DISABLE
#include "quazip.h"
#include "quazipfile.h"
#include "quazipfileinfo.h"
THIRD_PARTY_WARNINGS_ENABLE
#include "core/memcheck.h"
UBImportDocument::UBImportDocument(QObject *parent)
:UBImportAdaptor(parent)
{
// NOOP
}
UBImportDocument::~UBImportDocument()
{
// NOOP
}
QStringList UBImportDocument::supportedExtentions()
{
return QStringList("ubz");
}
QString UBImportDocument::importFileFilter()
{
return tr("Open-Sankore (*.ubz)");
}
QString UBImportDocument::expandFileToDir(const QFile& pZipFile, const QString& pDir)
{
QDir rootDir(pDir);
QuaZip zip(pZipFile.fileName());
if(!zip.open(QuaZip::mdUnzip))
{
qWarning() << "Import failed. Cause zip.open(): " << zip.getZipError();
return "";
}
zip.setFileNameCodec("UTF-8");
QuaZipFileInfo info;
QuaZipFile file(&zip);
// TODO UB 4.x implement a mechanism that can replace an existing
// document based on the UID of the document.
bool createNewDocument = true;
QString documentRootFolder;
// first we search the metadata.rdf to check the document properties
for(bool more = zip.goToFirstFile(); more; more = zip.goToNextFile())
{
if(!zip.getCurrentFileInfo(&info))
{
qWarning() << "Import failed. Cause: getCurrentFileInfo(): " << zip.getZipError();
return "";
}
QFileInfo currentFileInfo(pDir + "/" + file.getActualFileName());
}
if (createNewDocument)
documentRootFolder = UBPersistenceManager::persistenceManager()->generateUniqueDocumentPath();
QFile out;
char c;
for(bool more=zip.goToFirstFile(); more; more=zip.goToNextFile())
{
if(!zip.getCurrentFileInfo(&info))
{
//TOD UB 4.3 O display error to user or use crash reporter
qWarning() << "Import failed. Cause: getCurrentFileInfo(): " << zip.getZipError();
return "";
}
if(!file.open(QIODevice::ReadOnly))
{
qWarning() << "Import failed. Cause: file.open(): " << zip.getZipError();
return "";
}
if(file.getZipError()!= UNZ_OK)
{
qWarning() << "Import failed. Cause: file.getFileName(): " << zip.getZipError();
return "";
}
QString newFileName = documentRootFolder + "/" + file.getActualFileName();
QFileInfo newFileInfo(newFileName);
rootDir.mkpath(newFileInfo.absolutePath());
out.setFileName(newFileName);
out.open(QIODevice::WriteOnly);
// Slow like hell (on GNU/Linux at least), but it is not my fault.
// Not ZIP/UNZIP package's fault either.
// The slowest thing here is out.putChar(c).
QByteArray outFileContent = file.readAll();
if (out.write(outFileContent) == -1)
{
qWarning() << "Import failed. Cause: Unable to write file";
out.close();
return "";
}
while(file.getChar(&c))
out.putChar(c);
out.close();
if(file.getZipError()!=UNZ_OK)
{
qWarning() << "Import failed. Cause: " << zip.getZipError();
return "";
}
if(!file.atEnd())
{
qWarning() << "Import failed. Cause: read all but not EOF";
return "";
}
file.close();
if(file.getZipError()!=UNZ_OK)
{
qWarning() << "Import failed. Cause: file.close(): " << file.getZipError();
return "";
}
}
zip.close();
if(zip.getZipError()!=UNZ_OK)
{
qWarning() << "Import failed. Cause: zip.close(): " << zip.getZipError();
return "";
}
return documentRootFolder;
}
UBDocumentProxy* UBImportDocument::importFile(const QFile& pFile, const QString& pGroup)
{
Q_UNUSED(pGroup); // group is defined in the imported file
QFileInfo fi(pFile);
UBApplication::showMessage(tr("Importing file %1...").arg(fi.baseName()), true);
// first unzip the file to the correct place
QString path = UBSettings::userDocumentDirectory();
QString documentRootFolder = expandFileToDir(pFile, path);
if(!documentRootFolder.length()){
UBApplication::showMessage(tr("Import of file %1 failed.").arg(fi.baseName()));
return 0;
}
else{
UBDocumentProxy* newDocument = UBPersistenceManager::persistenceManager()->createDocumentFromDir(documentRootFolder);
UBApplication::showMessage(tr("Import successful."));
return newDocument;
}
}
bool UBImportDocument::addFileToDocument(UBDocumentProxy* pDocument, const QFile& pFile)
{
QFileInfo fi(pFile);
UBApplication::showMessage(tr("Importing file %1...").arg(fi.baseName()), true);
QString path = UBFileSystemUtils::createTempDir();
QString documentRootFolder = expandFileToDir(pFile, path);
UBPersistenceManager::persistenceManager()->addDirectoryContentToDocument(documentRootFolder, pDocument);
UBFileSystemUtils::deleteDir(path);
UBApplication::showMessage(tr("Import successful."));
return true;
}
......@@ -171,20 +171,15 @@ class UBSvgSubsetAdaptor
int pointsCount = crashedPoints.size();
QString svgPoints;
static const int maxBufferLengthPerPoint = 30;
int maxBufferLength = maxBufferLengthPerPoint * pointsCount;
char *buffer = new char[maxBufferLength];
int length = 0;
QString sBuf;
for(int j = 0; j < pointsCount; j++)
{
const QPointF & point = crashedPoints.at(j);
int n = sprintf(buffer + length, "%.2f,%.2f ", point.x(), point.y());
length += n;
const QPointF & point = crashedPoints.at(j);
sBuf.sprintf("%.2f,%.2f ", point.x(), point.y());
svgPoints.insert(length, sBuf);
length += sBuf.length();
}
svgPoints = QString::fromAscii(buffer, length);
delete buffer;
return svgPoints;
}
......
......@@ -842,8 +842,6 @@ void UBBoardPaletteManager::addItemToLibrary()
if(!mPixmap.isNull())
{
QString imageDir = UBSettings::settings()->defaultUserImagesDirectory();
if(mScaleFactor != 1.)
{
mPixmap = mPixmap.scaled(mScaleFactor * mPixmap.width(), mScaleFactor* mPixmap.height()
......
......@@ -53,18 +53,15 @@ UBLibraryController::UBLibraryController(QWidget *pParentWidget) :
{
readFavoriteList();
mAudioStandardDirectoryPath = QUrl::fromLocalFile(QDesktopServices::storageLocation(QDesktopServices::MusicLocation));
userPath(mAudioStandardDirectoryPath);
mAudioStandardDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->userAudioDirectory());
mVideoStandardDirectoryPath = QUrl::fromLocalFile(QDesktopServices::storageLocation(QDesktopServices::MoviesLocation));
userPath(mVideoStandardDirectoryPath);
mVideoStandardDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->userVideoDirectory());
mPicturesStandardDirectoryPath = QUrl::fromLocalFile(QDesktopServices::storageLocation(QDesktopServices::PicturesLocation));
userPath(mPicturesStandardDirectoryPath);
mPicturesStandardDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->userImageDirectory());
mInteractiveUserDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->uniboardInteractiveUserDirectory());
mInteractiveUserDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->userInteractiveDirectory());
mAnimationUserDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->animationUserDirectory());
mAnimationUserDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->userAnimationDirectory());
createInternalWidgetItems();
......@@ -72,8 +69,8 @@ UBLibraryController::UBLibraryController(QWidget *pParentWidget) :
bool UBLibraryController::canItemsOnElementBeDeleted(UBLibElement *pElement)
{
return !pElement->path().toLocalFile().startsWith(UBSettings::settings()->uniboardShapeLibraryDirectory()) &&
!pElement->path().toLocalFile().startsWith(UBSettings::settings()->sankoreDistributedInteractiveDirectory()) &&
return !pElement->path().toLocalFile().startsWith(UBSettings::settings()->applicationShapeLibraryDirectory()) &&
!pElement->path().toLocalFile().startsWith(UBSettings::settings()->applicationInteractivesDirectory()) &&
pElement->isDeletable();
}
......@@ -163,7 +160,7 @@ void UBLibraryController::importItemOnLibrary(QString& pItemString)
bool isZip = false;
if(itemToImport.isDir() || (isZip = UBFileSystemUtils::isAZipFile(pItemString))){
if(pItemString.contains(".wgt",Qt::CaseInsensitive) || pItemString.contains(".wdgt",Qt::CaseInsensitive)){
QString destination = UBSettings::settings()->uniboardInteractiveUserDirectory() + "/" + itemToImport.fileName();
QString destination = UBSettings::settings()->userInteractiveDirectory() + "/" + itemToImport.fileName();
if(isZip)
UBFileSystemUtils::expandZipToDir(pItemString,destination);
else{
......@@ -209,12 +206,6 @@ void UBLibraryController::importItemOnLibrary(QString& pItemString)
}
void UBLibraryController::userPath(QUrl& pPath)
{
pPath = QUrl::fromLocalFile(pPath.toLocalFile() + "/Sankore");
createDirectory(pPath);
}
QList<UBLibElement*> UBLibraryController::rootCategoriesList()
{
QList<UBLibElement*> categories;
......@@ -234,7 +225,7 @@ QList<UBLibElement*> UBLibraryController::rootCategoriesList()
element->setMoveable(false);
categories << element;
QString path = UBSettings::settings()->uniboardShapeLibraryDirectory();
QString path = UBSettings::settings()->applicationShapeLibraryDirectory();
element = new UBLibElement(eUBLibElementType_Folder, QUrl::fromLocalFile(path), tr("Shapes", "Shapes category element"));
element->setThumbnail(QImage(":images/libpalette/ShapesCategory.svg"));
element->setMoveable(false);
......@@ -250,14 +241,14 @@ QList<UBLibElement*> UBLibraryController::rootCategoriesList()
element->setMoveable(false);
categories << element;
mInteractiveCategoryPath = QUrl::fromLocalFile(UBSettings::settings()->uniboardGipLibraryDirectory());
mInteractiveCategoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationGipLibraryDirectory());
element = new UBLibElement(eUBLibElementType_Folder, mInteractiveCategoryPath, tr("Interactivities", "Interactives category element"));
element->setThumbnail(QImage(":images/libpalette/InteractivesCategory.svg"));
element->setMoveable(false);
categories << element;
// Note : FEATURE IN DEVELOPMENT, DO NOT ERASE (or you will get problems) !!!!
mSearchCategoryPath = QUrl::fromLocalFile(UBSettings::settings()->uniboardSearchDirectory());
mSearchCategoryPath = QUrl::fromLocalFile(UBSettings::userSearchDirectory());
element = new UBLibElement(eUBLibElementType_Folder, mSearchCategoryPath, tr("Web Search", "Web search category element"));
element->setThumbnail(QImage(":images/libpalette/WebSearchCategory.svg"));
element->setMoveable(false);
......@@ -333,19 +324,17 @@ QList<UBLibElement*> UBLibraryController::addVirtualElementsForItemPath(const QS
{
QList<UBLibElement*> content;
if (pPath == mInteractiveUserDirectoryPath.toLocalFile()){
content << listElementsInPath(UBSettings::settings()->uniboardInteractiveLibraryDirectory());
content << listElementsInPath(UBSettings::settings()->uniboardInteractiveFavoritesDirectory());
content << listElementsInPath(UBSettings::settings()->applicationApplicationsLibraryDirectory());
content << listElementsInPath(UBSettings::settings()->userInteractiveFavoritesDirectory());
foreach(UBLibElement* eachElement, mInternalLibElements)
content << new UBLibElement(eachElement);
}
else if (pPath == mPicturesStandardDirectoryPath.toLocalFile()){
QUrl path = QUrl::fromLocalFile(UBSettings::settings()->uniboardImageLibraryDirectory());
userPath(path);
QUrl path = QUrl::fromLocalFile(UBSettings::settings()->applicationImageLibraryDirectory());
content << listElementsInPath(path.toLocalFile());
content << listElementsInPath(UBSettings::settings()->uniboardDefaultUserImageLibraryDirectory());
}
else if (pPath == mInteractiveCategoryPath.toLocalFile()){
content << listElementsInPath(UBSettings::settings()->sankoreDistributedInteractiveDirectory());
content << listElementsInPath(UBSettings::settings()->applicationInteractivesDirectory());
}
return content;
......@@ -548,7 +537,7 @@ UBGraphicsScene* UBLibraryController::activeScene()
void UBLibraryController::persistFavoriteList()
{
QFile file(UBSettings::libraryPaletteFavoriteListFilePath());
QFile file(UBSettings::userFavoriteListFilePath());
file.open(QIODevice::WriteOnly);
QDataStream out(&file);
//magic number
......@@ -567,7 +556,7 @@ void UBLibraryController::persistFavoriteList()
void UBLibraryController::readFavoriteList()
{
QFile file(UBSettings::libraryPaletteFavoriteListFilePath());
QFile file(UBSettings::userFavoriteListFilePath());
file.open(QIODevice::ReadOnly);
QDataStream in(&file); // read the data serialized from the file
quint32 magicNumber;
......@@ -649,11 +638,11 @@ QRectF UBLibraryController::visibleSceneRect()
void UBLibraryController::addImagesToCurrentPage(const QList<QUrl>& images)
{
QPointF pos = visibleSceneRect().center();
QPointF pos = UBApplication::boardController->activeScene()->normalizedSceneRect().center();
foreach(const QUrl url, images)
{
mLastItemOffsetIndex++;
mLastItemOffsetIndex = qMin(mLastItemOffsetIndex, 5);
QGraphicsItem* itemInScene = 0;
......@@ -662,6 +651,8 @@ void UBLibraryController::addImagesToCurrentPage(const QList<QUrl>& images)
QString mimeType = UBFileSystemUtils::mimeTypeFromFileName(
url.toString());
pos = QPointF(pos.x() + 50 * mLastItemOffsetIndex, pos.y() + 50 * mLastItemOffsetIndex);
mLastItemOffsetIndex++;
//TODO UB 4.x move this logic to the scene ..
if (mimeType == "image/svg+xml") {
itemInScene = activeScene()->addSvg(url, pos);
......@@ -673,8 +664,6 @@ void UBLibraryController::addImagesToCurrentPage(const QList<QUrl>& images)
if (itemInScene) {
itemInScene = activeScene()->scaleToFitDocumentSize(itemInScene, false, UBSettings::objectInControlViewMargin);
itemInScene->setPos(QPoint(pos.x() + 50 * mLastItemOffsetIndex, pos.y() + 50 * mLastItemOffsetIndex));
}
}
}
......@@ -819,7 +808,7 @@ QUrl UBChainedLibElement::lastItemPath()
UBLibElement* UBLibElement::trashElement()
{
UBLibElement *trashElement;
trashElement = new UBLibElement(eUBLibElementType_Folder, QUrl::fromLocalFile(UBSettings::trashLibraryPaletteDirPath()), QObject::tr("Trash", "Pictures category element"));
trashElement = new UBLibElement(eUBLibElementType_Folder, QUrl::fromLocalFile(UBSettings::userTrashDirPath()), QObject::tr("Trash", "Pictures category element"));
trashElement->setThumbnail(QImage(":images/libpalette/TrashCategory.svg"));
trashElement->setMoveable(false);
......
......@@ -212,7 +212,7 @@ int UBApplication::exec(const QString& pFileToImport)
{
QPixmapCache::setCacheLimit(1024 * 100);
QString webDbPath = UBSettings::uniboardDataDirectory() + "/web-databases";
QString webDbPath = UBSettings::userDataDirectory() + "/web-databases";
QDir webDbDir(webDbPath);
if (!webDbDir.exists(webDbPath))
webDbDir.mkpath(webDbPath);
......
......@@ -313,7 +313,7 @@ void UBApplicationController::addCapturedEmbedCode(const QString& embedCode)
{
showBoard();
const QString userWidgetPath = UBSettings::settings()->uniboardInteractiveUserDirectory() + "/" + tr("Web"); // TODO UB 4.x synch with w3cWidget
const QString userWidgetPath = UBSettings::settings()->userInteractiveDirectory() + "/" + tr("Web"); // TODO UB 4.x synch with w3cWidget
QDir userWidgetDir(userWidgetPath);
int width = 300;
......
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "UBPersistenceManager.h"
#include "gui/UBMainWindow.h"
#include <QtXml>
#include "frameworks/UBPlatformUtils.h"
#include "frameworks/UBFileSystemUtils.h"
#include "core/UBApplication.h"
#include "core/UBSettings.h"
#include "core/UBSetting.h"
#include "document/UBDocumentProxy.h"
#include "adaptors/UBExportPDF.h"
#include "adaptors/UBSvgSubsetAdaptor.h"
#include "adaptors/UBThumbnailAdaptor.h"
#include "adaptors/UBMetadataDcSubsetAdaptor.h"
#include "core/memcheck.h"
const QString UBPersistenceManager::imageDirectory = "images"; // added to UBPersistenceManager::mAllDirectories
const QString UBPersistenceManager::objectDirectory = "objects"; // added to UBPersistenceManager::mAllDirectories
const QString UBPersistenceManager::widgetDirectory = "widgets"; // added to UBPersistenceManager::mAllDirectories
const QString UBPersistenceManager::videoDirectory = "videos"; // added to UBPersistenceManager::mAllDirectories
const QString UBPersistenceManager::audioDirectory = "audios"; // added to
UBPersistenceManager * UBPersistenceManager::sSingleton = 0;
UBPersistenceManager::UBPersistenceManager(QObject *pParent)
: QObject(pParent)
, mHasPurgedDocuments(false)
{
mDocumentSubDirectories << imageDirectory;
mDocumentSubDirectories << objectDirectory;
mDocumentSubDirectories << widgetDirectory;
mDocumentSubDirectories << videoDirectory;
mDocumentSubDirectories << audioDirectory;
documentProxies = allDocumentProxies();
emit proxyListChanged();
}
UBPersistenceManager* UBPersistenceManager::persistenceManager()
{
if (!sSingleton)
{
sSingleton = new UBPersistenceManager(UBApplication::staticMemoryCleaner);
}
return sSingleton;
}
void UBPersistenceManager::destroy()
{
if (sSingleton)
delete sSingleton;
sSingleton = NULL;
}
UBPersistenceManager::~UBPersistenceManager()
{
foreach(QPointer<UBDocumentProxy> proxyGuard, documentProxies)
{
if (!proxyGuard.isNull())
delete proxyGuard.data();
}
}
QList<QPointer<UBDocumentProxy> > UBPersistenceManager::allDocumentProxies()
{
mDocumentRepositoryPath = UBSettings::settings()->uniboardDocumentDirectory();
QDir rootDir(mDocumentRepositoryPath);
rootDir.mkpath(rootDir.path());
QFileSystemWatcher* watcher = new QFileSystemWatcher(this);
watcher->addPath(mDocumentRepositoryPath);
connect(watcher, SIGNAL(directoryChanged(const QString&)), this, SLOT(documentRepositoryChanged(const QString&)));
QList<QPointer<UBDocumentProxy> > proxies;
foreach(QString path, rootDir.entryList(QDir::Dirs | QDir::NoDotAndDotDot,
QDir::Time | QDir::Reversed))
{
QString fullPath = rootDir.path() + "/" + path;
QDir dir(fullPath);
if (dir.entryList(QDir::Files | QDir::NoDotAndDotDot).size() > 0)
{
UBDocumentProxy* proxy = new UBDocumentProxy(fullPath); // deleted in UBPersistenceManager::destructor
QMap<QString, QVariant> metadatas = UBMetadataDcSubsetAdaptor::load(fullPath);
foreach(QString key, metadatas.keys())
{
proxy->setMetaData(key, metadatas.value(key));
}
proxy->setPageCount(sceneCount(proxy));
proxies << QPointer<UBDocumentProxy>(proxy);
}
}
return proxies;
}
QStringList UBPersistenceManager::allShapes()
{
QString shapeLibraryPath = UBSettings::settings()->uniboardShapeLibraryDirectory();
QDir dir(shapeLibraryPath);
if (!dir.exists())
dir.mkpath(shapeLibraryPath);
QStringList files = dir.entryList(QDir::Files | QDir::NoDotAndDotDot, QDir::Name);
QStringList paths;
foreach(QString file, files)
{
paths.append(shapeLibraryPath + QString("/") + file);
}
return paths;
}
QStringList UBPersistenceManager::allGips()
{
QString gipLibraryPath = UBSettings::settings()->uniboardGipLibraryDirectory();
QDir dir(gipLibraryPath);
QStringList files = dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name);
QStringList paths;
foreach(QString file, files)
{
QFileInfo fi(file);
if (UBSettings::settings()->widgetFileExtensions.contains(fi.suffix()))
paths.append(dir.path() + QString("/") + file);
}
return paths;
}
QStringList UBPersistenceManager::allSounds()
{
QString soundLibraryPath = QDesktopServices::storageLocation(QDesktopServices::MusicLocation);
QDir dir(soundLibraryPath);
QStringList files = dir.entryList(QDir::Files | QDir::NoDotAndDotDot, QDir::Name);
QStringList paths;
foreach(QString file, files)
{
QFileInfo fi(file);
paths.append(dir.path() + QString("/") + file);
}
return paths;
}
QStringList UBPersistenceManager::allImages(const QDir& dir)
{
if (!dir.exists())
dir.mkpath(dir.path());
QStringList files = dir.entryList(QDir::Files | QDir::Hidden | QDir::NoDotAndDotDot, QDir::Name);
QStringList paths;
foreach(QString file, files)
{
paths.append(dir.path() + QString("/") + file);
}
return paths;
}
QStringList UBPersistenceManager::allVideos(const QDir& dir)
{
if (!dir.exists())
dir.mkpath(dir.path());
QStringList files = dir.entryList(QDir::Files | QDir::NoDotAndDotDot, QDir::Name);
QStringList paths;
foreach(QString file, files)
{
paths.append(dir.path() + QString("/") + file);
}
return paths;
}
QStringList UBPersistenceManager::allWidgets(const QDir& dir)
{
if (!dir.exists())
dir.mkpath(dir.path());
QStringList files = dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name);
QStringList paths;
foreach(QString file, files)
{
QFileInfo fi(file);
if (UBSettings::settings()->widgetFileExtensions.contains(fi.suffix()))
paths.append(dir.path() + QString("/") + file);
}
return paths;
}
UBDocumentProxy* UBPersistenceManager::createDocument(const QString& pGroupName, const QString& pName, bool withEmptyPage)
{
checkIfDocumentRepositoryExists();
UBDocumentProxy *doc = new UBDocumentProxy(); // deleted in UBPersistenceManager::destructor
if (pGroupName.length() > 0)
{
doc->setMetaData(UBSettings::documentGroupName, pGroupName);
}
if (pName.length() > 0)
{
doc->setMetaData(UBSettings::documentName, pName);
}
doc->setMetaData(UBSettings::documentVersion, UBSettings::currentFileVersion);
doc->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime()));
if (withEmptyPage) createDocumentSceneAt(doc, 0);
documentProxies.insert(0, QPointer<UBDocumentProxy>(doc));
emit proxyListChanged();
emit documentCreated(doc);
mDocumentCreatedDuringSession << doc;
return doc;
}
UBDocumentProxy* UBPersistenceManager::createDocumentFromDir(const QString& pDocumentDirectory, const QString& pGroupName, const QString& pName, bool withEmptyPage)
{
checkIfDocumentRepositoryExists();
UBDocumentProxy* doc = new UBDocumentProxy(pDocumentDirectory); // deleted in UBPersistenceManager::destructor
if (pGroupName.length() > 0)
{
doc->setMetaData(UBSettings::documentGroupName, pGroupName);
}
if (pName.length() > 0)
{
doc->setMetaData(UBSettings::documentName, pName);
}
if (withEmptyPage) createDocumentSceneAt(doc, 0);
QMap<QString, QVariant> metadatas = UBMetadataDcSubsetAdaptor::load(pDocumentDirectory);
foreach(QString key, metadatas.keys())
{
doc->setMetaData(key, metadatas.value(key));
}
doc->setUuid(QUuid::createUuid());
doc->setPageCount(sceneCount(doc));
UBMetadataDcSubsetAdaptor::persist(doc);
for(int i = 0; i < doc->pageCount(); i++)
{
UBSvgSubsetAdaptor::setSceneUuid(doc, i, QUuid::createUuid());
}
documentProxies << QPointer<UBDocumentProxy>(doc);
emit proxyListChanged();
emit documentCreated(doc);
return doc;
}
void UBPersistenceManager::deleteDocument(UBDocumentProxy* pDocumentProxy)
{
checkIfDocumentRepositoryExists();
emit documentWillBeDeleted(pDocumentProxy);
UBFileSystemUtils::deleteDir(pDocumentProxy->persistencePath());
documentProxies.removeAll(QPointer<UBDocumentProxy>(pDocumentProxy));
mDocumentCreatedDuringSession.removeAll(pDocumentProxy);
mSceneCache.removeAllScenes(pDocumentProxy);
pDocumentProxy->deleteLater();
emit proxyListChanged();
}
UBDocumentProxy* UBPersistenceManager::duplicateDocument(UBDocumentProxy* pDocumentProxy)
{
checkIfDocumentRepositoryExists();
UBDocumentProxy *copy = new UBDocumentProxy(); // deleted in UBPersistenceManager::destructor
generatePathIfNeeded(copy);
UBFileSystemUtils::copyDir(pDocumentProxy->persistencePath(), copy->persistencePath());
// regenerate scenes UUIDs
for(int i = 0; i < pDocumentProxy->pageCount(); i++)
{
UBSvgSubsetAdaptor::setSceneUuid(pDocumentProxy, i, QUuid::createUuid());
}
foreach(QString key, pDocumentProxy->metaDatas().keys())
{
copy->setMetaData(key, pDocumentProxy->metaDatas().value(key));
}
copy->setMetaData(UBSettings::documentName,
pDocumentProxy->metaData(UBSettings::documentName).toString() + " " + tr("(copy)"));
copy->setUuid(QUuid::createUuid());
persistDocumentMetadata(copy);
copy->setPageCount(sceneCount(copy));
documentProxies << QPointer<UBDocumentProxy>(copy);
emit proxyListChanged();
emit documentCreated(copy);
return copy;
}
void UBPersistenceManager::deleteDocumentScenes(UBDocumentProxy* proxy, const QList<int>& indexes)
{
checkIfDocumentRepositoryExists();
int pageCount = UBPersistenceManager::persistenceManager()->sceneCount(proxy);
QList<int> compactedIndexes;
foreach(int index, indexes)
{
if (!compactedIndexes.contains(index))
compactedIndexes.append(index);
}
if (compactedIndexes.size() == pageCount)
{
deleteDocument(proxy);
return;
}
if (compactedIndexes.size() == 0)
return;
foreach(int index, compactedIndexes)
{
emit documentSceneWillBeDeleted(proxy, index);
}
QString sourceGroupName = proxy->metaData(UBSettings::documentGroupName).toString();
QString sourceName = proxy->metaData(UBSettings::documentName).toString();
UBDocumentProxy *trashDocProxy = createDocument(UBSettings::trashedDocumentGroupNamePrefix + sourceGroupName, sourceName, false);
foreach(int index, compactedIndexes)
{
UBGraphicsScene *scene = loadDocumentScene(proxy, index);
if (scene)
{
//scene is about to move into new document
foreach (QUrl relativeFile, scene->relativeDependencies())
{
QString source = scene->document()->persistencePath() + "/" + relativeFile.toString();
QString target = trashDocProxy->persistencePath() + "/" + relativeFile.toString();
QFileInfo fi(target);
QDir d = fi.dir();
d.mkpath(d.absolutePath());
QFile::copy(source, target);
}
insertDocumentSceneAt(trashDocProxy, scene, trashDocProxy->pageCount());
}
}
for (int i = 1; i < pageCount; i++)
{
renamePage(trashDocProxy, i , i - 1);
}
foreach(int index, compactedIndexes)
{
QString svgFileName = proxy->persistencePath() +
UBFileSystemUtils::digitFileFormat("/page%1.svg", index + 1);
QFile::remove(svgFileName);
QString thumbFileName = proxy->persistencePath() +
UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", index + 1);
QFile::remove(thumbFileName);
mSceneCache.removeScene(proxy, index);
proxy->decPageCount();
}
qSort(compactedIndexes);
int offset = 1;
for (int i = compactedIndexes.at(0) + 1; i < pageCount; i++)
{
if(compactedIndexes.contains(i))
{
offset++;
}
else
{
renamePage(proxy, i , i - offset);
mSceneCache.moveScene(proxy, i, i - offset);
}
}
foreach(int index, compactedIndexes)
{
emit documentSceneDeleted(proxy, index);
}
}
void UBPersistenceManager::duplicateDocumentScene(UBDocumentProxy* proxy, int index)
{
checkIfDocumentRepositoryExists();
int pageCount = UBPersistenceManager::persistenceManager()->sceneCount(proxy);
for (int i = pageCount; i > index + 1; i--)
{
renamePage(proxy, i - 1 , i);
mSceneCache.moveScene(proxy, i - 1, i);
}
copyPage(proxy, index , index + 1);
proxy->incPageCount();
//due to architectural peculiarity we need to save teacher bar info, otherwise we'll see not exactly what we expect
sTeacherBarInfos properInfo = getTeacherBarInfos(proxy, index + 1);
//after the call below
emit documentSceneCreated(proxy, index + 1);
//restoring info
persistTeacherBar(proxy, index + 1, properInfo);
}
UBGraphicsScene* UBPersistenceManager::createDocumentSceneAt(UBDocumentProxy* proxy, int index)
{
int count = sceneCount(proxy);
for(int i = count - 1; i >= index; i--)
{
renamePage(proxy, i , i + 1);
}
mSceneCache.shiftUpScenes(proxy, index, count -1);
UBGraphicsScene *newScene = mSceneCache.createScene(proxy, index);
newScene->setBackground(UBSettings::settings()->isDarkBackground(),
UBSettings::settings()->UBSettings::isCrossedBackground());
persistDocumentScene(proxy, newScene, index);
proxy->incPageCount();
emit documentSceneCreated(proxy, index);
return newScene;
}
void UBPersistenceManager::insertDocumentSceneAt(UBDocumentProxy* proxy, UBGraphicsScene* scene, int index)
{
scene->setDocument(proxy);
int count = sceneCount(proxy);
for(int i = count - 1; i >= index; i--)
{
renamePage(proxy, i , i + 1);
}
mSceneCache.shiftUpScenes(proxy, index, count -1);
mSceneCache.insert(proxy, index, scene);
persistDocumentScene(proxy, scene, index);
proxy->incPageCount();
emit documentSceneCreated(proxy, index);
}
void UBPersistenceManager::moveSceneToIndex(UBDocumentProxy* proxy, int source, int target)
{
checkIfDocumentRepositoryExists();
if (source == target)
return;
QFile svgTmp(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", source + 1));
svgTmp.rename(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.tmp", target + 1));
QFile thumbTmp(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", source + 1));
thumbTmp.rename(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.tmp", target + 1));
if (source < target)
{
for (int i = source + 1; i <= target; i++)
{
renamePage(proxy, i , i - 1);
}
}
else
{
for (int i = source - 1; i >= target; i--)
{
renamePage(proxy, i , i + 1);
}
}
QFile svg(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.tmp", target + 1));
svg.rename(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", target + 1));
QFile thumb(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.tmp", target + 1));
thumb.rename(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", target + 1));
mSceneCache.moveScene(proxy, source, target);
emit documentSceneMoved(proxy, target);
}
UBGraphicsScene* UBPersistenceManager::loadDocumentScene(UBDocumentProxy* proxy, int sceneIndex)
{
if (mSceneCache.contains(proxy, sceneIndex))
{
//qDebug() << "scene" << sceneIndex << "retrieved from cache ...";
return mSceneCache.value(proxy, sceneIndex);
}
else
{
UBGraphicsScene* scene = UBSvgSubsetAdaptor::loadScene(proxy, sceneIndex);
if (scene)
mSceneCache.insert(proxy, sceneIndex, scene);
return scene;
}
}
void UBPersistenceManager::persistDocumentScene(UBDocumentProxy* pDocumentProxy, UBGraphicsScene* pScene, const int pSceneIndex)
{
checkIfDocumentRepositoryExists();
pScene->deselectAllItems();
generatePathIfNeeded(pDocumentProxy);
QDir dir(pDocumentProxy->persistencePath());
dir.mkpath(pDocumentProxy->persistencePath());
if (pDocumentProxy->isModified())
UBMetadataDcSubsetAdaptor::persist(pDocumentProxy);
if (pScene->isModified())
{
UBThumbnailAdaptor::persistScene(pDocumentProxy->persistencePath(), pScene, pSceneIndex);
UBSvgSubsetAdaptor::persistScene(pDocumentProxy, pScene, pSceneIndex);
pScene->setModified(false);
}
mSceneCache.insert(pDocumentProxy, pSceneIndex, pScene);
emit documentCommitted(pDocumentProxy);
}
UBDocumentProxy* UBPersistenceManager::persistDocumentMetadata(UBDocumentProxy* pDocumentProxy)
{
UBMetadataDcSubsetAdaptor::persist(pDocumentProxy);
emit documentMetadataChanged(pDocumentProxy);
return pDocumentProxy;
}
void UBPersistenceManager::renamePage(UBDocumentProxy* pDocumentProxy, const int sourceIndex, const int targetIndex)
{
QFile svg(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", sourceIndex + 1));
svg.rename(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", targetIndex + 1));
QFile thumb(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", sourceIndex + 1));
thumb.rename(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", targetIndex + 1));
}
void UBPersistenceManager::copyPage(UBDocumentProxy* pDocumentProxy, const int sourceIndex, const int targetIndex)
{
QFile svg(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", sourceIndex + 1));
svg.copy(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", targetIndex + 1));
UBSvgSubsetAdaptor::setSceneUuid(pDocumentProxy, targetIndex, QUuid::createUuid());
QFile thumb(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", sourceIndex + 1));
thumb.copy(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", targetIndex + 1));
}
int UBPersistenceManager::sceneCount(const UBDocumentProxy* proxy)
{
return sceneCountInDir(proxy->persistencePath());
}
int UBPersistenceManager::sceneCountInDir(const QString& pPath)
{
int pageIndex = 0;
bool moreToProcess = true;
while (moreToProcess)
{
QString fileName = pPath + UBFileSystemUtils::digitFileFormat("/page%1.svg", pageIndex + 1);
QFile file(fileName);
if (file.exists())
{
pageIndex++;
}
else
{
moreToProcess = false;
}
}
return pageIndex;
}
QString UBPersistenceManager::generateUniqueDocumentPath()
{
QString ubPath = UBSettings::settings()->uniboardDocumentDirectory();
QDateTime now = QDateTime::currentDateTime();
QString dirName = now.toString("yyyy-MM-dd hh-mm-ss.zzz");
return ubPath + QString("/Sankore Document %1").arg(dirName);
}
void UBPersistenceManager::generatePathIfNeeded(UBDocumentProxy* pDocumentProxy)
{
if (pDocumentProxy->persistencePath().length() == 0)
{
pDocumentProxy->setPersistencePath(generateUniqueDocumentPath());
}
}
void UBPersistenceManager::addDirectoryContentToDocument(const QString& documentRootFolder, UBDocumentProxy* pDocument)
{
int sourcePageCount = sceneCountInDir(documentRootFolder);
int targetPageCount = pDocument->pageCount();
for(int sourceIndex = 0 ; sourceIndex < sourcePageCount; sourceIndex++)
{
int targetIndex = targetPageCount + sourceIndex;
QFile svg(documentRootFolder + UBFileSystemUtils::digitFileFormat("/page%1.svg", sourceIndex + 1));
svg.copy(pDocument->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", targetIndex + 1));
UBSvgSubsetAdaptor::setSceneUuid(pDocument, targetIndex, QUuid::createUuid());
QFile thumb(documentRootFolder + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", sourceIndex + 1));
thumb.copy(pDocument->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", targetIndex + 1));
}
foreach(QString dir, mDocumentSubDirectories)
{
qDebug() << "copying " << documentRootFolder << "/" << dir << " to " << pDocument->persistencePath() << "/" + dir;
UBFileSystemUtils::copyDir(documentRootFolder + "/" + dir, pDocument->persistencePath() + "/" + dir);
}
pDocument->setPageCount(sceneCount(pDocument));
}
void UBPersistenceManager::upgradeDocumentIfNeeded(UBDocumentProxy* pDocumentProxy)
{
int pageCount = pDocumentProxy->pageCount();
for(int index = 0 ; index < pageCount; index++)
{
UBSvgSubsetAdaptor::upgradeScene(pDocumentProxy, index);
}
pDocumentProxy->setMetaData(UBSettings::documentVersion, UBSettings::currentFileVersion);
UBMetadataDcSubsetAdaptor::persist(pDocumentProxy);
}
void UBPersistenceManager::upgradeAllDocumentsIfNeeded()
{
foreach(QPointer<UBDocumentProxy> proxy, documentProxies)
{
upgradeDocumentIfNeeded(proxy);
}
}
UBDocumentProxy* UBPersistenceManager::documentByUuid(const QUuid& pUuid)
{
for(int i = 0 ; i < documentProxies.length(); i++)
{
UBDocumentProxy* proxy = documentProxies.at(i);
if (proxy && proxy->uuid() == pUuid)
{
return proxy;
}
}
return 0;
}
bool UBPersistenceManager::isEmpty(UBDocumentProxy* pDocumentProxy)
{
if(!pDocumentProxy)
return true;
if (pDocumentProxy->pageCount() > 1)
return false;
UBGraphicsScene *theSoleScene = UBSvgSubsetAdaptor::loadScene(pDocumentProxy, 0);
bool empty = false;
if (theSoleScene)
{
empty = theSoleScene->isEmpty();
delete theSoleScene;
}
else
{
empty = true;
}
return empty;
}
void UBPersistenceManager::purgeEmptyDocuments()
{
if(!mHasPurgedDocuments) // hack to workaround the fact that app closing is called twice :-(
{
QList<UBDocumentProxy*> toBeDeleted;
foreach(UBDocumentProxy* docProxy, mDocumentCreatedDuringSession)
{
if (isEmpty(docProxy))
{
toBeDeleted << docProxy;
}
}
foreach(UBDocumentProxy* docProxy, toBeDeleted)
{
deleteDocument(docProxy);
}
mHasPurgedDocuments = true;
}
}
QString UBPersistenceManager::addVideoFileToDocument(UBDocumentProxy* pDocumentProxy, QString path, QUuid objectUuid)
{
QFileInfo fi(path);
if (!fi.exists() || !pDocumentProxy || objectUuid.isNull())
return "";
QString fileName = UBPersistenceManager::videoDirectory + "/" + objectUuid.toString() + "." + fi.suffix();
QString destPath = pDocumentProxy->persistencePath() + "/" + fileName;
if (!QFile::exists(destPath))
{
QDir dir;
dir.mkdir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::videoDirectory);
QFile source(path);
source.copy(destPath);
}
return fileName;
}
QString UBPersistenceManager::addVideoFileToDocument(UBDocumentProxy* pDocumentProxy, QUrl sourceUrl, QByteArray pPayload, QUuid objectUuid)
{
if (!pDocumentProxy || objectUuid.isNull())
return "";
QString urlPath = sourceUrl.path();
int lastDot = urlPath.lastIndexOf(".");
QString suffix = urlPath.right(urlPath.length() - lastDot - 1);
QString fileName = UBPersistenceManager::videoDirectory + "/" + objectUuid.toString() + "." + suffix;
QString destPath = pDocumentProxy->persistencePath() + "/" + fileName;
if (!QFile::exists(destPath))
{
QDir dir;
dir.mkdir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::videoDirectory);
QFile newFile(destPath);
if (newFile.open(QIODevice::WriteOnly))
{
newFile.write(pPayload);
newFile.flush();
newFile.close();
}
}
return fileName;
}
QString UBPersistenceManager::addAudioFileToDocument(UBDocumentProxy* pDocumentProxy, QString path, QUuid objectUuid)
{
QFileInfo fi(path);
if (!fi.exists() || !pDocumentProxy || objectUuid.isNull())
return "";
QString fileName = UBPersistenceManager::audioDirectory + "/" + objectUuid.toString() + "." + fi.suffix();
QString destPath = pDocumentProxy->persistencePath() + "/" + fileName;
if (!QFile::exists(destPath))
{
QDir dir;
dir.mkdir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::audioDirectory);
QFile source(path);
source.copy(destPath);
}
return fileName;
}
QString UBPersistenceManager::addAudioFileToDocument(UBDocumentProxy* pDocumentProxy, QUrl sourceUrl, QByteArray pPayload, QUuid objectUuid)
{
if (!pDocumentProxy || objectUuid.isNull())
return "";
QString urlPath = sourceUrl.path();
int lastDot = urlPath.lastIndexOf(".");
QString suffix = urlPath.right(urlPath.length() - lastDot - 1);
QString fileName = UBPersistenceManager::audioDirectory + "/" + objectUuid.toString() + "." + suffix;
QString destPath = pDocumentProxy->persistencePath() + "/" + fileName;
if (!QFile::exists(destPath))
{
QDir dir;
dir.mkdir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::audioDirectory);
QFile newFile(destPath);
if (newFile.open(QIODevice::WriteOnly))
{
newFile.write(pPayload);
newFile.flush();
newFile.close();
}
}
return fileName;
}
QString UBPersistenceManager::addPdfFileToDocument(UBDocumentProxy* pDocumentProxy, QString path, QUuid objectUuid)
{
QFileInfo fi(path);
if (!fi.exists() || !pDocumentProxy || objectUuid.isNull())
return "";
QString fileName = UBPersistenceManager::objectDirectory + "/" + objectUuid.toString() + "." + fi.suffix();
QString destPath = pDocumentProxy->persistencePath() + "/" + fileName;
if (!QFile::exists(destPath))
{
QDir dir;
dir.mkpath(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::objectDirectory);
QFile source(path);
source.copy(destPath);
}
return fileName;
}
QString UBPersistenceManager::addGraphicsWidgteToDocument(UBDocumentProxy *pDocumentProxy, QString path, QUuid objectUuid)
{
QFileInfo fi(path);
if (!fi.exists() || !pDocumentProxy || objectUuid.isNull())
return "";
QString widgetRootDir = path;
QString extension = QFileInfo(widgetRootDir).suffix();
QString widgetTargetDir = pDocumentProxy->persistencePath() + "/" + widgetDirectory + "/" + objectUuid.toString() + "." + extension;
if (!QFile::exists(widgetTargetDir)) {
QDir dir;
dir.mkpath(widgetTargetDir);
UBFileSystemUtils::copyDir(widgetRootDir, widgetTargetDir);
}
if (!QFile::exists(widgetTargetDir))
widgetTargetDir = QString();
return widgetTargetDir;
}
void UBPersistenceManager::documentRepositoryChanged(const QString& path)
{
Q_UNUSED(path);
checkIfDocumentRepositoryExists();
}
void UBPersistenceManager::checkIfDocumentRepositoryExists()
{
QDir rp(mDocumentRepositoryPath);
if (!rp.exists())
{
// we have lost the document repository ..
QString humanPath = QDir::cleanPath(mDocumentRepositoryPath);
humanPath = QDir::toNativeSeparators(humanPath);
UBApplication::mainWindow->warning(tr("Document Repository Loss"),tr("Sankore has lost access to the document repository '%1'. Unfortunately the application must shut down to avoid data corruption. Latest changes may be lost as well.").arg(humanPath));
UBApplication::quit();
}
}
bool UBPersistenceManager::mayHaveVideo(UBDocumentProxy* pDocumentProxy)
{
QDir videoDir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::videoDirectory);
return videoDir.exists() && videoDir.entryInfoList().length() > 0;
}
bool UBPersistenceManager::mayHaveAudio(UBDocumentProxy* pDocumentProxy)
{
QDir audioDir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::audioDirectory);
return audioDir.exists() && audioDir.entryInfoList().length() > 0;
}
bool UBPersistenceManager::mayHavePDF(UBDocumentProxy* pDocumentProxy)
{
QDir objectDir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::objectDirectory);
QStringList filters;
filters << "*.pdf";
return objectDir.exists() && objectDir.entryInfoList(filters).length() > 0;
}
bool UBPersistenceManager::mayHaveSVGImages(UBDocumentProxy* pDocumentProxy)
{
QDir imageDir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::imageDirectory);
QStringList filters;
filters << "*.svg";
return imageDir.exists() && imageDir.entryInfoList(filters).length() > 0;
}
bool UBPersistenceManager::mayHaveWidget(UBDocumentProxy* pDocumentProxy)
{
QDir widgetDir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::widgetDirectory);
return widgetDir.exists() && widgetDir.entryInfoList(QDir::Dirs).length() > 0;
}
void UBPersistenceManager::persistTeacherBar(UBDocumentProxy* pDocumentProxy, int page, sTeacherBarInfos infos)
{
if(NULL != pDocumentProxy)
{
QFile f(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", page + 1));
if(f.exists())
{
if(f.open(QIODevice::ReadOnly))
{
QDomDocument domDoc;
if(domDoc.setContent(f.readAll()))
{
f.close();
if(f.open(QIODevice::WriteOnly))
{
QDomElement rootElem = domDoc.documentElement();
QDomNode teacherBarNode = rootElem.namedItem("teacherBar");
if(teacherBarNode.isNull())
{
// Create the element
QDomElement teacherElem = domDoc.createElement("teacherBar");
rootElem.appendChild(teacherElem);
teacherBarNode = teacherElem;
}
// Set the <teacherBar> element values
QDomElement teacherBarElem = teacherBarNode.toElement();
teacherBarElem.setAttribute("title", infos.title);
QString qsAct;
for(int i=0; i<infos.actions.size(); i++){
if(0 != i){
qsAct.append('@');
}
qsAct.append(infos.actions.at(i));
}
teacherBarElem.setAttribute("actions", qsAct);
QString qsMedias;
for(int j=0; j<infos.medias.size(); j++){
if(0 != j){
qsMedias.append('@');
}
qsMedias.append(infos.medias.at(j));
}
teacherBarElem.setAttribute("medias", qsMedias);
QString qsUrls;
for(int k=0; k<infos.urls.size(); k++){
if(0 != k){
qsUrls.append('@');
}
qsUrls.append(infos.urls.at(k));
}
teacherBarElem.setAttribute("links", qsUrls);
teacherBarElem.setAttribute("comments", infos.comments);
// Save the file
f.write(domDoc.toString().toAscii());
f.close();
}
}
f.close();
}
}
}
}
sTeacherBarInfos UBPersistenceManager::getTeacherBarInfos(UBDocumentProxy* pDocumentProxy, int page)
{
sTeacherBarInfos infos;
if(NULL != pDocumentProxy)
{
QFile f(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", page + 1));
if(f.exists())
{
if(f.open(QIODevice::ReadWrite))
{
QDomDocument domDoc;
if(domDoc.setContent(f.readAll()))
{
QDomElement rootElem = domDoc.documentElement();
QDomNode teacherBarNode = rootElem.namedItem("teacherBar");
infos.title = teacherBarNode.toElement().attributeNode("title").value();
infos.actions = teacherBarNode.toElement().attributeNode("actions").value().split("@");
infos.medias = teacherBarNode.toElement().attributeNode("medias").value().split("@");
infos.urls = teacherBarNode.toElement().attributeNode("links").value().split("@");
infos.comments = teacherBarNode.toElement().attributeNode("comments").value();
}
f.close();
}
}
}
return infos;
}
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "UBPersistenceManager.h"
#include "gui/UBMainWindow.h"
#include <QtXml>
#include "frameworks/UBPlatformUtils.h"
#include "frameworks/UBFileSystemUtils.h"
#include "core/UBApplication.h"
#include "core/UBSettings.h"
#include "core/UBSetting.h"
#include "document/UBDocumentProxy.h"
#include "adaptors/UBExportPDF.h"
#include "adaptors/UBSvgSubsetAdaptor.h"
#include "adaptors/UBThumbnailAdaptor.h"
#include "adaptors/UBMetadataDcSubsetAdaptor.h"
#include "core/memcheck.h"
const QString UBPersistenceManager::imageDirectory = "images"; // added to UBPersistenceManager::mAllDirectories
const QString UBPersistenceManager::objectDirectory = "objects"; // added to UBPersistenceManager::mAllDirectories
const QString UBPersistenceManager::widgetDirectory = "widgets"; // added to UBPersistenceManager::mAllDirectories
const QString UBPersistenceManager::videoDirectory = "videos"; // added to UBPersistenceManager::mAllDirectories
const QString UBPersistenceManager::audioDirectory = "audios"; // added to
UBPersistenceManager * UBPersistenceManager::sSingleton = 0;
UBPersistenceManager::UBPersistenceManager(QObject *pParent)
: QObject(pParent)
, mHasPurgedDocuments(false)
{
mDocumentSubDirectories << imageDirectory;
mDocumentSubDirectories << objectDirectory;
mDocumentSubDirectories << widgetDirectory;
mDocumentSubDirectories << videoDirectory;
mDocumentSubDirectories << audioDirectory;
documentProxies = allDocumentProxies();
emit proxyListChanged();
}
UBPersistenceManager* UBPersistenceManager::persistenceManager()
{
if (!sSingleton)
{
sSingleton = new UBPersistenceManager(UBApplication::staticMemoryCleaner);
}
return sSingleton;
}
void UBPersistenceManager::destroy()
{
if (sSingleton)
delete sSingleton;
sSingleton = NULL;
}
UBPersistenceManager::~UBPersistenceManager()
{
foreach(QPointer<UBDocumentProxy> proxyGuard, documentProxies)
{
if (!proxyGuard.isNull())
delete proxyGuard.data();
}
}
QList<QPointer<UBDocumentProxy> > UBPersistenceManager::allDocumentProxies()
{
mDocumentRepositoryPath = UBSettings::userDocumentDirectory();
QDir rootDir(mDocumentRepositoryPath);
rootDir.mkpath(rootDir.path());
QFileSystemWatcher* watcher = new QFileSystemWatcher(this);
watcher->addPath(mDocumentRepositoryPath);
connect(watcher, SIGNAL(directoryChanged(const QString&)), this, SLOT(documentRepositoryChanged(const QString&)));
QList<QPointer<UBDocumentProxy> > proxies;
foreach(QString path, rootDir.entryList(QDir::Dirs | QDir::NoDotAndDotDot,
QDir::Time | QDir::Reversed))
{
QString fullPath = rootDir.path() + "/" + path;
QDir dir(fullPath);
if (dir.entryList(QDir::Files | QDir::NoDotAndDotDot).size() > 0)
{
UBDocumentProxy* proxy = new UBDocumentProxy(fullPath); // deleted in UBPersistenceManager::destructor
QMap<QString, QVariant> metadatas = UBMetadataDcSubsetAdaptor::load(fullPath);
foreach(QString key, metadatas.keys())
{
proxy->setMetaData(key, metadatas.value(key));
}
proxy->setPageCount(sceneCount(proxy));
proxies << QPointer<UBDocumentProxy>(proxy);
}
}
return proxies;
}
QStringList UBPersistenceManager::allShapes()
{
QString shapeLibraryPath = UBSettings::settings()->applicationShapeLibraryDirectory();
QDir dir(shapeLibraryPath);
if (!dir.exists())
dir.mkpath(shapeLibraryPath);
QStringList files = dir.entryList(QDir::Files | QDir::NoDotAndDotDot, QDir::Name);
QStringList paths;
foreach(QString file, files)
{
paths.append(shapeLibraryPath + QString("/") + file);
}
return paths;
}
QStringList UBPersistenceManager::allGips()
{
QString gipLibraryPath = UBSettings::settings()->applicationGipLibraryDirectory();
QDir dir(gipLibraryPath);
QStringList files = dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name);
QStringList paths;
foreach(QString file, files)
{
QFileInfo fi(file);
if (UBSettings::settings()->widgetFileExtensions.contains(fi.suffix()))
paths.append(dir.path() + QString("/") + file);
}
return paths;
}
QStringList UBPersistenceManager::allImages(const QDir& dir)
{
if (!dir.exists())
dir.mkpath(dir.path());
QStringList files = dir.entryList(QDir::Files | QDir::Hidden | QDir::NoDotAndDotDot, QDir::Name);
QStringList paths;
foreach(QString file, files)
{
paths.append(dir.path() + QString("/") + file);
}
return paths;
}
QStringList UBPersistenceManager::allVideos(const QDir& dir)
{
if (!dir.exists())
dir.mkpath(dir.path());
QStringList files = dir.entryList(QDir::Files | QDir::NoDotAndDotDot, QDir::Name);
QStringList paths;
foreach(QString file, files)
{
paths.append(dir.path() + QString("/") + file);
}
return paths;
}
QStringList UBPersistenceManager::allWidgets(const QDir& dir)
{
if (!dir.exists())
dir.mkpath(dir.path());
QStringList files = dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name);
QStringList paths;
foreach(QString file, files)
{
QFileInfo fi(file);
if (UBSettings::settings()->widgetFileExtensions.contains(fi.suffix()))
paths.append(dir.path() + QString("/") + file);
}
return paths;
}
UBDocumentProxy* UBPersistenceManager::createDocument(const QString& pGroupName, const QString& pName, bool withEmptyPage)
{
checkIfDocumentRepositoryExists();
UBDocumentProxy *doc = new UBDocumentProxy(); // deleted in UBPersistenceManager::destructor
if (pGroupName.length() > 0)
{
doc->setMetaData(UBSettings::documentGroupName, pGroupName);
}
if (pName.length() > 0)
{
doc->setMetaData(UBSettings::documentName, pName);
}
doc->setMetaData(UBSettings::documentVersion, UBSettings::currentFileVersion);
doc->setMetaData(UBSettings::documentUpdatedAt, UBStringUtils::toUtcIsoDateTime(QDateTime::currentDateTime()));
if (withEmptyPage) createDocumentSceneAt(doc, 0);
documentProxies.insert(0, QPointer<UBDocumentProxy>(doc));
emit proxyListChanged();
emit documentCreated(doc);
mDocumentCreatedDuringSession << doc;
return doc;
}
UBDocumentProxy* UBPersistenceManager::createDocumentFromDir(const QString& pDocumentDirectory)
{
checkIfDocumentRepositoryExists();
UBDocumentProxy* doc = new UBDocumentProxy(pDocumentDirectory); // deleted in UBPersistenceManager::destructor
QMap<QString, QVariant> metadatas = UBMetadataDcSubsetAdaptor::load(pDocumentDirectory);
foreach(QString key, metadatas.keys())
{
doc->setMetaData(key, metadatas.value(key));
}
doc->setUuid(QUuid::createUuid());
doc->setPageCount(sceneCount(doc));
UBMetadataDcSubsetAdaptor::persist(doc);
for(int i = 0; i < doc->pageCount(); i++)
{
UBSvgSubsetAdaptor::setSceneUuid(doc, i, QUuid::createUuid());
}
documentProxies << QPointer<UBDocumentProxy>(doc);
emit proxyListChanged();
emit documentCreated(doc);
return doc;
}
void UBPersistenceManager::deleteDocument(UBDocumentProxy* pDocumentProxy)
{
checkIfDocumentRepositoryExists();
emit documentWillBeDeleted(pDocumentProxy);
UBFileSystemUtils::deleteDir(pDocumentProxy->persistencePath());
documentProxies.removeAll(QPointer<UBDocumentProxy>(pDocumentProxy));
mDocumentCreatedDuringSession.removeAll(pDocumentProxy);
mSceneCache.removeAllScenes(pDocumentProxy);
pDocumentProxy->deleteLater();
emit proxyListChanged();
}
UBDocumentProxy* UBPersistenceManager::duplicateDocument(UBDocumentProxy* pDocumentProxy)
{
checkIfDocumentRepositoryExists();
UBDocumentProxy *copy = new UBDocumentProxy(); // deleted in UBPersistenceManager::destructor
generatePathIfNeeded(copy);
UBFileSystemUtils::copyDir(pDocumentProxy->persistencePath(), copy->persistencePath());
// regenerate scenes UUIDs
for(int i = 0; i < pDocumentProxy->pageCount(); i++)
{
UBSvgSubsetAdaptor::setSceneUuid(pDocumentProxy, i, QUuid::createUuid());
}
foreach(QString key, pDocumentProxy->metaDatas().keys())
{
copy->setMetaData(key, pDocumentProxy->metaDatas().value(key));
}
copy->setMetaData(UBSettings::documentName,
pDocumentProxy->metaData(UBSettings::documentName).toString() + " " + tr("(copy)"));
copy->setUuid(QUuid::createUuid());
persistDocumentMetadata(copy);
copy->setPageCount(sceneCount(copy));
documentProxies << QPointer<UBDocumentProxy>(copy);
emit proxyListChanged();
emit documentCreated(copy);
return copy;
}
void UBPersistenceManager::deleteDocumentScenes(UBDocumentProxy* proxy, const QList<int>& indexes)
{
checkIfDocumentRepositoryExists();
int pageCount = UBPersistenceManager::persistenceManager()->sceneCount(proxy);
QList<int> compactedIndexes;
foreach(int index, indexes)
{
if (!compactedIndexes.contains(index))
compactedIndexes.append(index);
}
if (compactedIndexes.size() == pageCount)
{
deleteDocument(proxy);
return;
}
if (compactedIndexes.size() == 0)
return;
foreach(int index, compactedIndexes)
{
emit documentSceneWillBeDeleted(proxy, index);
}
QString sourceGroupName = proxy->metaData(UBSettings::documentGroupName).toString();
QString sourceName = proxy->metaData(UBSettings::documentName).toString();
UBDocumentProxy *trashDocProxy = createDocument(UBSettings::trashedDocumentGroupNamePrefix + sourceGroupName, sourceName, false);
foreach(int index, compactedIndexes)
{
UBGraphicsScene *scene = loadDocumentScene(proxy, index);
if (scene)
{
//scene is about to move into new document
foreach (QUrl relativeFile, scene->relativeDependencies())
{
QString source = scene->document()->persistencePath() + "/" + relativeFile.toString();
QString target = trashDocProxy->persistencePath() + "/" + relativeFile.toString();
QFileInfo fi(target);
QDir d = fi.dir();
d.mkpath(d.absolutePath());
QFile::copy(source, target);
}
insertDocumentSceneAt(trashDocProxy, scene, trashDocProxy->pageCount());
}
}
for (int i = 1; i < pageCount; i++)
{
renamePage(trashDocProxy, i , i - 1);
}
foreach(int index, compactedIndexes)
{
QString svgFileName = proxy->persistencePath() +
UBFileSystemUtils::digitFileFormat("/page%1.svg", index + 1);
QFile::remove(svgFileName);
QString thumbFileName = proxy->persistencePath() +
UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", index + 1);
QFile::remove(thumbFileName);
mSceneCache.removeScene(proxy, index);
proxy->decPageCount();
}
qSort(compactedIndexes);
int offset = 1;
for (int i = compactedIndexes.at(0) + 1; i < pageCount; i++)
{
if(compactedIndexes.contains(i))
{
offset++;
}
else
{
renamePage(proxy, i , i - offset);
mSceneCache.moveScene(proxy, i, i - offset);
}
}
foreach(int index, compactedIndexes)
{
emit documentSceneDeleted(proxy, index);
}
}
void UBPersistenceManager::duplicateDocumentScene(UBDocumentProxy* proxy, int index)
{
checkIfDocumentRepositoryExists();
int pageCount = UBPersistenceManager::persistenceManager()->sceneCount(proxy);
for (int i = pageCount; i > index + 1; i--)
{
renamePage(proxy, i - 1 , i);
mSceneCache.moveScene(proxy, i - 1, i);
}
copyPage(proxy, index , index + 1);
proxy->incPageCount();
//due to architectural peculiarity we need to save teacher bar info, otherwise we'll see not exactly what we expect
sTeacherBarInfos properInfo = getTeacherBarInfos(proxy, index + 1);
//after the call below
emit documentSceneCreated(proxy, index + 1);
//restoring info
persistTeacherBar(proxy, index + 1, properInfo);
}
UBGraphicsScene* UBPersistenceManager::createDocumentSceneAt(UBDocumentProxy* proxy, int index)
{
int count = sceneCount(proxy);
for(int i = count - 1; i >= index; i--)
{
renamePage(proxy, i , i + 1);
}
mSceneCache.shiftUpScenes(proxy, index, count -1);
UBGraphicsScene *newScene = mSceneCache.createScene(proxy, index);
newScene->setBackground(UBSettings::settings()->isDarkBackground(),
UBSettings::settings()->UBSettings::isCrossedBackground());
persistDocumentScene(proxy, newScene, index);
proxy->incPageCount();
emit documentSceneCreated(proxy, index);
return newScene;
}
void UBPersistenceManager::insertDocumentSceneAt(UBDocumentProxy* proxy, UBGraphicsScene* scene, int index)
{
scene->setDocument(proxy);
int count = sceneCount(proxy);
for(int i = count - 1; i >= index; i--)
{
renamePage(proxy, i , i + 1);
}
mSceneCache.shiftUpScenes(proxy, index, count -1);
mSceneCache.insert(proxy, index, scene);
persistDocumentScene(proxy, scene, index);
proxy->incPageCount();
emit documentSceneCreated(proxy, index);
}
void UBPersistenceManager::moveSceneToIndex(UBDocumentProxy* proxy, int source, int target)
{
checkIfDocumentRepositoryExists();
if (source == target)
return;
QFile svgTmp(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", source + 1));
svgTmp.rename(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.tmp", target + 1));
QFile thumbTmp(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", source + 1));
thumbTmp.rename(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.tmp", target + 1));
if (source < target)
{
for (int i = source + 1; i <= target; i++)
{
renamePage(proxy, i , i - 1);
}
}
else
{
for (int i = source - 1; i >= target; i--)
{
renamePage(proxy, i , i + 1);
}
}
QFile svg(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.tmp", target + 1));
svg.rename(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", target + 1));
QFile thumb(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.tmp", target + 1));
thumb.rename(proxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", target + 1));
mSceneCache.moveScene(proxy, source, target);
emit documentSceneMoved(proxy, target);
}
UBGraphicsScene* UBPersistenceManager::loadDocumentScene(UBDocumentProxy* proxy, int sceneIndex)
{
if (mSceneCache.contains(proxy, sceneIndex))
{
//qDebug() << "scene" << sceneIndex << "retrieved from cache ...";
return mSceneCache.value(proxy, sceneIndex);
}
else
{
UBGraphicsScene* scene = UBSvgSubsetAdaptor::loadScene(proxy, sceneIndex);
if (scene)
mSceneCache.insert(proxy, sceneIndex, scene);
return scene;
}
}
void UBPersistenceManager::persistDocumentScene(UBDocumentProxy* pDocumentProxy, UBGraphicsScene* pScene, const int pSceneIndex)
{
checkIfDocumentRepositoryExists();
pScene->deselectAllItems();
generatePathIfNeeded(pDocumentProxy);
QDir dir(pDocumentProxy->persistencePath());
dir.mkpath(pDocumentProxy->persistencePath());
if (pDocumentProxy->isModified())
UBMetadataDcSubsetAdaptor::persist(pDocumentProxy);
if (pScene->isModified())
{
UBThumbnailAdaptor::persistScene(pDocumentProxy->persistencePath(), pScene, pSceneIndex);
UBSvgSubsetAdaptor::persistScene(pDocumentProxy, pScene, pSceneIndex);
pScene->setModified(false);
}
mSceneCache.insert(pDocumentProxy, pSceneIndex, pScene);
emit documentCommitted(pDocumentProxy);
}
UBDocumentProxy* UBPersistenceManager::persistDocumentMetadata(UBDocumentProxy* pDocumentProxy)
{
UBMetadataDcSubsetAdaptor::persist(pDocumentProxy);
emit documentMetadataChanged(pDocumentProxy);
return pDocumentProxy;
}
void UBPersistenceManager::renamePage(UBDocumentProxy* pDocumentProxy, const int sourceIndex, const int targetIndex)
{
QFile svg(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", sourceIndex + 1));
svg.rename(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", targetIndex + 1));
QFile thumb(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", sourceIndex + 1));
thumb.rename(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", targetIndex + 1));
}
void UBPersistenceManager::copyPage(UBDocumentProxy* pDocumentProxy, const int sourceIndex, const int targetIndex)
{
QFile svg(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", sourceIndex + 1));
svg.copy(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", targetIndex + 1));
UBSvgSubsetAdaptor::setSceneUuid(pDocumentProxy, targetIndex, QUuid::createUuid());
QFile thumb(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", sourceIndex + 1));
thumb.copy(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", targetIndex + 1));
}
int UBPersistenceManager::sceneCount(const UBDocumentProxy* proxy)
{
return sceneCountInDir(proxy->persistencePath());
}
int UBPersistenceManager::sceneCountInDir(const QString& pPath)
{
int pageIndex = 0;
bool moreToProcess = true;
while (moreToProcess)
{
QString fileName = pPath + UBFileSystemUtils::digitFileFormat("/page%1.svg", pageIndex + 1);
QFile file(fileName);
if (file.exists())
{
pageIndex++;
}
else
{
moreToProcess = false;
}
}
return pageIndex;
}
QString UBPersistenceManager::generateUniqueDocumentPath()
{
QString ubPath = UBSettings::userDocumentDirectory();
QDateTime now = QDateTime::currentDateTime();
QString dirName = now.toString("yyyy-MM-dd hh-mm-ss.zzz");
return ubPath + QString("/Sankore Document %1").arg(dirName);
}
void UBPersistenceManager::generatePathIfNeeded(UBDocumentProxy* pDocumentProxy)
{
if (pDocumentProxy->persistencePath().length() == 0)
{
pDocumentProxy->setPersistencePath(generateUniqueDocumentPath());
}
}
void UBPersistenceManager::addDirectoryContentToDocument(const QString& documentRootFolder, UBDocumentProxy* pDocument)
{
int sourcePageCount = sceneCountInDir(documentRootFolder);
int targetPageCount = pDocument->pageCount();
for(int sourceIndex = 0 ; sourceIndex < sourcePageCount; sourceIndex++)
{
int targetIndex = targetPageCount + sourceIndex;
QFile svg(documentRootFolder + UBFileSystemUtils::digitFileFormat("/page%1.svg", sourceIndex + 1));
svg.copy(pDocument->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", targetIndex + 1));
UBSvgSubsetAdaptor::setSceneUuid(pDocument, targetIndex, QUuid::createUuid());
QFile thumb(documentRootFolder + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", sourceIndex + 1));
thumb.copy(pDocument->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.thumbnail.jpg", targetIndex + 1));
}
foreach(QString dir, mDocumentSubDirectories)
{
qDebug() << "copying " << documentRootFolder << "/" << dir << " to " << pDocument->persistencePath() << "/" + dir;
UBFileSystemUtils::copyDir(documentRootFolder + "/" + dir, pDocument->persistencePath() + "/" + dir);
}
pDocument->setPageCount(sceneCount(pDocument));
}
void UBPersistenceManager::upgradeDocumentIfNeeded(UBDocumentProxy* pDocumentProxy)
{
int pageCount = pDocumentProxy->pageCount();
for(int index = 0 ; index < pageCount; index++)
{
UBSvgSubsetAdaptor::upgradeScene(pDocumentProxy, index);
}
pDocumentProxy->setMetaData(UBSettings::documentVersion, UBSettings::currentFileVersion);
UBMetadataDcSubsetAdaptor::persist(pDocumentProxy);
}
void UBPersistenceManager::upgradeAllDocumentsIfNeeded()
{
foreach(QPointer<UBDocumentProxy> proxy, documentProxies)
{
upgradeDocumentIfNeeded(proxy);
}
}
UBDocumentProxy* UBPersistenceManager::documentByUuid(const QUuid& pUuid)
{
for(int i = 0 ; i < documentProxies.length(); i++)
{
UBDocumentProxy* proxy = documentProxies.at(i);
if (proxy && proxy->uuid() == pUuid)
{
return proxy;
}
}
return 0;
}
bool UBPersistenceManager::isEmpty(UBDocumentProxy* pDocumentProxy)
{
if(!pDocumentProxy)
return true;
if (pDocumentProxy->pageCount() > 1)
return false;
UBGraphicsScene *theSoleScene = UBSvgSubsetAdaptor::loadScene(pDocumentProxy, 0);
bool empty = false;
if (theSoleScene)
{
empty = theSoleScene->isEmpty();
delete theSoleScene;
}
else
{
empty = true;
}
return empty;
}
void UBPersistenceManager::purgeEmptyDocuments()
{
if(!mHasPurgedDocuments) // hack to workaround the fact that app closing is called twice :-(
{
QList<UBDocumentProxy*> toBeDeleted;
foreach(UBDocumentProxy* docProxy, mDocumentCreatedDuringSession)
{
if (isEmpty(docProxy))
{
toBeDeleted << docProxy;
}
}
foreach(UBDocumentProxy* docProxy, toBeDeleted)
{
deleteDocument(docProxy);
}
mHasPurgedDocuments = true;
}
}
QString UBPersistenceManager::addVideoFileToDocument(UBDocumentProxy* pDocumentProxy, QString path, QUuid objectUuid)
{
QFileInfo fi(path);
if (!fi.exists() || !pDocumentProxy || objectUuid.isNull())
return "";
QString fileName = UBPersistenceManager::videoDirectory + "/" + objectUuid.toString() + "." + fi.suffix();
QString destPath = pDocumentProxy->persistencePath() + "/" + fileName;
if (!QFile::exists(destPath))
{
QDir dir;
dir.mkdir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::videoDirectory);
QFile source(path);
source.copy(destPath);
}
return fileName;
}
QString UBPersistenceManager::addVideoFileToDocument(UBDocumentProxy* pDocumentProxy, QUrl sourceUrl, QByteArray pPayload, QUuid objectUuid)
{
if (!pDocumentProxy || objectUuid.isNull())
return "";
QString urlPath = sourceUrl.path();
int lastDot = urlPath.lastIndexOf(".");
QString suffix = urlPath.right(urlPath.length() - lastDot - 1);
QString fileName = UBPersistenceManager::videoDirectory + "/" + objectUuid.toString() + "." + suffix;
QString destPath = pDocumentProxy->persistencePath() + "/" + fileName;
if (!QFile::exists(destPath))
{
QDir dir;
dir.mkdir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::videoDirectory);
QFile newFile(destPath);
if (newFile.open(QIODevice::WriteOnly))
{
newFile.write(pPayload);
newFile.flush();
newFile.close();
}
}
return fileName;
}
QString UBPersistenceManager::addAudioFileToDocument(UBDocumentProxy* pDocumentProxy, QString path, QUuid objectUuid)
{
QFileInfo fi(path);
if (!fi.exists() || !pDocumentProxy || objectUuid.isNull())
return "";
QString fileName = UBPersistenceManager::audioDirectory + "/" + objectUuid.toString() + "." + fi.suffix();
QString destPath = pDocumentProxy->persistencePath() + "/" + fileName;
if (!QFile::exists(destPath))
{
QDir dir;
dir.mkdir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::audioDirectory);
QFile source(path);
source.copy(destPath);
}
return fileName;
}
QString UBPersistenceManager::addAudioFileToDocument(UBDocumentProxy* pDocumentProxy, QUrl sourceUrl, QByteArray pPayload, QUuid objectUuid)
{
if (!pDocumentProxy || objectUuid.isNull())
return "";
QString urlPath = sourceUrl.path();
int lastDot = urlPath.lastIndexOf(".");
QString suffix = urlPath.right(urlPath.length() - lastDot - 1);
QString fileName = UBPersistenceManager::audioDirectory + "/" + objectUuid.toString() + "." + suffix;
QString destPath = pDocumentProxy->persistencePath() + "/" + fileName;
if (!QFile::exists(destPath))
{
QDir dir;
dir.mkdir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::audioDirectory);
QFile newFile(destPath);
if (newFile.open(QIODevice::WriteOnly))
{
newFile.write(pPayload);
newFile.flush();
newFile.close();
}
}
return fileName;
}
QString UBPersistenceManager::addPdfFileToDocument(UBDocumentProxy* pDocumentProxy, QString path, QUuid objectUuid)
{
QFileInfo fi(path);
if (!fi.exists() || !pDocumentProxy || objectUuid.isNull())
return "";
QString fileName = UBPersistenceManager::objectDirectory + "/" + objectUuid.toString() + "." + fi.suffix();
QString destPath = pDocumentProxy->persistencePath() + "/" + fileName;
if (!QFile::exists(destPath))
{
QDir dir;
dir.mkpath(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::objectDirectory);
QFile source(path);
source.copy(destPath);
}
return fileName;
}
QString UBPersistenceManager::addGraphicsWidgteToDocument(UBDocumentProxy *pDocumentProxy, QString path, QUuid objectUuid)
{
QFileInfo fi(path);
if (!fi.exists() || !pDocumentProxy || objectUuid.isNull())
return "";
QString widgetRootDir = path;
QString extension = QFileInfo(widgetRootDir).suffix();
QString widgetTargetDir = pDocumentProxy->persistencePath() + "/" + widgetDirectory + "/" + objectUuid.toString() + "." + extension;
if (!QFile::exists(widgetTargetDir)) {
QDir dir;
dir.mkpath(widgetTargetDir);
UBFileSystemUtils::copyDir(widgetRootDir, widgetTargetDir);
}
if (!QFile::exists(widgetTargetDir))
widgetTargetDir = QString();
return widgetTargetDir;
}
void UBPersistenceManager::documentRepositoryChanged(const QString& path)
{
Q_UNUSED(path);
checkIfDocumentRepositoryExists();
}
void UBPersistenceManager::checkIfDocumentRepositoryExists()
{
QDir rp(mDocumentRepositoryPath);
if (!rp.exists())
{
// we have lost the document repository ..
QString humanPath = QDir::cleanPath(mDocumentRepositoryPath);
humanPath = QDir::toNativeSeparators(humanPath);
UBApplication::mainWindow->warning(tr("Document Repository Loss"),tr("Sankore has lost access to the document repository '%1'. Unfortunately the application must shut down to avoid data corruption. Latest changes may be lost as well.").arg(humanPath));
UBApplication::quit();
}
}
bool UBPersistenceManager::mayHaveVideo(UBDocumentProxy* pDocumentProxy)
{
QDir videoDir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::videoDirectory);
return videoDir.exists() && videoDir.entryInfoList().length() > 0;
}
bool UBPersistenceManager::mayHaveAudio(UBDocumentProxy* pDocumentProxy)
{
QDir audioDir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::audioDirectory);
return audioDir.exists() && audioDir.entryInfoList().length() > 0;
}
bool UBPersistenceManager::mayHavePDF(UBDocumentProxy* pDocumentProxy)
{
QDir objectDir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::objectDirectory);
QStringList filters;
filters << "*.pdf";
return objectDir.exists() && objectDir.entryInfoList(filters).length() > 0;
}
bool UBPersistenceManager::mayHaveSVGImages(UBDocumentProxy* pDocumentProxy)
{
QDir imageDir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::imageDirectory);
QStringList filters;
filters << "*.svg";
return imageDir.exists() && imageDir.entryInfoList(filters).length() > 0;
}
bool UBPersistenceManager::mayHaveWidget(UBDocumentProxy* pDocumentProxy)
{
QDir widgetDir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::widgetDirectory);
return widgetDir.exists() && widgetDir.entryInfoList(QDir::Dirs).length() > 0;
}
void UBPersistenceManager::persistTeacherBar(UBDocumentProxy* pDocumentProxy, int page, sTeacherBarInfos infos)
{
if(NULL != pDocumentProxy)
{
QFile f(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", page + 1));
if(f.exists())
{
if(f.open(QIODevice::ReadOnly))
{
QDomDocument domDoc;
if(domDoc.setContent(f.readAll()))
{
f.close();
if(f.open(QIODevice::WriteOnly))
{
QDomElement rootElem = domDoc.documentElement();
QDomNode teacherBarNode = rootElem.namedItem("teacherBar");
if(teacherBarNode.isNull())
{
// Create the element
QDomElement teacherElem = domDoc.createElement("teacherBar");
rootElem.appendChild(teacherElem);
teacherBarNode = teacherElem;
}
// Set the <teacherBar> element values
QDomElement teacherBarElem = teacherBarNode.toElement();
teacherBarElem.setAttribute("title", infos.title);
QString qsAct;
for(int i=0; i<infos.actions.size(); i++){
if(0 != i){
qsAct.append('@');
}
qsAct.append(infos.actions.at(i));
}
teacherBarElem.setAttribute("actions", qsAct);
QString qsMedias;
for(int j=0; j<infos.medias.size(); j++){
if(0 != j){
qsMedias.append('@');
}
qsMedias.append(infos.medias.at(j));
}
teacherBarElem.setAttribute("medias", qsMedias);
QString qsUrls;
for(int k=0; k<infos.urls.size(); k++){
if(0 != k){
qsUrls.append('@');
}
qsUrls.append(infos.urls.at(k));
}
teacherBarElem.setAttribute("links", qsUrls);
teacherBarElem.setAttribute("comments", infos.comments);
// Save the file
f.write(domDoc.toString().toAscii());
f.close();
}
}
f.close();
}
}
}
}
sTeacherBarInfos UBPersistenceManager::getTeacherBarInfos(UBDocumentProxy* pDocumentProxy, int page)
{
sTeacherBarInfos infos;
if(NULL != pDocumentProxy)
{
QFile f(pDocumentProxy->persistencePath() + UBFileSystemUtils::digitFileFormat("/page%1.svg", page + 1));
if(f.exists())
{
if(f.open(QIODevice::ReadWrite))
{
QDomDocument domDoc;
if(domDoc.setContent(f.readAll()))
{
QDomElement rootElem = domDoc.documentElement();
QDomNode teacherBarNode = rootElem.namedItem("teacherBar");
infos.title = teacherBarNode.toElement().attributeNode("title").value();
infos.actions = teacherBarNode.toElement().attributeNode("actions").value().split("@");
infos.medias = teacherBarNode.toElement().attributeNode("medias").value().split("@");
infos.urls = teacherBarNode.toElement().attributeNode("links").value().split("@");
infos.comments = teacherBarNode.toElement().attributeNode("comments").value();
}
f.close();
}
}
}
return infos;
}
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UBPERSISTENCEMANAGER_H_
#define UBPERSISTENCEMANAGER_H_
#include <QtCore>
#include "UBSceneCache.h"
struct sTeacherBarInfos
{
QString title;
QStringList actions;
QStringList medias;
QStringList urls;
QString comments;
};
class UBDocument;
class UBDocumentProxy;
class UBGraphicsScene;
class UBPersistenceManager : public QObject
{
Q_OBJECT
private:
UBPersistenceManager(QObject *pParent = 0);
static UBPersistenceManager* sSingleton;
public:
virtual ~UBPersistenceManager();
static const QString imageDirectory;
static const QString objectDirectory;
static const QString videoDirectory;
static const QString audioDirectory;
static const QString widgetDirectory;
static UBPersistenceManager* persistenceManager();
static void destroy();
virtual UBDocumentProxy* createDocument(const QString& pGroupName = "", const QString& pName = "", bool withEmptyPage = true);
virtual UBDocumentProxy* createDocumentFromDir(const QString& pDocumentDirectory, const QString& pGroupName = "", const QString& pName = "", bool withEmptyPage = false);
virtual UBDocumentProxy* persistDocumentMetadata(UBDocumentProxy* pDocumentProxy);
virtual UBDocumentProxy* duplicateDocument(UBDocumentProxy* pDocumentProxy);
virtual void deleteDocument(UBDocumentProxy* pDocumentProxy);
virtual void deleteDocumentScenes(UBDocumentProxy* pDocumentProxy, const QList<int>& indexes);
virtual void duplicateDocumentScene(UBDocumentProxy* pDocumentProxy, int index);
virtual void persistDocumentScene(UBDocumentProxy* pDocumentProxy,
UBGraphicsScene* pScene, const int pSceneIndex);
virtual void persistTeacherBar(UBDocumentProxy* pDocumentProxy, int page, sTeacherBarInfos infos);
sTeacherBarInfos getTeacherBarInfos(UBDocumentProxy* pDocumentProxy, int page);
virtual UBGraphicsScene* createDocumentSceneAt(UBDocumentProxy* pDocumentProxy, int index);
virtual void insertDocumentSceneAt(UBDocumentProxy* pDocumentProxy, UBGraphicsScene* scene, int index);
virtual void moveSceneToIndex(UBDocumentProxy* pDocumentProxy, int source, int target);
virtual UBGraphicsScene* loadDocumentScene(UBDocumentProxy* pDocumentProxy, int sceneIndex);
UBGraphicsScene *getDocumentScene(UBDocumentProxy* pDocumentProxy, int sceneIndex) {return mSceneCache.value(pDocumentProxy, sceneIndex);}
QList<QPointer<UBDocumentProxy> > documentProxies;
virtual QStringList allShapes();
virtual QStringList allGips();
virtual QStringList allSounds();
virtual QStringList allImages(const QDir& dir);
virtual QStringList allVideos(const QDir& dir);
virtual QStringList allWidgets(const QDir& dir);
virtual QString generateUniqueDocumentPath();
virtual void addDirectoryContentToDocument(const QString& documentRootFolder, UBDocumentProxy* pDocument);
virtual void upgradeDocumentIfNeeded(UBDocumentProxy* pDocumentProxy);
virtual void upgradeAllDocumentsIfNeeded();
virtual UBDocumentProxy* documentByUuid(const QUuid& pUuid);
QStringList documentSubDirectories()
{
return mDocumentSubDirectories;
}
virtual bool isEmpty(UBDocumentProxy* pDocumentProxy);
virtual void purgeEmptyDocuments();
virtual QString addVideoFileToDocument(UBDocumentProxy* pDocumentProxy, QString path, QUuid objectUuid);
virtual QString addVideoFileToDocument(UBDocumentProxy* pDocumentProxy, QUrl sourceUrl, QByteArray pPayload, QUuid objectUuid);
virtual QString addAudioFileToDocument(UBDocumentProxy* pDocumentProxy, QString path, QUuid objectUuid);
virtual QString addAudioFileToDocument(UBDocumentProxy* pDocumentProxy, QUrl sourceUrl, QByteArray pPayload, QUuid objectUuid);
virtual QString addPdfFileToDocument(UBDocumentProxy* pDocumentProxy, QString path, QUuid objectUuid);
virtual QString addGraphicsWidgteToDocument(UBDocumentProxy *mDocumentProxy, QString path, QUuid objectUuid);
bool mayHaveVideo(UBDocumentProxy* pDocumentProxy);
bool mayHaveAudio(UBDocumentProxy* pDocumentProxy);
bool mayHavePDF(UBDocumentProxy* pDocumentProxy);
bool mayHaveSVGImages(UBDocumentProxy* pDocumentProxy);
bool mayHaveWidget(UBDocumentProxy* pDocumentProxy);
signals:
void proxyListChanged();
void documentCreated(UBDocumentProxy* pDocumentProxy);
void documentMetadataChanged(UBDocumentProxy* pDocumentProxy);
void documentCommitted(UBDocumentProxy* pDocumentProxy);
void documentWillBeDeleted(UBDocumentProxy* pDocumentProxy);
void documentSceneCreated(UBDocumentProxy* pDocumentProxy, int pIndex);
void documentSceneMoved(UBDocumentProxy* pDocumentProxy, int pIndex);
void documentSceneWillBeDeleted(UBDocumentProxy* pDocumentProxy, int pIndex);
void documentSceneDeleted(UBDocumentProxy* pDocumentProxy, int pDeletedIndex);
private:
int sceneCount(const UBDocumentProxy* pDocumentProxy);
int sceneCountInDir(const QString& pPath);
QList<QPointer<UBDocumentProxy> > allDocumentProxies();
void renamePage(UBDocumentProxy* pDocumentProxy,
const int sourceIndex, const int targetIndex);
void copyPage(UBDocumentProxy* pDocumentProxy,
const int sourceIndex, const int targetIndex);
void generatePathIfNeeded(UBDocumentProxy* pDocumentProxy);
void checkIfDocumentRepositoryExists();
UBSceneCache mSceneCache;
QStringList mDocumentSubDirectories;
QMutex mDeletedListMutex;
bool mHasPurgedDocuments;
QList<UBDocumentProxy*> mDocumentCreatedDuringSession;
QString mDocumentRepositoryPath;
private slots:
void documentRepositoryChanged(const QString& path);
};
#endif /* UBPERSISTENCEMANAGER_H_ */
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef UBPERSISTENCEMANAGER_H_
#define UBPERSISTENCEMANAGER_H_
#include <QtCore>
#include "UBSceneCache.h"
struct sTeacherBarInfos
{
QString title;
QStringList actions;
QStringList medias;
QStringList urls;
QString comments;
};
class UBDocument;
class UBDocumentProxy;
class UBGraphicsScene;
class UBPersistenceManager : public QObject
{
Q_OBJECT
private:
UBPersistenceManager(QObject *pParent = 0);
static UBPersistenceManager* sSingleton;
public:
virtual ~UBPersistenceManager();
static const QString imageDirectory;
static const QString objectDirectory;
static const QString videoDirectory;
static const QString audioDirectory;
static const QString widgetDirectory;
static UBPersistenceManager* persistenceManager();
static void destroy();
virtual UBDocumentProxy* createDocument(const QString& pGroupName = "", const QString& pName = "", bool withEmptyPage = true);
virtual UBDocumentProxy* createDocumentFromDir(const QString& pDocumentDirectory);
virtual UBDocumentProxy* persistDocumentMetadata(UBDocumentProxy* pDocumentProxy);
virtual UBDocumentProxy* duplicateDocument(UBDocumentProxy* pDocumentProxy);
virtual void deleteDocument(UBDocumentProxy* pDocumentProxy);
virtual void deleteDocumentScenes(UBDocumentProxy* pDocumentProxy, const QList<int>& indexes);
virtual void duplicateDocumentScene(UBDocumentProxy* pDocumentProxy, int index);
virtual void persistDocumentScene(UBDocumentProxy* pDocumentProxy,
UBGraphicsScene* pScene, const int pSceneIndex);
virtual void persistTeacherBar(UBDocumentProxy* pDocumentProxy, int page, sTeacherBarInfos infos);
sTeacherBarInfos getTeacherBarInfos(UBDocumentProxy* pDocumentProxy, int page);
virtual UBGraphicsScene* createDocumentSceneAt(UBDocumentProxy* pDocumentProxy, int index);
virtual void insertDocumentSceneAt(UBDocumentProxy* pDocumentProxy, UBGraphicsScene* scene, int index);
virtual void moveSceneToIndex(UBDocumentProxy* pDocumentProxy, int source, int target);
virtual UBGraphicsScene* loadDocumentScene(UBDocumentProxy* pDocumentProxy, int sceneIndex);
UBGraphicsScene *getDocumentScene(UBDocumentProxy* pDocumentProxy, int sceneIndex) {return mSceneCache.value(pDocumentProxy, sceneIndex);}
QList<QPointer<UBDocumentProxy> > documentProxies;
virtual QStringList allShapes();
virtual QStringList allGips();
virtual QStringList allImages(const QDir& dir);
virtual QStringList allVideos(const QDir& dir);
virtual QStringList allWidgets(const QDir& dir);
virtual QString generateUniqueDocumentPath();
virtual void addDirectoryContentToDocument(const QString& documentRootFolder, UBDocumentProxy* pDocument);
virtual void upgradeDocumentIfNeeded(UBDocumentProxy* pDocumentProxy);
virtual void upgradeAllDocumentsIfNeeded();
virtual UBDocumentProxy* documentByUuid(const QUuid& pUuid);
QStringList documentSubDirectories()
{
return mDocumentSubDirectories;
}
virtual bool isEmpty(UBDocumentProxy* pDocumentProxy);
virtual void purgeEmptyDocuments();
virtual QString addVideoFileToDocument(UBDocumentProxy* pDocumentProxy, QString path, QUuid objectUuid);
virtual QString addVideoFileToDocument(UBDocumentProxy* pDocumentProxy, QUrl sourceUrl, QByteArray pPayload, QUuid objectUuid);
virtual QString addAudioFileToDocument(UBDocumentProxy* pDocumentProxy, QString path, QUuid objectUuid);
virtual QString addAudioFileToDocument(UBDocumentProxy* pDocumentProxy, QUrl sourceUrl, QByteArray pPayload, QUuid objectUuid);
virtual QString addPdfFileToDocument(UBDocumentProxy* pDocumentProxy, QString path, QUuid objectUuid);
virtual QString addGraphicsWidgteToDocument(UBDocumentProxy *mDocumentProxy, QString path, QUuid objectUuid);
bool mayHaveVideo(UBDocumentProxy* pDocumentProxy);
bool mayHaveAudio(UBDocumentProxy* pDocumentProxy);
bool mayHavePDF(UBDocumentProxy* pDocumentProxy);
bool mayHaveSVGImages(UBDocumentProxy* pDocumentProxy);
bool mayHaveWidget(UBDocumentProxy* pDocumentProxy);
signals:
void proxyListChanged();
void documentCreated(UBDocumentProxy* pDocumentProxy);
void documentMetadataChanged(UBDocumentProxy* pDocumentProxy);
void documentCommitted(UBDocumentProxy* pDocumentProxy);
void documentWillBeDeleted(UBDocumentProxy* pDocumentProxy);
void documentSceneCreated(UBDocumentProxy* pDocumentProxy, int pIndex);
void documentSceneMoved(UBDocumentProxy* pDocumentProxy, int pIndex);
void documentSceneWillBeDeleted(UBDocumentProxy* pDocumentProxy, int pIndex);
void documentSceneDeleted(UBDocumentProxy* pDocumentProxy, int pDeletedIndex);
private:
int sceneCount(const UBDocumentProxy* pDocumentProxy);
int sceneCountInDir(const QString& pPath);
QList<QPointer<UBDocumentProxy> > allDocumentProxies();
void renamePage(UBDocumentProxy* pDocumentProxy,
const int sourceIndex, const int targetIndex);
void copyPage(UBDocumentProxy* pDocumentProxy,
const int sourceIndex, const int targetIndex);
void generatePathIfNeeded(UBDocumentProxy* pDocumentProxy);
void checkIfDocumentRepositoryExists();
UBSceneCache mSceneCache;
QStringList mDocumentSubDirectories;
QMutex mDeletedListMutex;
bool mHasPurgedDocuments;
QList<UBDocumentProxy*> mDocumentCreatedDuringSession;
QString mDocumentRepositoryPath;
private slots:
void documentRepositoryChanged(const QString& path);
};
#endif /* UBPERSISTENCEMANAGER_H_ */
......@@ -146,7 +146,7 @@ UBSettings::UBSettings(QObject *parent)
mAppSettings = UBSettings::getAppSettings();
QString userSettingsFile = UBSettings::uniboardDataDirectory() + "/UniboardUser.config";
QString userSettingsFile = UBSettings::userDataDirectory() + "/UniboardUser.config";
mUserSettings = new QSettings(userSettingsFile, QSettings::IniFormat, parent);
......@@ -729,519 +729,272 @@ void UBSettings::setItalicFont(bool italic)
}
QString UBSettings::uniboardDataDirectory()
QString UBSettings::userDataDirectory()
{
// first look into the application settings
if (sAppSettings && getAppSettings()->contains("App/DataDirectory"))
{
QString dataDirectory = getAppSettings()->value("App/DataDirectory").toString();
static QString dataDirPath = "";
if(dataDirPath.isEmpty()){
if (sAppSettings && getAppSettings()->contains("App/DataDirectory")) {
dataDirPath = getAppSettings()->value("App/DataDirectory").toString();
dataDirPath = replaceWildcard(dataDirPath);
// mute it to something absolute
if (dataDirectory.startsWith("{Documents}"))
{
dataDirectory = dataDirectory.replace("{Documents}",
QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation));
}
else if(dataDirectory.startsWith("{Home}"))
{
dataDirectory = dataDirectory.replace("{Home}",
QDesktopServices::storageLocation(QDesktopServices::HomeLocation));
}
if(checkDirectory(dataDirPath))
return dataDirPath;
else
qCritical() << "Impossible to create datadirpath " << dataDirPath;
if(dataDirectory.contains("{UserLoginName}") && UBPlatformUtils::osUserLoginName().length() > 0)
{
dataDirectory = dataDirectory.replace("{UserLoginName}", UBPlatformUtils::osUserLoginName());
}
// valid ?
QDir dir(dataDirectory);
dir.mkpath(dataDirectory);
if (dir.exists(dataDirectory))
{
return dataDirectory;
}
else
{
// Do not log anything here, we need data directory to be valid to be able to log to it
//
//qWarning << "Failed to interpret App/DataDirectory config : " + getAppSettings()->value("App/DataDirectory").toString() +
// ", defaulting to " + UBDesktopServices::storageLocation(QDesktopServices::DataLocation);
}
dataDirPath = UBFileSystemUtils::normalizeFilePath(QDesktopServices::storageLocation(QDesktopServices::DataLocation));
dataDirPath.replace("/Open-Sankore", "");
}
QString qtDataPath = UBFileSystemUtils::normalizeFilePath(QDesktopServices::storageLocation(QDesktopServices::DataLocation));
qtDataPath.replace("/Open-Sankore", "");
return qtDataPath;
return dataDirPath;
}
QString UBSettings::uniboardUserImageDirectory()
QString UBSettings::userImageDirectory()
{
QString valideUserImageDirectory =
QDesktopServices::storageLocation(QDesktopServices::PicturesLocation)
+ "/" + QCoreApplication::applicationName();
static QString imageDirectory = "";
if(imageDirectory.isEmpty()){
if (sAppSettings && getAppSettings()->contains("App/UserImageDirectory")) {
imageDirectory = getAppSettings()->value("App/UserImageDirectory").toString();
bool hasCreatedDir = false;
// first look into the application settings
if (sAppSettings && getAppSettings()->contains("App/UserImageDirectory"))
{
QString userImageDirectory = getAppSettings()->value("App/UserImageDirectory").toString();
// mute it to something absolute
if (userImageDirectory.startsWith("{Documents}"))
{
userImageDirectory = userImageDirectory.replace("{Documents}",
QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation));
}
else if (userImageDirectory.startsWith("{Home}"))
{
userImageDirectory = userImageDirectory.replace("{Home}",
QDesktopServices::storageLocation(QDesktopServices::HomeLocation));
imageDirectory = replaceWildcard(imageDirectory);
if(checkDirectory(imageDirectory))
return imageDirectory;
else
qCritical() << "failed to create image directory " << imageDirectory;
}
else if(userImageDirectory.startsWith("{Pictures}"))
{
userImageDirectory = userImageDirectory.replace("{Pictures}",
QDesktopServices::storageLocation(QDesktopServices::PicturesLocation));
}
if(userImageDirectory.contains("{UserLoginName}") && UBPlatformUtils::osUserLoginName() > 0)
{
userImageDirectory = userImageDirectory.replace("{UserLoginName}", UBPlatformUtils::osUserLoginName());
}
// valid ?
QDir dir(userImageDirectory);
if (!dir.exists())
{
dir.mkpath(userImageDirectory);
hasCreatedDir = true;
}
if (dir.exists())
{
valideUserImageDirectory = userImageDirectory;
}
else
{
hasCreatedDir = false;
qWarning() << "Failed to interpret App/UserImageDirectory config : "
+ getAppSettings()->value("App/UserImageDirectory").toString()
+ ", defaulting to " + valideUserImageDirectory;
}
}
QDir userImageDir(valideUserImageDirectory);
userImageDir.mkpath(valideUserImageDirectory);
if (hasCreatedDir || !userImageDir.exists())
{
QString defaultUserImageDir = valideUserImageDirectory + "/" + tr("Images");
UBFileSystemUtils::copyDir(uniboardDefaultUserImageLibraryDirectory(),
defaultUserImageDir);
imageDirectory = QDesktopServices::storageLocation(QDesktopServices::PicturesLocation) + "/Sankore";
checkDirectory(imageDirectory);
}
return valideUserImageDirectory;
}
QString UBSettings::defaultUserImagesDirectory()
{
QString userImageDir = uniboardUserImageDirectory() + "/" + tr("Images");
QDir dir(userImageDir);
dir.mkpath(userImageDir);
return userImageDir;
return imageDirectory;
}
QString UBSettings::uniboardUserVideoDirectory()
QString UBSettings::userVideoDirectory()
{
QString valideUserVideoDirectory =
QDesktopServices::storageLocation(QDesktopServices::MoviesLocation);
// first look into the application settings
if (sAppSettings && getAppSettings()->contains("App/UserVideoDirectory"))
{
QString userVideoDirectory = getAppSettings()->value("App/UserVideoDirectory").toString();
// mute it to something absolute
if (userVideoDirectory.startsWith("{Documents}"))
{
userVideoDirectory = userVideoDirectory.replace("{Documents}",
QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation));
}
else if(userVideoDirectory.startsWith("{Home}"))
{
userVideoDirectory = userVideoDirectory.replace("{Home}",
QDesktopServices::storageLocation(QDesktopServices::HomeLocation));
}
else if(userVideoDirectory.startsWith("{Videos}"))
{
userVideoDirectory = userVideoDirectory.replace("{Videos}",
QDesktopServices::storageLocation(QDesktopServices::MoviesLocation));
static QString videoDirectory = "";
if(videoDirectory.isEmpty()){
if (sAppSettings && getAppSettings()->contains("App/UserVideoDirectory")) {
videoDirectory = getAppSettings()->value("App/UserVideoDirectory").toString();
videoDirectory = replaceWildcard(videoDirectory);
if(checkDirectory(videoDirectory))
return videoDirectory;
else
qCritical() << "failed to create video directory " << videoDirectory;
}
if(userVideoDirectory.contains("{UserLoginName}") && UBPlatformUtils::osUserLoginName() > 0)
{
userVideoDirectory = userVideoDirectory.replace("{UserLoginName}", UBPlatformUtils::osUserLoginName());
}
// valid ?
QDir dir(userVideoDirectory);
videoDirectory = QDesktopServices::storageLocation(QDesktopServices::MoviesLocation);
if (!dir.exists())
{
dir.mkpath(userVideoDirectory);
}
if (dir.exists())
{
valideUserVideoDirectory = userVideoDirectory;
}
if(videoDirectory.isEmpty())
videoDirectory = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation) + "/" + tr("My Movies");
else
{
qWarning() << "Failed to interpret App/UserVideoDirectory config : "
+ getAppSettings()->value("App/UserVideoDirectory").toString()
+ ", defaulting to " + valideUserVideoDirectory;
}
}
else
{
// May not exists (on windows XP)
if (valideUserVideoDirectory.length() == 0)
{
valideUserVideoDirectory = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation) + "/" + tr("My Movies");
}
QDir dir(valideUserVideoDirectory);
videoDirectory = videoDirectory + "/Sankore";
if (!dir.exists())
{
dir.mkpath(valideUserVideoDirectory);
}
checkDirectory(videoDirectory);
}
return valideUserVideoDirectory;
return videoDirectory;
}
QString UBSettings::podcastRecordingDirectory()
QString UBSettings::userAudioDirectory()
{
QString validePodcastRecordingDirectory =
QDesktopServices::storageLocation(QDesktopServices::DesktopLocation);
static QString audioDirectory = "";
if(audioDirectory.isEmpty()){
if (sAppSettings && getAppSettings()->contains("App/UserAudioDirectory")) {
audioDirectory = getAppSettings()->value("App/UserAudioDirectory").toString();
// first look into the application settings
if (sAppSettings && getAppSettings()->contains("Podcast/RecordingDirectory"))
{
QString userPodcastRecordingDirectory = getAppSettings()->value("Podcast/RecordingDirectory").toString();
// mute it to something absolute
if (userPodcastRecordingDirectory.startsWith("{Documents}"))
{
userPodcastRecordingDirectory = userPodcastRecordingDirectory.replace("{Documents}",
QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation));
}
else if(userPodcastRecordingDirectory.startsWith("{Home}"))
{
userPodcastRecordingDirectory = userPodcastRecordingDirectory.replace("{Home}",
QDesktopServices::storageLocation(QDesktopServices::HomeLocation));
}
else if(userPodcastRecordingDirectory.startsWith("{Videos}"))
{
userPodcastRecordingDirectory = userPodcastRecordingDirectory.replace("{Videos}",
QDesktopServices::storageLocation(QDesktopServices::MoviesLocation));
}
if(userPodcastRecordingDirectory.contains("{UserLoginName}") && UBPlatformUtils::osUserLoginName() > 0)
{
userPodcastRecordingDirectory = userPodcastRecordingDirectory.replace("{UserLoginName}", UBPlatformUtils::osUserLoginName());
}
// valid ?
QDir dir(userPodcastRecordingDirectory);
if (!dir.exists())
{
dir.mkpath(userPodcastRecordingDirectory);
audioDirectory = replaceWildcard(audioDirectory);
if(checkDirectory(audioDirectory))
return audioDirectory;
else
qCritical() << "failed to create image directory " << audioDirectory;
}
if (dir.exists())
{
validePodcastRecordingDirectory = userPodcastRecordingDirectory;
}
else
{
qWarning() << "Failed to interpret Podcast/RecordingDirectory config : "
+ getAppSettings()->value("Podcast/RecordingDirectory").toString()
+ ", defaulting to user Desktop";
}
audioDirectory = QDesktopServices::storageLocation(QDesktopServices::MusicLocation) + "/Sankore";
checkDirectory(audioDirectory);
}
else
{
return audioDirectory;
}
QDir dir(validePodcastRecordingDirectory);
if (!dir.exists())
QString UBSettings::userPodcastRecordingDirectory()
{
static QString dirPath = "";
if(dirPath.isEmpty()){
if (sAppSettings && getAppSettings()->contains("Podcast/RecordingDirectory"))
{
dir.mkpath(validePodcastRecordingDirectory);
dirPath = getAppSettings()->value("Podcast/RecordingDirectory").toString();
dirPath = replaceWildcard(dirPath);
if(checkDirectory(dirPath))
return dirPath;
else
qCritical() << "failed to create dir " << dirPath;
}
dirPath = QDesktopServices::storageLocation(QDesktopServices::DesktopLocation);
checkDirectory(dirPath);
}
return validePodcastRecordingDirectory;
return dirPath;
}
QString UBSettings::uniboardDocumentDirectory()
QString UBSettings::userDocumentDirectory()
{
return uniboardDataDirectory() + "/document";
static QString documentDirectory = "";
if(documentDirectory.isEmpty()){
documentDirectory = userDataDirectory() + "/document";
checkDirectory(documentDirectory);
}
return documentDirectory;
}
QString UBSettings::libraryPaletteFavoriteListFilePath()
QString UBSettings::userFavoriteListFilePath()
{
QString filePath = uniboardDataDirectory() + "/libraryPalette/favorite.dat";
if (!QDir(uniboardDataDirectory() + "/libraryPalette").exists())
QDir().mkpath(uniboardDataDirectory() + "/libraryPalette");
static QString filePath = "";
if(filePath.isEmpty()){
QString dirPath = userDataDirectory() + "/libraryPalette";
checkDirectory(dirPath);
filePath = dirPath + "/favorite.dat";
}
return filePath;
}
QString UBSettings::trashLibraryPaletteDirPath()
QString UBSettings::userTrashDirPath()
{
QString trashPath = uniboardDataDirectory() + "/libraryPalette/trash";
if (!QDir(trashPath).exists())
QDir().mkpath(trashPath);
static QString trashPath = "";
if(trashPath.isEmpty()){
trashPath = userDataDirectory() + "/libraryPalette/trash";
checkDirectory(trashPath);
}
return trashPath;
}
QString UBSettings::uniboardShapeLibraryDirectory()
QString UBSettings::applicationShapeLibraryDirectory()
{
QString defaultRelativePath = QString("./library/shape");
QString configPath = value("Library/ShapeDirectory", QVariant(defaultRelativePath)).toString();
if (configPath.startsWith("."))
{
if (configPath.startsWith(".")) {
return UBPlatformUtils::applicationResourcesDirectory() + configPath.right(configPath.size() - 1);
}
else
{
else {
return configPath;
}
}
QString UBSettings::uniboardGipLibraryDirectory()
QString UBSettings::applicationGipLibraryDirectory()
{
QString dirPath = UBPlatformUtils::applicationResourcesDirectory() + "/library/gips";
if (!QDir(dirPath).exists())
QDir().mkpath(dirPath);
static QString dirPath = "";
if(dirPath.isEmpty()){
dirPath = UBPlatformUtils::applicationResourcesDirectory() + "/library/gips";
checkDirectory(dirPath);
}
return dirPath;
}
QString UBSettings::uniboardSearchDirectory()
QString UBSettings::userSearchDirectory()
{
QString dirPath = UBPlatformUtils::applicationResourcesDirectory() + "/library/search";
if (!QDir(dirPath).exists())
QDir().mkpath(dirPath);
static QString dirPath = "";
if(dirPath.isEmpty()){
dirPath = UBPlatformUtils::applicationResourcesDirectory() + "/library/search";
checkDirectory(dirPath);
}
return dirPath;
}
QString UBSettings::uniboardImageLibraryDirectory()
QString UBSettings::applicationImageLibraryDirectory()
{
QString defaultRelativePath = QString("./library/image");
QString configPath = value("Library/ImageDirectory", QVariant(defaultRelativePath)).toString();
if (configPath.startsWith("."))
{
if (configPath.startsWith(".")) {
return UBPlatformUtils::applicationResourcesDirectory() + configPath.right(configPath.size() - 1);
}
else
{
else {
return configPath;
}
}
QString UBSettings::uniboardDefaultUserImageLibraryDirectory()
QString UBSettings::userAnimationDirectory()
{
QString defaultRelativePath = QString("./library/userImage");
QString configPath = value("Library/DefaultUserImageDirectory", QVariant(defaultRelativePath)).toString();
if (configPath.startsWith("."))
{
return UBPlatformUtils::applicationResourcesDirectory() + configPath.right(configPath.size() - 1);
static QString animationDirectory = "";
if(animationDirectory.isEmpty()){
animationDirectory = userDataDirectory() + "/animationUserDirectory";
checkDirectory(animationDirectory);
}
else
{
return configPath;
}
}
QString UBSettings::animationUserDirectory()
{
QString animationDirectory = uniboardDataDirectory() + "/animationUserDirectory";
if (!QDir(animationDirectory).exists())
QDir().mkpath(animationDirectory);
return animationDirectory;
}
QString UBSettings::uniboardInteractiveUserDirectory()
QString UBSettings::userInteractiveDirectory()
{
QString valideUserInteractiveDirectory = uniboardDataDirectory() + "/interactive content";
// first look into the application settings
if (sAppSettings && getAppSettings()->contains("App/UserInteractiveContentDirectory"))
{
QString userWidgetDirectory = getAppSettings()->value("App/UserInteractiveContentDirectory").toString();
// mute it to something absolute
if (userWidgetDirectory.startsWith("{Documents}"))
{
userWidgetDirectory = userWidgetDirectory.replace("{Documents}",
QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation));
}
else if(userWidgetDirectory.startsWith("{Home}"))
{
userWidgetDirectory = userWidgetDirectory.replace("{Home}",
QDesktopServices::storageLocation(QDesktopServices::HomeLocation));
}
else if(userWidgetDirectory.startsWith("{Videos}"))
{
userWidgetDirectory = userWidgetDirectory.replace("{Videos}",
QDesktopServices::storageLocation(QDesktopServices::MoviesLocation));
}
// valid ?
QDir dir(userWidgetDirectory);
if (!dir.exists())
{
dir.mkpath(userWidgetDirectory);
}
if (dir.exists())
{
valideUserInteractiveDirectory = userWidgetDirectory;
}
else
{
qWarning() << "Failed to interpret App/UserInteractiveContentDirectory config : "
+ getAppSettings()->value("App/UserInteractiveContentDirectory").toString()
+ ", defaulting to " + valideUserInteractiveDirectory;
}
}
else
{
QDir widgetUserDir = QDir(valideUserInteractiveDirectory);
if (!widgetUserDir.exists())
{
widgetUserDir.mkpath(valideUserInteractiveDirectory);
static QString interactiveDirectory = "";
if(interactiveDirectory.isEmpty()){
if (sAppSettings && getAppSettings()->contains("App/UserInteractiveContentDirectory")) {
interactiveDirectory = getAppSettings()->value("App/UserInteractiveContentDirectory").toString();
interactiveDirectory = replaceWildcard(interactiveDirectory);
if(checkDirectory(interactiveDirectory))
return interactiveDirectory;
else
qCritical() << "failed to create directory " << interactiveDirectory;
}
interactiveDirectory = userDataDirectory() + "/interactive content";
checkDirectory(interactiveDirectory);
}
return valideUserInteractiveDirectory;
return interactiveDirectory;
}
QString UBSettings::sankoreDistributedInteractiveDirectory()
QString UBSettings::applicationInteractivesDirectory()
{
QString defaultRelativePath = QString("./library/sankoreInteractivities");
QString defaultRelativePath = QString("./library/interactivities");
QString configPath = value("Library/sankoreInteractivities", QVariant(defaultRelativePath)).toString();
QString configPath = value("Library/InteractivitiesDirectory", QVariant(defaultRelativePath)).toString();
if (configPath.startsWith("."))
{
if (configPath.startsWith(".")) {
return UBPlatformUtils::applicationResourcesDirectory() + configPath.right(configPath.size() - 1);
}
else
{
else {
return configPath;
}
}
QString UBSettings::uniboardInteractiveLibraryDirectory()
QString UBSettings::applicationApplicationsLibraryDirectory()
{
QString defaultRelativePath = QString("./library/interactive");
QString defaultRelativePath = QString("./library/applications");
QString configPath = value("Library/InteractiveContentDirectory", QVariant(defaultRelativePath)).toString();
QString configPath = value("Library/ApplicationsDirectory", QVariant(defaultRelativePath)).toString();
if (configPath.startsWith("."))
{
if (configPath.startsWith(".")) {
return UBPlatformUtils::applicationResourcesDirectory() + configPath.right(configPath.size() - 1);
}
else
{
else {
return configPath;
}
}
QString UBSettings::uniboardInteractiveFavoritesDirectory()
QString UBSettings::userInteractiveFavoritesDirectory()
{
QString valideUserInteractiveDirectory = uniboardDataDirectory() + "/interactive favorites";
// first look into the application settings
if (sAppSettings && getAppSettings()->contains("App/UserInteractiveFavoritesDirectory"))
{
QString userWidgetDirectory = getAppSettings()->value("App/UserInteractiveFavoritesDirectory").toString();
// mute it to something absolute
if (userWidgetDirectory.startsWith("{Documents}"))
{
userWidgetDirectory = userWidgetDirectory.replace("{Documents}",
QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation));
}
else if(userWidgetDirectory.startsWith("{Home}"))
{
userWidgetDirectory = userWidgetDirectory.replace("{Home}",
QDesktopServices::storageLocation(QDesktopServices::HomeLocation));
}
else if(userWidgetDirectory.startsWith("{Videos}"))
{
userWidgetDirectory = userWidgetDirectory.replace("{Videos}",
QDesktopServices::storageLocation(QDesktopServices::MoviesLocation));
}
// valid ?
QDir dir(userWidgetDirectory);
if (!dir.exists())
{
dir.mkpath(userWidgetDirectory);
static QString dirPath = "";
if(dirPath.isEmpty()){
if (sAppSettings && getAppSettings()->contains("App/UserInteractiveFavoritesDirectory")) {
dirPath = getAppSettings()->value("App/UserInteractiveFavoritesDirectory").toString();
dirPath = replaceWildcard(dirPath);
if(checkDirectory(dirPath))
return dirPath;
else
qCritical() << "failed to create directory " << dirPath;
}
if (dir.exists())
{
valideUserInteractiveDirectory = userWidgetDirectory;
}
else
{
qWarning() << "Failed to interpret App/UserInteractiveFavoritesDirectory config : "
+ getAppSettings()->value("App/UserInteractiveFavoritesDirectory").toString()
+ ", defaulting to " + valideUserInteractiveDirectory;
}
}
else
{
QDir widgetUserDir = QDir(valideUserInteractiveDirectory);
if (!widgetUserDir.exists())
{
widgetUserDir.mkpath(valideUserInteractiveDirectory);
}
dirPath = userDataDirectory() + "/interactive favorites";
checkDirectory(dirPath);
}
return valideUserInteractiveDirectory;
return dirPath;
}
......@@ -1350,3 +1103,34 @@ void UBSettings::setCommunityPassword(const QString &password)
{
communityPsw->set(QVariant(password));
}
bool UBSettings::checkDirectory(QString& dirPath)
{
bool result = true;
QDir dir(dirPath);
if(!dir.exists())
result = dir.mkpath(dirPath);
return result;
}
QString UBSettings::replaceWildcard(QString& path)
{
QString result(path);
if (result.startsWith("{Documents}")) {
result = result.replace("{Documents}", QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation));
}
else if(result.startsWith("{Home}")) {
result = result.replace("{Home}", QDesktopServices::storageLocation(QDesktopServices::HomeLocation));
}
else if(result.startsWith("{Desktop}")) {
result = result.replace("{Desktop}", QDesktopServices::storageLocation(QDesktopServices::DesktopLocation));
}
if(result.contains("{UserLoginName}") && UBPlatformUtils::osUserLoginName().length() > 0) {
result = result.replace("{UserLoginName}", UBPlatformUtils::osUserLoginName());
}
return result;
}
......@@ -98,29 +98,28 @@ class UBSettings : public QObject
void init();
static QString uniboardDataDirectory();
static QString uniboardDocumentDirectory();
static QString libraryPaletteFavoriteListFilePath();
static QString trashLibraryPaletteDirPath();
//user directories
static QString userDataDirectory();
static QString userDocumentDirectory();
static QString userFavoriteListFilePath();
static QString userTrashDirPath();
static QString userImageDirectory();
static QString userVideoDirectory();
static QString userAudioDirectory();
static QString userSearchDirectory();
static QString userAnimationDirectory();
static QString userInteractiveDirectory();
static QString userInteractiveFavoritesDirectory();
static QString userPodcastRecordingDirectory();
//application directory
QString applicationShapeLibraryDirectory();
QString applicationGipLibraryDirectory();
QString applicationImageLibraryDirectory();
QString applicationApplicationsLibraryDirectory();
QString applicationInteractivesDirectory();
QString uniboardShapeLibraryDirectory();
QString uniboardGipLibraryDirectory();
QString uniboardImageLibraryDirectory();
QString uniboardUserImageDirectory();
QString defaultUserImagesDirectory();
QString uniboardSearchDirectory();
QString uniboardUserVideoDirectory();
QString uniboardDefaultUserImageLibraryDirectory();
QString uniboardInteractiveUserDirectory();
QString animationUserDirectory();
QString uniboardInteractiveLibraryDirectory();
QString uniboardInteractiveFavoritesDirectory();
QString sankoreDistributedInteractiveDirectory();
QString podcastRecordingDirectory();
QNetworkProxy* httpProxy();
......@@ -319,11 +318,6 @@ class UBSettings : public QObject
UBSetting* pageSize;
/*
static int navigPaletteWidth;
static int libPaletteWidth;
*/
UBSetting* KeyboardLocale;
public slots:
......@@ -347,10 +341,7 @@ class UBSettings : public QObject
QVariant value ( const QString & key, const QVariant & defaultValue = QVariant() ) const;
void setValue (const QString & key,const QVariant & value);
void colorChanged()
{
emit colorContextChanged();
}
void colorChanged() { emit colorContextChanged(); }
signals:
void colorContextChanged();
......@@ -363,13 +354,14 @@ class UBSettings : public QObject
static const int sDefaultFontPixelSize;
static const char *sDefaultFontFamily;
private:
static QSettings* getAppSettings();
static QPointer<QSettings> sAppSettings;
static QPointer<UBSettings> sSingleton;
static bool checkDirectory(QString& dirPath);
static QString replaceWildcard(QString& path);
};
......
......@@ -50,8 +50,7 @@ void ub_message_output(QtMsgType type, const char *msg) {
#endif
if (UBApplication::app() && UBApplication::app()->isVerbose()) {
QString logFileNamePath = UBSettings::uniboardDataDirectory()
+ "/log/uniboard.log";
QString logFileNamePath = UBSettings::userDataDirectory() + "/log/uniboard.log";
QFile logFile(logFileNamePath);
if (logFile.exists() && logFile.size() > 10000000)
......@@ -102,7 +101,7 @@ int main(int argc, char *argv[])
QStringList args = app.arguments();
QString dumpPath = UBSettings::uniboardDataDirectory() + "/log";
QString dumpPath = UBSettings::userDataDirectory() + "/log";
QDir logDir(dumpPath);
if (!logDir.exists())
logDir.mkdir(dumpPath);
......
......@@ -1239,7 +1239,7 @@ void UBGraphicsScene::addGraphicsWidget(UBGraphicsWidgetItem* graphicsWidget, co
UBGraphicsW3CWidgetItem* UBGraphicsScene::addOEmbed(const QUrl& pContentUrl, const QPointF& pPos)
{
QStringList widgetPaths = UBPersistenceManager::persistenceManager()->allWidgets(UBSettings::settings()->uniboardInteractiveLibraryDirectory());
QStringList widgetPaths = UBPersistenceManager::persistenceManager()->allWidgets(UBSettings::settings()->applicationApplicationsLibraryDirectory());
UBGraphicsW3CWidgetItem *widget = 0;
......
......@@ -231,7 +231,7 @@ bool UBW3CWidget::hasNPAPIWrapper(const QString& pMimeType)
QString UBW3CWidget::createNPAPIWrapper(const QString& url,
const QString& pMimeType, const QSize& sizeHint, const QString& pName)
{
const QString userWidgetPath = UBSettings::settings()->uniboardInteractiveUserDirectory() + "/" + tr("Web");
const QString userWidgetPath = UBSettings::settings()->userInteractiveDirectory() + "/" + tr("Web");
QDir userWidgetDir(userWidgetPath);
return createNPAPIWrapperInDir(url, userWidgetDir, pMimeType, sizeHint, pName);
......
......@@ -56,7 +56,7 @@ UBFavoriteToolPalette::UBFavoriteToolPalette(QWidget* parent)
}
}
QDir favoritesDir(UBSettings::settings()->uniboardInteractiveFavoritesDirectory());
QDir favoritesDir(UBSettings::settings()->userInteractiveFavoritesDirectory());
QStringList favoritesSubDirs = favoritesDir.entryList(QStringList(), QDir::Dirs | QDir::NoDotAndDotDot | QDir::NoSymLinks, QDir::Name);
QStringList appPathes;
......
......@@ -268,7 +268,6 @@ void UBMediaPlayer::openFile()
for (int i=1; i<fileNames.size(); i++)
m_MediaObject.enqueue(Phonon::MediaSource(fileNames[i]));
}
// forwardButton->setEnabled(m_MediaObject.queue().size() > 0);
}
void UBMediaPlayer::bufferStatus(int percent)
......
......@@ -135,7 +135,7 @@ void UBCookieJar::load()
// load cookies and exceptions
qRegisterMetaTypeStreamOperators<QList<QNetworkCookie> >("QList<QNetworkCookie>");
QSettings cookieSettings(UBSettings::uniboardDataDirectory() + QLatin1String("/cookies.ini"), QSettings::IniFormat);
QSettings cookieSettings(UBSettings::userDataDirectory() + QLatin1String("/cookies.ini"), QSettings::IniFormat);
QVariant vCookies = cookieSettings.value(QLatin1String("cookies"));
QList<QNetworkCookie> cookies = qvariant_cast<QList<QNetworkCookie> >(vCookies);
......@@ -180,7 +180,7 @@ void UBCookieJar::save()
if (!mLoaded)
return;
purgeOldCookies();
QString directory = UBSettings::uniboardDataDirectory();
QString directory = UBSettings::userDataDirectory();
if (directory.isEmpty())
directory = QDir::homePath() + QLatin1String("/.") + QCoreApplication::applicationName();
if (!QFile::exists(directory)) {
......
......@@ -63,7 +63,7 @@ UBNetworkAccessManager::UBNetworkAccessManager(QObject *parent)
}
QNetworkDiskCache *diskCache = new QNetworkDiskCache(this);
QString location = UBSettings::uniboardDataDirectory() + "/web-cache";
QString location = UBSettings::userDataDirectory() + "/web-cache";
diskCache->setCacheDirectory(location);
setCache(diskCache);
}
......
......@@ -332,7 +332,7 @@ void UBPodcastController::start()
mPartNumber = 0;
mPodcastRecordingPath = UBSettings::settings()->podcastRecordingDirectory();
mPodcastRecordingPath = UBSettings::settings()->userPodcastRecordingDirectory();
qDebug() << "mPodcastRecordingPath: " << mPodcastRecordingPath;
......
......@@ -60,7 +60,7 @@ void UniboardSankoreTransition::rollbackDocumentsTransition(QFileInfoList& fileI
if (fileInfo->isDir() && fileInfo->fileName().startsWith("Uniboard Document ")){
QString sankoreDocumentName = fileInfo->fileName();
sankoreDocumentName.replace("Uniboard","Sankore");
QString sankoreDocumentDirectoryPath = UBSettings::uniboardDocumentDirectory() + "/" + sankoreDocumentName;
QString sankoreDocumentDirectoryPath = UBSettings::userDocumentDirectory() + "/" + sankoreDocumentName;
if (QFileInfo(sankoreDocumentDirectoryPath).exists()){
UBFileSystemUtils::deleteDir(sankoreDocumentDirectoryPath);
}
......@@ -244,7 +244,7 @@ void UniboardSankoreTransition::executeTransition()
fileInfoList.append(UBFileSystemUtils::allElementsInDirectory(mOldSankoreDirectory + "/document"));
QFileInfoList::iterator fileInfo;
QString sankoreDocumentDirectory = UBSettings::uniboardDocumentDirectory();
QString sankoreDocumentDirectory = UBSettings::userDocumentDirectory();
for (fileInfo = fileInfoList.begin(); fileInfo != fileInfoList.end() && result; fileInfo += 1) {
if (fileInfo->isDir() && (fileInfo->fileName().startsWith("Uniboard Document ") || fileInfo->fileName().startsWith("Sankore Document "))){
......
......@@ -207,7 +207,7 @@ void UBTrapFlashController::createWidget()
void UBTrapFlashController::importWidgetInLibrary(QDir pSourceDir)
{
const QString userWidgetPath = UBSettings::settings()->uniboardInteractiveUserDirectory() + "/" + tr("Web");
const QString userWidgetPath = UBSettings::settings()->userInteractiveDirectory() + "/" + tr("Web");
QDir userWidgetDir(userWidgetPath);
if (!userWidgetDir.exists())
......
......@@ -246,8 +246,7 @@ void WBHistoryManager::load()
{
loadSettings();
QFile historyFile(UBSettings::uniboardDataDirectory()
+ QLatin1String("/history"));
QFile historyFile(UBSettings::userDataDirectory() + QLatin1String("/history"));
if (!historyFile.exists())
return;
if (!historyFile.open(QFile::ReadOnly))
......@@ -332,7 +331,7 @@ void WBHistoryManager::save()
if (first == m_history.count() - 1)
saveAll = true;
QString directory = UBSettings::uniboardDataDirectory();
QString directory = UBSettings::userDataDirectory();
if (directory.isEmpty())
directory = QDir::homePath() + QLatin1String("/.") + QCoreApplication::applicationName();
if (!QFile::exists(directory))
......
......@@ -187,7 +187,7 @@ void WBWebPage::handleUnsupportedContent(QNetworkReply *reply)
if (!isPDF && reply->error() == QNetworkReply::NoError)
{
if(contentType == "application/widget")
WBBrowserWindow::downloadManager()->handleUnsupportedContent(reply,false, UBSettings::settings()->uniboardGipLibraryDirectory());
WBBrowserWindow::downloadManager()->handleUnsupportedContent(reply,false, UBSettings::settings()->applicationGipLibraryDirectory());
else
WBBrowserWindow::downloadManager()->handleUnsupportedContent(reply);
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment