使用的表格单元格着色颜色与tblLook设置不匹配 [英] Table cell shading color used not matching tblLook setting

查看:203
本文介绍了使用的表格单元格着色颜色与tblLook设置不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我有一个docx文件,其中MS Word 2007似乎显示的表格单元格着色颜色与基于该颜色的阴影不匹配。 tbl在该表上查看设置。

I have a docx file for which MS Word 2007 seems to display a table cell shading color that does not match the shading that would be got based on the tblLook setting on that table.

这是表示主文档中表格的xml片段:

Here's a snippet of the xml representing the table in the main document:

<w:tbl>
  <w:tblPr>
    <w:tblStyle w:val="Style18"/>
    <w:tblW w:w="0" w:type="auto"/>
    <w:tblInd w:w="288" w:type="dxa"/>
    <w:tblLook w:val="01E0"/>
  </w:tblPr>
  <w:tblGrid>
    <w:gridCol w:w="459"/>
    <w:gridCol w:w="441"/>
  </w:tblGrid>
  <w:tr w:rsidR="0029170E" w:rsidRPr="0029170E" w:rsidTr="0029170E">
    <w:trPr>
      <w:cnfStyle w:val="100000000000"/>
      <w:trHeight w:val="698"/>
    </w:trPr>
    <w:tc>
      <w:tcPr>
        <w:cnfStyle w:val="001000000000"/>
        <w:tcW w:w="0" w:type="auto"/>
        <w:gridSpan w:val="2"/>
        <w:tcBorders>
          <w:top w:val="single" w:sz="6" w:space="0" w:color="000000" w:themeColor="text1"/>
          <w:left w:val="single" w:sz="6" w:space="0" w:color="000000" w:themeColor="text1"/>
          <w:bottom w:val="single" w:sz="6" w:space="0" w:color="000000" w:themeColor="text1"/>
        <w:right w:val="single" w:sz="6" w:space="0" w:color="000000" w:themeColor="text1"/>
        </w:tcBorders>
      </w:tcPr>
      <w:p w:rsidR="00AA669D" w:rsidRDefault="00AA669D">
	<w:pPr>
          <w:widowControl w:val="0"/>
          <w:spacing w:before="19" w:after="439" w:line="240" w:lineRule="exact"/>
          <w:ind w:left="-18" w:firstLine="18"/>
          <w:jc w:val="center"/>
	  <w:rPr>
            <w:sz w:val="20"/>
          </w:rPr>
        </w:pPr>
      </w:p>
    </w:tc>
  </w:tr>
  <w:tr w:rsidR="0029170E" w:rsidRPr="0029170E" w:rsidTr="0029170E">
    <w:trPr>
      <w:trHeight w:val="698"/>
    </w:trPr>
    <w:tc>
      <w:tcPr>
        <w:cnfStyle w:val="001000000000"/>
        <w:tcW w:w="0" w:type="auto"/>
	<w:tcBorders>
          <w:top w:val="single" w:sz="6" w:space="0" w:color="000000" w:themeColor="text1"/>
          <w:left w:val="single" w:sz="6" w:space="0" w:color="000000" w:themeColor="text1"/>
          <w:bottom w:val="single" w:sz="6" w:space="0" w:color="000000" w:themeColor="text1"/>
          <w:right w:val="single" w:sz="6" w:space="0" w:color="000000" w:themeColor="text1"/>
        </w:tcBorders>
      </w:tcPr>
      <w:p w:rsidR="00AA669D" w:rsidRDefault="009E693F">
	<w:pPr>
          <w:widowControl w:val="0"/>
          <w:spacing w:before="19" w:after="439" w:line="240" w:lineRule="exact"/>
	  <w:rPr>
            <w:color w:val="000000"/>
            <w:sz w:val="20"/>
          </w:rPr>
        </w:pPr>
        <w:r>
	  <w:rPr>
            <w:color w:val="000000"/>
            <w:sz w:val="20"/>
          </w:rPr>
          <w:t>AA</w:t>
        </w:r>
      </w:p>
    </w:tc>
    <w:tc>
      <w:tcPr>
        <w:cnfStyle w:val="000100000000"/>
        <w:tcW w:w="0" w:type="auto"/>
	<w:tcBorders>
          <w:top w:val="single" w:sz="6" w:space="0" w:color="000000" w:themeColor="text1"/>
          <w:left w:val="single" w:sz="6" w:space="0" w:color="000000" w:themeColor="text1"/>
          <w:bottom w:val="single" w:sz="6" w:space="0" w:color="000000" w:themeColor="text1"/>
          <w:right w:val="single" w:sz="6" w:space="0" w:color="000000" w:themeColor="text1"/>
        </w:tcBorders>
      </w:tcPr>
      <w:p w:rsidR="00AA669D" w:rsidRDefault="009E693F">
	<w:pPr>
          <w:widowControl w:val="0"/>
          <w:spacing w:before="19" w:after="439" w:line="240" w:lineRule="exact"/>
	  <w:rPr>
            <w:color w:val="000000"/>
            <w:sz w:val="20"/>
          </w:rPr>
        </w:pPr>
	<w:r>
	  <w:rPr>
            <w:color w:val="000000"/>
            <w:sz w:val="20"/>
          </w:rPr>
          <w:t>BB</w:t>
        </w:r>
      </w:p>
    </w:tc>
  </w:tr>
  <w:tr w:rsidR="0029170E" w:rsidRPr="0029170E" w:rsidTr="00FD3F79">
    <w:trPr>
      <w:cnfStyle w:val="010000000000"/>
      <w:trHeight w:val="363"/>
    </w:trPr>
    <w:tc>
      <w:tcPr>
        <w:cnfStyle w:val="001000000000"/>
        <w:tcW w:w="0" w:type="auto"/>
        <w:gridSpan w:val="2"/>
        <w:tcBorders>
        <w:top w:val="single" w:sz="6" w:space="0" w:color="000000" w:themeColor="text1"/>
        <w:left w:val="single" w:sz="6" w:space="0" w:color="000000" w:themeColor="text1"/>
        <w:bottom w:val="single" w:sz="6" w:space="0" w:color="000000" w:themeColor="text1"/>
        <w:right w:val="single" w:sz="6" w:space="0" w:color="000000" w:themeColor="text1"/>
        </w:tcBorders>
      </w:tcPr>
      <w:p w:rsidR="00AA669D" w:rsidRDefault="00AA669D">
        <w:pPr>
          <w:widowControl w:val="0"/>
          <w:spacing w:before="19" w:after="439" w:line="240" w:lineRule="exact"/>
          <w:jc w:val="center"/>
          <w:rPr>
            <w:color w:val="000000"/>
            <w:sz w:val="20"/>
          </w:rPr>
        </w:pPr>
      </w:p>
    </w:tc>
  </w:tr>
