Hi Frank,
Thanks for responding.
I've tried:
USHORT nWhich = GetWhich( SID_ATTR_FRAMEDIRECTION );
const SvxFrameDirectionItem& rItem = static_cast<const
SvxFrameDirectionItem&>(rCoreAttrs.Get(nWhich));
printf( "Frame Direction State is : %d\n", (rItem.GetValue()));
but the result is the same regardless of the text direction in the
document. Could I tell you my possibly incorrect understanding of the
mechanism used here, and you would be kind enough to correct my errors?
The SfxItemSet passed to the function SvxBorderTabPage::FillItemSet(
SfxItemSet& rCoreAttrs ) contains a set of key/value pairs with document
attributes, with the keys being a subset of the SID_ATTR* as defined in
sfxsids.hrc, minus an offset which changes for various applications.
Their values would be reflected in the settings I would see on the
document's toolbar and in the pages of the Format menu (Character,
Paragraph, etc.). In the border dialog which I am concerned with now,
"GetWhich" subtracts the offset from the SID_ATTR* in order to get the
key as it appears in the SfxItemSet. GetValue gets the attribute value
using this key. Is this understanding incorrect?
Alan
Frank Meies wrote:
Hi Alan,
On 07/22/07 19:42, Alan Yaniger wrote:
I'm working on Issue 72804, which requires me to have access to the
current text direction while I'm in the Table Border dialog
(svx/source/dialog/border.cxx). How do I get the current text
direction from SvxBorderTabPage::FillItemSet? I've tried:
pItem = GetItem( rCoreAttrs, SID_ATTR_FRAMEDIRECTION );
you have to translate SID_ATTR_FRAMEDIRECTION into the Writer's
'which' range:
nWhich = GetWhich( SID_ATTR_FRAMEDIRECTION );
const SvxFrameDirectionItem& rItem = static_cast<bla>(rSet.Get(nWhich));
Hope this helps,
Frank
--
Frank Meies (fme) - 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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]