Hi Max,

On 09/05/08 09:31, Maximilian Odendahl wrote:

thanks, it seems to works with ScriptInfo, but I'd like to understand it. All I have in my document is one single note, for which I set the hidden attribute:


const SwTxtNode* pTxtNode = rPos.nNode.GetNode().GetTxtNode();
SwTxtAttr* pTxtAttr = pTxtNode ? pTxtNode->GetTxtAttr( rPos.nContent.GetIndex(),RES_CHRATR_HIDDEN ) : 0;

bool bHidden = pTxtAttr ? pTxtAttr->GetCharHidden().GetValue() : false;

bool bHidden2 = SwScriptInfo::IsInHiddenRange(
    *pTxtNode,rPos.nContent.GetIndex() );

bool hHidden3 = pTxtNode->HasHiddenCharAttribute(false);


bHidden2 and bHidden3 is both true, but bHidden is not, because pTxtAttr is not valid, so I guess sth. is wrong with this.

ok, one scenarion might be this: The whole paragraph is hidden, e.g., via style or by using a hard attribute for the whole paragraph. Then there is no hidden text attribute at position 0. But maybe there's a hidden text attribute at positon 10. In this case bHidden = false, bHidden2 = true, bHidden3 = true. If you step into GetTxtAttr(), you will see if there are any hidden text text attributes in the hints array.

Regards,

Frank

--
Frank Meies (fme) - Co-lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to