Hi there,

For the stuff I'm working on at the moment for Calc, I need to know
during the export time whether the document is being exported via either
GUI Save or SaveAs, depending on which I have to do something slightly
different in the exporter code.

I've looked around the sfx2 code, and come to my own conclusion that the
following change is probably the best way to give me what I need.

--- source/doc/objserv.cxx 15 Apr 2008 14:19:51 -0000 1.104
+++ source/doc/objserv.cxx 21 May 2008 02:43:01 -0000
@@ -521,6 +521,11 @@
                case SID_SAVEASDOC:
                case SID_SAVEDOC:
                {
+            SfxItemSet* pSet = GetMedium()->GetItemSet();
+            if (pSet)
+                // Store to the medium whether this action is GUI Save
or SaveAs.
+                pSet->Put( SfxBoolItem(SID_SAVEDOC, (nId ==
SID_SAVEDOC)) );
+
                        //!! detaillierte Auswertung eines Fehlercodes
                        SfxObjectShellRef xLock( this );


With this change, I can retrieve this information from the instance of
SfxMedium that gets passed on to the exporter code.

My question is, is this really the best way to go about this, or is
there a better way to pass this information to the exporter code?

TIA,

Kohei

-- 
Kohei Yoshida - OpenOffice.org Engineer - Novell, Inc.
<[EMAIL PROTECTED]>


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

Reply via email to