</w:tbl>

以下是表格中使用的样式:

And here's the style used on the table:

<w:style w:type="table" w:customStyle="1" w:styleId="Style18">
  <w:name w:val="Style 18"/>
  <w:basedOn w:val="TableNormal"/>
  <w:uiPriority w:val="38"/>
  <w:rsid w:val="00151422"/>
  <w:pPr>
    <w:spacing w:after="0" w:line="0" w:lineRule="atLeast"/>
  </w:pPr>
  <w:rPr>
    <w:color w:val="000000" w:themeColor="text1"/>
  </w:rPr>
  <w:tblPr>
    <w:tblStyleColBandSize w:val="1"/>
    <w:tblInd w:w="0" w:type="dxa"/>
    <w:tblBorders>
      <w:top w:val="single" w:sz="4" w:space="0" w:color="FFFFFF" w:themeColor="background1"/>
      <w:left w:val="single" w:sz="4" w:space="0" w:color="FFFFFF" w:themeColor="background1"/>
      <w:bottom w:val="single" w:sz="4" w:space="0" w:color="FFFFFF" w:themeColor="background1"/>
      <w:right w:val="single" w:sz="4" w:space="0" w:color="FFFFFF" w:themeColor="background1"/>
      <w:insideH w:val="single" w:sz="4" w:space="0" w:color="FFFFFF" w:themeColor="background1"/>
      <w:insideV w:val="single" w:sz="4" w:space="0" w:color="FFFFFF" w:themeColor="background1"/>
    </w:tblBorders>
    <w:tblCellMar>
      <w:top w:w="0" w:type="dxa"/>
      <w:left w:w="108" w:type="dxa"/>
      <w:bottom w:w="0" w:type="dxa"/>
      <w:right w:w="108" w:type="dxa"/>
    </w:tblCellMar>
  </w:tblPr>
  <w:tcPr>
    <w:shd w:val="clear" w:color="auto" w:fill="F8EDED" w:themeFill="accent2"
