From b0e177a0328fe46a08e0da9b4b468466c5bf4ba1 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Tue, 27 Apr 2010 12:34:19 +0200 Subject: [PATCH 1/2] fs33a: #111181# ImplSign: proper check whether the doc can be signed (only bail out if the document is no new) --- sfx2/source/doc/objserv.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index c063546da1c7..e06773f7f178 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -1337,8 +1337,13 @@ sal_uInt16 SfxObjectShell::ImplGetSignatureState( sal_Bool bScriptingContent ) void SfxObjectShell::ImplSign( sal_Bool bScriptingContent ) { // Check if it is stored in OASIS format... - if ( GetMedium() && GetMedium()->GetFilter() - && ( !GetMedium()->GetFilter()->IsOwnFormat() || !GetMedium()->HasStorage_Impl() ) ) + if ( GetMedium() + && GetMedium()->GetFilter() + && GetMedium()->GetName().Len() + && ( !GetMedium()->GetFilter()->IsOwnFormat() + || !GetMedium()->HasStorage_Impl() + ) + ) { // Only OASIS and OOo6.x formats will be handled further InfoBox( NULL, SfxResId( RID_XMLSEC_INFO_WRONGDOCFORMAT ) ).Execute(); From 081f3c9e3fd4e3491994028e6b5eb19ff3ed7018 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Wed, 25 Aug 2010 13:29:38 +0200 Subject: [PATCH 2/2] fs33a: when all panels claim to be invisible, make the first one visible --- sfx2/source/dialog/taskpane.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx index f25485a1401c..5d763f81744d 100644 --- a/sfx2/source/dialog/taskpane.cxx +++ b/sfx2/source/dialog/taskpane.cxx @@ -584,6 +584,7 @@ namespace sfx2 return; ::rtl::OUString sFirstVisiblePanelResource; + ::rtl::OUString sFirstPanelResource; const Sequence< ::rtl::OUString > aUIElements( aWindowStateConfig.getNodeNames() ); for ( const ::rtl::OUString* resource = aUIElements.getConstArray(); @@ -594,6 +595,8 @@ namespace sfx2 if ( !impl_isToolPanelResource( *resource ) ) continue; + sFirstPanelResource = *resource; + ::utl::OConfigurationNode aResourceNode( aWindowStateConfig.openNode( *resource ) ); ::svt::PToolPanel pCustomPanel( new CustomToolPanel( aResourceNode, m_xFrame ) ); @@ -620,6 +623,9 @@ namespace sfx2 sFirstVisiblePanelResource = *resource; } + if ( sFirstVisiblePanelResource.getLength() == 0 ) + sFirstVisiblePanelResource = sFirstPanelResource; + if ( sFirstVisiblePanelResource.getLength() ) { ::boost::optional< size_t > aPanelPos( GetPanelPos( sFirstVisiblePanelResource ) );