diff options
-rwxr-xr-x | officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu | 7 | ||||
-rw-r--r-- | officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu | 10 | ||||
-rw-r--r-- | sfx2/inc/sfx2/mgetempl.hxx | 5 | ||||
-rw-r--r-- | sfx2/inc/sfx2/sfxsids.hrc | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/mailmodel.cxx | 139 | ||||
-rw-r--r-- | sfx2/source/dialog/mgetempl.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/dialog/mgetempl.hrc | 1 | ||||
-rw-r--r-- | sfx2/source/dialog/mgetempl.src | 8 | ||||
-rw-r--r-- | shell/source/win32/simplemail/senddoc.cxx | 2 | ||||
-rw-r--r-- | svx/sdi/svx.sdi | 28 |
10 files changed, 177 insertions, 37 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index 2efbaaa703..a2c4898351 100755 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -5197,7 +5197,12 @@ <value xml:lang="en-US">Delete All Comments by This Author</value> </prop> </node> - <node oor:name=".uno:DeleteNote" oor:op="replace"> + <node oor:name=".uno:ReplyComment" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Reply Comment</value> + </prop> + </node> + <node oor:name=".uno:DeleteComment" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Delete Comment</value> </prop> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu index 4fa236666b..465c6b37c0 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu @@ -166,6 +166,16 @@ <value xml:lang="en-US">~Protect Records...</value> </prop> </node> + <node oor:name=".uno:RejectTracedChange" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Reject Change</value> + </prop> + </node> + <node oor:name=".uno:AcceptTracedChange" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="en-US">Accept Change</value> + </prop> + </node> <node oor:name=".uno:UpdateAllLinks" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Links</value> diff --git a/sfx2/inc/sfx2/mgetempl.hxx b/sfx2/inc/sfx2/mgetempl.hxx index 8180a69766..1c775f5a4a 100644 --- a/sfx2/inc/sfx2/mgetempl.hxx +++ b/sfx2/inc/sfx2/mgetempl.hxx @@ -37,6 +37,9 @@ #include <sfx2/tabdlg.hxx> +#include <svtools/svmedit2.hxx> +#include <svtools/svmedit.hxx> + /* erwartet: SID_TEMPLATE_NAME : In: StringItem, Name der Vorlage SID_TEMPLATE_FAMILY : In: Familie der Vorlage @@ -54,6 +57,8 @@ class SfxManageStyleSheetPage : public SfxTabPage { FixedText aNameFt; Edit aNameEd; + ExtMultiLineEdit aNameMLE; + CheckBox aAutoCB; FixedText aFollowFt; diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc index 2a4b77b3d1..5df84ee4ab 100644 --- a/sfx2/inc/sfx2/sfxsids.hrc +++ b/sfx2/inc/sfx2/sfxsids.hrc @@ -93,6 +93,8 @@ #define SID_MAIL_PRIORITY (SID_SFX_START + 337) #define SID_MAIL_ATTACH_FILE (SID_SFX_START + 375) +#define SID_MAIL_PREPAREEXPORT (SID_SFX_START + 385) +#define SID_MAIL_NEEDS_PREPAREEXPORT (SID_SFX_START + 386) #define SID_MAIL_EXPORT_FINISHED (SID_SFX_START + 388) #define SID_WEBHTML (SID_SFX_START + 393) diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx index cea40e602d..dbc196c311 100644 --- a/sfx2/source/dialog/mailmodel.cxx +++ b/sfx2/source/dialog/mailmodel.cxx @@ -53,13 +53,11 @@ #include <com/sun/star/security/XDocumentDigitalSignatures.hpp> #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/frame/XDispatch.hpp> +#include <com/sun/star/frame/XStatusListener.hpp> #include <com/sun/star/ucb/InsertCommandArgument.hpp> #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> #include <com/sun/star/document/XExporter.hpp> -#ifndef _RTL_TEXTENC_H -#include <rtl/textench.h> -#endif #include <rtl/uri.h> #include <rtl/uri.hxx> #include <rtl/ustrbuf.hxx> @@ -84,6 +82,7 @@ #include <comphelper/mediadescriptor.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <vcl/svapp.hxx> +#include <cppuhelper/implbase1.hxx> // -------------------------------------------------------------- using namespace ::com::sun::star; @@ -98,6 +97,54 @@ using namespace ::com::sun::star::system; using namespace ::rtl; namespace css = ::com::sun::star; +// - class PrepareListener_Impl ------------------------------------------ +class PrepareListener_Impl : public ::cppu::WeakImplHelper1< css::frame::XStatusListener > +{ + bool m_bState; +public: + PrepareListener_Impl(); + virtual ~PrepareListener_Impl(); + + // css.frame.XStatusListener + virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent& aEvent) + throw(css::uno::RuntimeException); + + // css.lang.XEventListener + virtual void SAL_CALL disposing(const css::lang::EventObject& aEvent) + throw(css::uno::RuntimeException); + + bool IsSet() const {return m_bState;} +}; + +/*-- 25.08.2010 14:32:49--------------------------------------------------- + + -----------------------------------------------------------------------*/ +PrepareListener_Impl::PrepareListener_Impl() : + m_bState( false ) +{ +} +/*-- 25.08.2010 14:32:51--------------------------------------------------- + + -----------------------------------------------------------------------*/ +PrepareListener_Impl::~PrepareListener_Impl() +{ +} +/*-- 25.08.2010 14:32:51--------------------------------------------------- + + -----------------------------------------------------------------------*/ +void PrepareListener_Impl::statusChanged(const css::frame::FeatureStateEvent& rEvent) throw(css::uno::RuntimeException) +{ + if( rEvent.IsEnabled ) + rEvent.State >>= m_bState; + else + m_bState = sal_False; +} +/*-- 25.08.2010 14:32:52--------------------------------------------------- + + -----------------------------------------------------------------------*/ +void PrepareListener_Impl::disposing(const css::lang::EventObject& /*rEvent*/) throw(css::uno::RuntimeException) +{ +} // class AddressList_Impl ------------------------------------------------ @@ -547,46 +594,68 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( aArgs[nNumArgs-1].Value = css::uno::makeAny( aPassword ); } - if ( bModified || !bHasLocation || bStoreTo ) + bool bNeedsPreparation = false; + css::util::URL aPrepareURL; + css::uno::Reference< css::frame::XDispatch > xPrepareDispatch; + css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( xFrame, css::uno::UNO_QUERY ); + css::uno::Reference< css::util::XURLTransformer > xURLTransformer( + xSMGR->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), + css::uno::UNO_QUERY ); + if( !bSendAsPDF ) { - // Document is modified, is newly created or should be stored in a special format try { - css::uno::Reference< css::util::XURLTransformer > xURLTransformer( - xSMGR->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.URLTransformer" ))), - css::uno::UNO_QUERY ); + // check if the document needs to be prepared for sending as mail (embedding of links, removal of invisible content) - css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( xFrame, css::uno::UNO_QUERY ); - css::uno::Reference< css::frame::XDispatch > xDispatch; - - css::util::URL aURL; - css::uno::Sequence< css::beans::PropertyValue > aDispatchArgs; + if ( xURLTransformer.is() ) + { + aPrepareURL.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrepareMailExport" )); + xURLTransformer->parseStrict( aPrepareURL ); + } - if( !bSendAsPDF ) + if ( xDispatchProvider.is() ) { - if ( xURLTransformer.is() ) + xPrepareDispatch = css::uno::Reference< css::frame::XDispatch >( + xDispatchProvider->queryDispatch( aPrepareURL, ::rtl::OUString(), 0 )); + if ( xPrepareDispatch.is() ) { - aURL.Complete = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:PrepareMailExport" )); - xURLTransformer->parseStrict( aURL ); + PrepareListener_Impl* pPrepareListener; + uno::Reference< css::frame::XStatusListener > xStatusListener = pPrepareListener = new PrepareListener_Impl; + xPrepareDispatch->addStatusListener( xStatusListener, aPrepareURL ); + bNeedsPreparation = pPrepareListener->IsSet(); + xPrepareDispatch->removeStatusListener( xStatusListener, aPrepareURL ); } - - if ( xDispatchProvider.is() ) + } + } + catch ( css::uno::RuntimeException& ) + { + throw; + } + catch ( css::uno::Exception& ) + { + } + } + + if ( bModified || !bHasLocation || bStoreTo || bNeedsPreparation ) + { + // Document is modified, is newly created or should be stored in a special format + try + { + if( bNeedsPreparation && xPrepareDispatch.is() ) + { + if ( xPrepareDispatch.is() ) { - xDispatch = css::uno::Reference< css::frame::XDispatch >( - xDispatchProvider->queryDispatch( aURL, ::rtl::OUString(), 0 )); - if ( xDispatch.is() ) + try + { + css::uno::Sequence< css::beans::PropertyValue > aDispatchArgs; + xPrepareDispatch->dispatch( aPrepareURL, aDispatchArgs ); + } + catch ( css::uno::RuntimeException& ) + { + throw; + } + catch ( css::uno::Exception& ) { - try - { - xDispatch->dispatch( aURL, aDispatchArgs ); - } - catch ( css::uno::RuntimeException& ) - { - throw; - } - catch ( css::uno::Exception& ) - { - } } } } @@ -608,6 +677,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( if( !bSendAsPDF ) { + css::util::URL aURL; // #i30432# notify that export is finished - the Writer may want to restore removed content if ( xURLTransformer.is() ) { @@ -617,12 +687,13 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat( if ( xDispatchProvider.is() ) { - xDispatch = css::uno::Reference< css::frame::XDispatch >( + css::uno::Reference< css::frame::XDispatch > xDispatch = css::uno::Reference< css::frame::XDispatch >( xDispatchProvider->queryDispatch( aURL, ::rtl::OUString(), 0 )); if ( xDispatch.is() ) { try { + css::uno::Sequence< css::beans::PropertyValue > aDispatchArgs; xDispatch->dispatch( aURL, aDispatchArgs ); } catch ( css::uno::RuntimeException& ) diff --git a/sfx2/source/dialog/mgetempl.cxx b/sfx2/source/dialog/mgetempl.cxx index 85ead19fec..a35f9c1d14 100644 --- a/sfx2/source/dialog/mgetempl.cxx +++ b/sfx2/source/dialog/mgetempl.cxx @@ -65,6 +65,7 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem aNameFt ( this, SfxResId( FT_NAME ) ), aNameEd ( this, SfxResId( ED_NAME ) ), + aNameMLE ( this, SfxResId( MLE_NAME ) ), aAutoCB ( this, SfxResId( CB_AUTO ) ), aFollowFt ( this, SfxResId( FT_NEXT ) ), @@ -147,8 +148,17 @@ SfxManageStyleSheetPage::SfxManageStyleSheetPage( Window* pParent, const SfxItem } aNameEd.SetText(pStyle->GetName()); - if ( !pStyle->IsUserDefined() ) + // Set the field read-only if it is NOT an user-defined style + // but allow selecting and copying + if ( !pStyle->IsUserDefined() ) { aNameEd.SetReadOnly(); + aNameEd.Hide(); + + aNameMLE.SetControlBackground( GetSettings().GetStyleSettings().GetDialogColor() ); + aNameMLE.SetText( pStyle->GetName() ); + aNameMLE.EnableCursor( FALSE ); + aNameMLE.Show(); + } if ( pStyle->HasFollowSupport() && pPool ) { diff --git a/sfx2/source/dialog/mgetempl.hrc b/sfx2/source/dialog/mgetempl.hrc index 950b748a88..cb07f9436b 100644 --- a/sfx2/source/dialog/mgetempl.hrc +++ b/sfx2/source/dialog/mgetempl.hrc @@ -25,6 +25,7 @@ * ************************************************************************/ #define ED_NAME 2 +#define MLE_NAME 13 #define LB_NEXT 4 #define FT_BASE 5 #define LB_BASE 6 diff --git a/sfx2/source/dialog/mgetempl.src b/sfx2/source/dialog/mgetempl.src index be60b35f7d..4f26356a00 100644 --- a/sfx2/source/dialog/mgetempl.src +++ b/sfx2/source/dialog/mgetempl.src @@ -49,6 +49,14 @@ TabPage TP_MANAGE_STYLES Pos = MAP_APPFONT ( 70 , 6 ) ; Size = MAP_APPFONT ( 184 , 12 ) ; }; + MultiLineEdit MLE_NAME + { + Pos = MAP_APPFONT ( 70 , 8 ) ; + Size = MAP_APPFONT ( 80 , 12 ) ; + Border = FALSE; + ReadOnly = TRUE; + Hide = TRUE; + }; CheckBox CB_AUTO { HelpID = "sfx2:CheckBox:TP_MANAGE_STYLES:CB_AUTO"; diff --git a/shell/source/win32/simplemail/senddoc.cxx b/shell/source/win32/simplemail/senddoc.cxx index 42f5b9e244..b904902ee4 100644 --- a/shell/source/win32/simplemail/senddoc.cxx +++ b/shell/source/win32/simplemail/senddoc.cxx @@ -170,7 +170,7 @@ void initMapiMessage( pMapiMessage->lpszSubject = const_cast<char*>(gSubject.c_str()); pMapiMessage->lpszNoteText = (gBody.length() ? const_cast<char*>(gBody.c_str()) : NULL); pMapiMessage->lpOriginator = aMapiOriginator; - pMapiMessage->lpRecips = &aMapiRecipientList[0]; + pMapiMessage->lpRecips = aMapiRecipientList.size() ? &aMapiRecipientList[0] : 0; pMapiMessage->nRecipCount = aMapiRecipientList.size(); pMapiMessage->lpFiles = &aMapiAttachmentList[0]; pMapiMessage->nFileCount = aMapiAttachmentList.size(); diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index 74d965b4dc..cd23586cc6 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -15108,3 +15108,31 @@ SfxVoidItem InsertRowDialog SID_TABLE_INSERT_ROW_DLG ToolBoxConfig = FALSE, GroupId = GID_TABLE; ] +//-------------------------------------------------------------------------- +SfxVoidItem PrepareMailExport SID_MAIL_PREPAREEXPORT +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = FALSE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* status: */ + SlotType = SfxBoolItem + + /* config: */ + AccelConfig = FALSE, + MenuConfig = FALSE, + StatusBarConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = GID_EXPLORER; +] + |