Hi Max,
On 09/04/08 19:23, Maximilian Odendahl wrote:
trying to find out if the hidden attribute is set on a note:
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;
But the pTxtAttr is not valid, what am I doing wrong here?
(btw, pTxtNode->HasHiddenCharAttribute(false); returns true)
Well, HasHiddenCharAttribute returns true, because there is a
RES_CHRATR_HIDDEN attribute set *somewhere* in this paragraph. But not
necessarily at position rPos.nContent.GetIndex(). Why not use
ScriptInfo::IsInHiddenRange()?
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]