Writes the page size / page margin definition
420277
public void writeDefinition(final OutputStream result) throws IOException
    {
        result.write(PAGE_WIDTH);
        result.write(intToByteArray(pageWidth));
        result.write(PAGE_HEIGHT);
        result.write(intToByteArray(pageHeight));
        result.write(MARGIN_LEFT);
        result.write(intToByteArray(marginLeft));
        result.write(MARGIN_RIGHT);
        result.write(intToByteArray(marginRight));
        result.write(MARGIN_TOP);
        result.write(intToByteArray(marginTop));
        result.write(MARGIN_BOTTOM);
        result.write(intToByteArray(marginBottom));
        this.document.outputDebugLinebreak(result);    	
    }
1087309
def WriteMoDiff(diffObj):
	
	tabsize = 8
	print str(diffObj.Dn).ljust(tabsize * 10), str(diffObj.InputObject.propMoMeta.name).ljust(tabsize * 4), str(
		diffObj.SideIndicator).ljust(tabsize * 3), str(diffObj.DiffProperty)
691371
def _get_margin_width(self, cli, margin):
        
        # Margin.get_width, needs to have a UIContent instance.
        def get_ui_content():
            return self._get_ui_content(cli, width=0, height=0)

        def get_width():
            return margin.get_width(cli, get_ui_content)

        key = (margin, cli.render_counter)
        return self._margin_width_cache.get(key, get_width)
443952
def write_to_screen(self, cli, screen, mouse_handlers, write_position):
        
        sizes = self._divide_heigths(cli, write_position)

        if self.report_dimensions_callback:
            self.report_dimensions_callback(cli, sizes)

        if sizes is None:
            self.window_too_small.write_to_screen(
                cli, screen, mouse_handlers, write_position)
        else:
            # Draw child panes.
            ypos = write_position.ypos
            xpos = write_position.xpos
            width = write_position.width

            for s, c in zip(sizes, self.children):
                c.write_to_screen(cli, screen, mouse_handlers, WritePosition(xpos, ypos, width, s))
                ypos += s
1291723
function _storeMarginTop()
    {
        $record  = 0x0028;                   // Record identifier
        $length  = 0x0008;                   // Bytes to follow

        $margin  = $this->_margin_top;        // Margin in inches

        $header    = pack("vv",  $record, $length);
        $data      = pack("d",   $margin);
        if ($this->_byte_order) { // if it's Big Endian
            $data = strrev($data);
        }

        $this->_prepend($header . $data);
    }
276791
def write(self, fp, space_around_delimiters=True):
        
        if space_around_delimiters:
            d = " {0} ".format(self._delimiters[0])
        else:
            d = self._delimiters[0]
        if self._defaults:
            self._write_section(fp, self.default_section,
                                    self._defaults.items(), d)
        for section in self._sections:
            self._write_section(fp, section,
                                self._sections[section].items(), d)
368294
def _block_width(self):
        
        section = self.sections[-1]
        return Emu(
            section.page_width - section.left_margin - section.right_margin
        )
1028513
def page_align_content_length(length):
    # type: (int) -> int
    
    mod = length % _PAGEBLOB_BOUNDARY
    if mod != 0:
        return length + (_PAGEBLOB_BOUNDARY - mod)
    return length
679496
function getPageDimensions() {
      var bttmRight = document.createElement("div");
      bttmRight.setAttribute("style" , "visibility:hidden;position:fixed;bottom:0px;right:0px;");
      document.getElementsByTagName("body")[0].appendChild(bttmRight);
      var pageWidth = bttmRight.offsetLeft;
      var pageHeight = bttmRight.offsetTop;
      bttmRight.parentNode.removeChild(bttmRight);
      return { width:pageWidth, height:pageHeight };
    }
247254
private function _writeMarginTop()
	{
		$record  = 0x0028;				   // Record identifier
		$length  = 0x0008;				   // Bytes to follow

		$margin  = $this->_phpSheet->getPageMargins()->getTop();	 // Margin in inches

		$header	= pack("vv",  $record, $length);
		$data	  = pack("d",   $margin);
		if (self::getByteOrder()) { // if it's Big Endian
			$data = strrev($data);
		}

		$this->_append($header . $data);
	}
861953
private void writeMainPage(int userPage, int oidPage, int schemaPage, int indexPage, 
			int freeSpaceIndexPage, int pageCount, StorageChannelOutput out, long lastUsedOid,
			long txId) {
		rootPageID = (rootPageID + 1) % 2;
		
		out.seekPageForWrite(PAGE_TYPE.ROOT_PAGE, rootPages[rootPageID]);

		//**********
		// When updating this, also update checkRoot()!
		//**********
		
		//tx ID
		out.writeLong(txId);
		//User table
		out.writeInt(userPage);
		//OID table
		out.writeInt(oidPage);
		//schemata
		out.writeInt(schemaPage);
		//indices
		out.writeInt(indexPage);
		//free space index
		out.writeInt(freeSpaceIndexPage);
		//page count
		out.writeInt(pageCount);
		//last used oid
		out.writeLong(lastUsedOid);
		//tx ID. Writing the tx ID twice should ensure that the data between the two has been
		//written correctly.
		out.writeLong(txId);
	}