w:themeFillTint="19"/>
  </w:tcPr>
  <w:tblStylePr w:type="firstRow">
    <w:rPr>
      <w:b/>
      <w:bCs/>
      <w:color w:val="FFFFFF" w:themeColor="background1"/>
    </w:rPr>
    <w:tblPr/>
    <w:tcPr>
      <w:shd w:val="clear" w:color="auto" w:fill="C0504D" w:themeFill="accent2"/>
    </w:tcPr>
  </w:tblStylePr>
  <w:tblStylePr w:type="lastRow">
    <w:rPr>
    <w:b/>
    <w:bCs/>
    <w:color w:val="FFFFFF" w:themeColor="background1"/>
    </w:rPr>
    <w:tblPr/>
    <w:tcPr>
      <w:shd w:val="clear" w:color="auto" w:fill="C0504D" w:themeFill="accent2"/>
    </w:tcPr>
  </w:tblStylePr>
  <w:tblStylePr w:type="firstCol">
    <w:rPr>
    <w:b/>
    <w:bCs/>
    <w:color w:val="000000" w:themeColor="text1"/>
    </w:rPr>
  </w:tblStylePr>
  <w:tblStylePr w:type="lastCol">
    <w:rPr>
      <w:b/>
      <w:bCs/>
      <w:color w:val="000000" w:themeColor="text1"/>
    </w:rPr>
  </w:tblStylePr>
  <w:tblStylePr w:type="band2Vert">
    <w:tblPr/>
    <w:tcPr>
    <w:shd w:val="clear" w:color="auto" w:fill="F2DBDB" w:themeFill="accent2"
w:themeFillTint="33"/>
    </w:tcPr>
  </w:tblStylePr>
</w:style>

考虑到表格上的tblLook掩码设置为01E0,Style18的band2Vert tblPr应该适用于第一个单元格在表的第二行中,单元格着色应为F2DBDB。但是,MS Word 2007不使用此功能,而
则使用直接在< style>下从tcPr获取的F8EDED的tcPr着色。 

Considering that the tblLook mask on the table is set to 01E0, the band2Vert tblPr from Style18 should be applicable to the first cell in the second row of the table and the cell shading color should be F2DBDB. However, MS Word 2007 does not use this and instead uses the tcPr shading of F8EDED that is got from the tcPr directly under <style>. 

有人可以请阐明为什么MS Word 2007会忽略此表的band2Vert tblStylePr?

Can someone please shed some light on why MS Word 2007 ignores the band2Vert tblStylePr for this table?

谢谢。

Anuj

推荐答案

您好Anuj:

Hi Anuj:

我已经提醒公开规格团队关于您的询问。该团队成员将很快与您联系。

I have alerted the open specifications team regarding your inquiry. A member of the team will be in touch soon.


这篇关于使用的表格单元格着色颜色与tblLook设置不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