1118992
public void setPageMargin(int marginPixels) {
        final int oldMargin = mPageMargin;
        mPageMargin = marginPixels;

        final int width = getWidth();
        recomputeScrollPosition(width, width, marginPixels, oldMargin);

        requestLayout();
    }
846024
protected void writeLogging(Definition def, Writer out, int indent, String level, String content, String... params)
         throws IOException
   {
      writeIndent(out, indent);
      if (def.isSupportJbossLogging())
      {
         out.write("log.trace");
         int size = params.length;
         if (size > 0)
            out.write("f");
         out.write("(\"" + content + "(");
         for (int i = 0; i < size; i++)
         {
            out.write("%s");
            if (i < size - 1)
               out.write(", ");
         }
         out.write(")\"");
         for (int i = 0; i < size; i++)
         {
            out.write(", ");
            out.write(params[i]);
         }
         out.write(");");
      }
      else
      {
         out.write("log.finest(\"" + content + "()\");");
      }
      writeEol(out);
   }
838849
function ezSetMargins( $top, $bottom, $left, $right )
    {
        // sets the margins to new values
        $this->ez['topMargin'] = $top;
        $this->ez['bottomMargin'] = $bottom;
        $this->ez['leftMargin'] = $left;
        $this->ez['rightMargin'] = $right;
        $this->LeftMarginArray = array();
        $this->RightMarginArray = array();
        // check to see if this means that the current writing position is outside the
        // writable area
        if ( $this->y > $this->ez['pageHeight'] - $top )
        {
            // then move y down
            $this->ezSetY( $this->ez['pageHeight'] - $top );
        }
        if ( $this->y < $bottom )
        {
            // then make a new page
            $this->ezNewPage();
        }
    }
1342968
private void writeRowDefinition(final OutputStream result) throws IOException {
        result.write(ROW_BEGIN);
        this.document.outputDebugLinebreak(result);
        result.write(ROW_WIDTH_STYLE);
        result.write(ROW_WIDTH);
        result.write(intToByteArray(this.width));
        if(this.parentTable.getCellsFitToPage()) {
            result.write(ROW_KEEP_TOGETHER);
        }
        if(this.rowNumber <= this.parentTable.getHeaderRows()) {
            result.write(ROW_HEADER_ROW);
        }
        switch (this.parentTable.getAlignment()) {
            case Element.ALIGN_LEFT:
            	result.write(ROW_ALIGN_LEFT);
                break;
            case Element.ALIGN_RIGHT:
                result.write(ROW_ALIGN_RIGHT);
                break;
            case Element.ALIGN_CENTER:
                result.write(ROW_ALIGN_CENTER);
                break;
            case Element.ALIGN_JUSTIFIED:
            case Element.ALIGN_JUSTIFIED_ALL:
                result.write(ROW_ALIGN_JUSTIFIED);
                break;
        }
        result.write(ROW_GRAPH);
        RtfBorderGroup borders =this.parentTable.getBorders();
        if(borders != null) {
        	borders.writeContent(result);
        }
        
        if(this.parentTable.getCellSpacing() > 0) {
            result.write(ROW_CELL_SPACING_LEFT);
            result.write(intToByteArray((int) (this.parentTable.getCellSpacing() / 2)));
            result.write(ROW_CELL_SPACING_LEFT_STYLE);
            result.write(ROW_CELL_SPACING_TOP);
            result.write(intToByteArray((int) (this.parentTable.getCellSpacing() / 2)));
            result.write(ROW_CELL_SPACING_TOP_STYLE);
            result.write(ROW_CELL_SPACING_RIGHT);
            result.write(intToByteArray((int) (this.parentTable.getCellSpacing() / 2)));
            result.write(ROW_CELL_SPACING_RIGHT_STYLE);
            result.write(ROW_CELL_SPACING_BOTTOM);
            result.write(intToByteArray((int) (this.parentTable.getCellSpacing() / 2)));
            result.write(ROW_CELL_SPACING_BOTTOM_STYLE);
        }
        
        result.write(ROW_CELL_PADDING_LEFT);
        result.write(intToByteArray((int) (this.parentTable.getCellPadding() / 2)));
        result.write(ROW_CELL_PADDING_RIGHT);
        result.write(intToByteArray((int) (this.parentTable.getCellPadding() / 2)));
        result.write(ROW_CELL_PADDING_LEFT_STYLE);
        result.write(ROW_CELL_PADDING_RIGHT_STYLE);
        
        this.document.outputDebugLinebreak(result);
        
        for(int i = 0; i < this.cells.size(); i++) {
            RtfCell rtfCell = (RtfCell) this.cells.get(i);
            rtfCell.writeDefinition(result);
        }    	
    }
1055437
private function _writeDefcol()
	{
		$defaultColWidth = 8;

		$record   = 0x0055;	  // Record identifier
		$length   = 0x0002;	  // Number of bytes to follow

		$header = pack("vv", $record, $length);
		$data = pack("v", $defaultColWidth);
		$this->_append($header . $data);
	}
505880
def pageSize(cls):
        
        try:
            try:
                pageSize = win32.GetSystemInfo().dwPageSize
            except WindowsError:
                pageSize = 0x1000
        except NameError:
            pageSize = 0x1000
        cls.pageSize = pageSize     # now this function won't be called again
        return pageSize