summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2002-11-14 13:33:37 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2002-11-14 13:33:37 +0000
commita491dc898d1e29ce8cd7b3cc23bcb4aca65b9e3e (patch)
treee6691ab672198f4fbf1d8f3f4e439dd085bc9a09 /sfx2
parent2b800085dc7be4984e216816a7001fb1fceb3478 (diff)
#100000#: merge CWS fwkpilot to top
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/objcont.cxx10
-rw-r--r--sfx2/source/doc/objmisc.cxx18
-rw-r--r--sfx2/source/doc/objstor.cxx27
3 files changed, 28 insertions, 27 deletions
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 73d7d53ec9dc..e62c10dafc23 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: objcont.cxx,v $
*
- * $Revision: 1.36 $
+ * $Revision: 1.37 $
*
- * last change: $Author: mba $ $Date: 2002-11-04 09:11:53 $
+ * last change: $Author: hr $ $Date: 2002-11-14 14:30:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -627,7 +627,7 @@ BOOL SfxObjectShell::SaveInfoAndConfig_Impl( SvStorageRef pNewStg )
INetURLObject aURL( aTemplFileName );
DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "Illegal URL !" );
- SvStorageRef aStor = new SvStorage( aURL.GetMainURL() );
+ SvStorageRef aStor = new SvStorage( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
if ( SVSTREAM_OK == aStor->GetError() )
{
GetConfigManager()->StoreConfiguration(aStor);
@@ -696,7 +696,7 @@ BOOL SfxObjectShell::SaveInfoAndConfig_Impl( SvStorageRef pNewStg )
INetURLObject aURL( aTemplFileName );
DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "Illegal URL !" );
- SvStorageRef aStor = new SvStorage( aURL.GetMainURL() );
+ SvStorageRef aStor = new SvStorage( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
if ( SVSTREAM_OK == aStor->GetError() )
{
GetConfigManager()->StoreConfiguration(aStor);
@@ -1751,7 +1751,7 @@ void SfxObjectShell::UpdateFromTemplate_Impl( )
SfxObjectShellLock xTemplDoc = GetFactory().CreateObject( SFX_CREATE_MODE_ORGANIZER );
xTemplDoc->DoInitNew(0);
String aOldBaseURL = INetURLObject::GetBaseURL();
- INetURLObject::SetBaseURL( INetURLObject( aTemplFileName ).GetMainURL() );
+ INetURLObject::SetBaseURL( INetURLObject( aTemplFileName ).GetMainURL( INetURLObject::NO_DECODE ) );
if ( xTemplDoc->LoadFrom(aTemplStor) )
{
// transfer styles from xTemplDoc to this document
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 71b0ee141d2c..daa128859de6 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: objmisc.cxx,v $
*
- * $Revision: 1.27 $
+ * $Revision: 1.28 $
*
- * last change: $Author: mba $ $Date: 2002-11-04 09:11:54 $
+ * last change: $Author: hr $ $Date: 2002-11-14 14:31:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1367,7 +1367,7 @@ void SfxHeaderAttributes_Impl::SetAttribute( const SvKeyValue& rKV )
INetURLObject aObj;
pDoc->GetMedium()->GetURLObject().GetNewAbsURL(
aURL.Copy( 4 ), &aObj );
- rInfo.SetReloadURL( aObj.GetMainURL() );
+ rInfo.SetReloadURL( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
}
rInfo.EnableReload( sal_True );
rInfo.SetReloadDelay( nTime );
@@ -1458,7 +1458,7 @@ sal_Bool SfxObjectShell::IsSecure()
// bei neuen Dokumenten das Template als Referer nehmen
String aTempl( GetDocInfo().GetTemplateFileName() );
if ( aTempl.Len() )
- aReferer = INetURLObject( aTempl ).GetMainURL();
+ aReferer = INetURLObject( aTempl ).GetMainURL( INetURLObject::NO_DECODE );
}
INetURLObject aURL( "macro:" );
@@ -1474,12 +1474,12 @@ sal_Bool SfxObjectShell::IsSecure()
if( aOpt.GetBasicMode() == eNEVER_EXECUTE )
return sal_False;
- if ( aOpt.IsSecureURL( aURL.GetMainURL(), aReferer ) )
- //if ( SvtSecurityOptions().IsSecureURL( aURL.GetMainURL(), aReferer ) )
+ if ( aOpt.IsSecureURL( aURL.GetMainURL( INetURLObject::NO_DECODE ), aReferer ) )
+ //if ( SvtSecurityOptions().IsSecureURL( aURL.GetMainURL( INetURLObject::NO_DECODE ), aReferer ) )
{
if ( GetMedium()->GetContent().is() )
{
- Any aAny( ::utl::UCBContentHelper::GetProperty( aURL.GetMainURL(), String( RTL_CONSTASCII_USTRINGPARAM("IsProtected")) ) );
+ Any aAny( ::utl::UCBContentHelper::GetProperty( aURL.GetMainURL( INetURLObject::NO_DECODE ), String( RTL_CONSTASCII_USTRINGPARAM("IsProtected")) ) );
sal_Bool bIsProtected = FALSE;
if ( ( aAny >>= bIsProtected ) && bIsProtected )
return sal_False;
@@ -1588,11 +1588,11 @@ void SfxObjectShell::AdjustMacroMode( const String& rScriptType )
// for documents made from a template: get the name of the template
String aTempl( GetDocInfo().GetTemplateFileName() );
if ( aTempl.Len() )
- aReferer = INetURLObject( aTempl ).GetMainURL();
+ aReferer = INetURLObject( aTempl ).GetMainURL( INetURLObject::NO_DECODE );
}
// no referer means OLE object or new document not from template
- sal_Bool bIsSecureByList = !aReferer.Len() || aOpt.IsSecureURL( aURL.GetMainURL(), aReferer );
+ sal_Bool bIsSecureByList = !aReferer.Len() || aOpt.IsSecureURL( aURL.GetMainURL( INetURLObject::NO_DECODE ), aReferer );
sal_Bool bSecure = pImp->nMacroMode == eALWAYS_EXECUTE || bIsSecureByList;
//sal_Bool bSecure = pImp->nMacroMode == MacroExecMode::ALWAYS_EXECUTE || IsSecure();
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 111b7ca44d2b..416a6b63b3f0 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: objstor.cxx,v $
*
- * $Revision: 1.110 $
+ * $Revision: 1.111 $
*
- * last change: $Author: mba $ $Date: 2002-11-04 09:11:55 $
+ * last change: $Author: hr $ $Date: 2002-11-14 14:33:37 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1155,21 +1155,21 @@ sal_Bool SfxObjectShell::SaveTo_Impl
// SetModified must be enabled when SaveCompleted is called, otherwise the modified flag of child objects will not be cleared
EnableSetModified( sal_True );
+ sal_Bool bCopyTo = sal_False;
+ SfxItemSet *pMedSet = rMedium.GetItemSet();
+ if( pMedSet )
+ {
+ SFX_ITEMSET_ARG( pMedSet, pSaveToItem, SfxBoolItem, SID_SAVETO, sal_False );
+ bCopyTo = GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ||
+ pSaveToItem && pSaveToItem->GetValue();
+ }
+
if( bOk )
{
// remember new object storage, if it is a temporary one, because we will need it for a "SaveCompleted" later
SvStorageRef xNewTempRef;
if ( bOk && bPrepareForDirectAccess )
{
- sal_Bool bCopyTo = sal_False;
- SfxItemSet *pSet = rMedium.GetItemSet();
- if( pSet )
- {
- SFX_ITEMSET_ARG( pSet, pSaveToItem, SfxBoolItem, SID_SAVETO, sal_False );
- bCopyTo = GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ||
- pSaveToItem && pSaveToItem->GetValue();
- }
-
// if the target medium is an alien format and the "old" medium was an own format, the object storage
// must be exchanged, because now we need a new temporary storage as object storage
BOOL bNeedsStorage = !bCopyTo && IsOwnStorageFormat_Impl(*pMedium) && !IsOwnStorageFormat_Impl(rMedium);
@@ -1226,7 +1226,7 @@ sal_Bool SfxObjectShell::SaveTo_Impl
{
DBG_ASSERT( pFilter, "No filter after successful save?!" );
if( pFilter )
- if( pFilter->IsAlienFormat() )
+ if( !bCopyTo && pFilter->IsAlienFormat() )
// set flag, that the user will be warned for possible data loss on closing this document
pImp->bDidDangerousSave=sal_True;
else
@@ -1992,6 +1992,7 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl
pMergedParams->ClearItem( SID_DOCINFO_TITLE );
pMergedParams->ClearItem( SID_INPUTSTREAM );
+ pMergedParams->ClearItem( SID_CONTENT );
// "SaveAs" will never store any version information - it's a complete new file !
pMergedParams->ClearItem( SID_VERSION );
@@ -2229,7 +2230,7 @@ sal_Bool SfxObjectShell::SaveAsOwnFormat( SfxMedium& rMedium )
INetURLObject aURL( aTemplFileName );
DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "Illegal URL !" );
- SvStorageRef aStor = new SvStorage( aURL.GetMainURL() );
+ SvStorageRef aStor = new SvStorage( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
if ( SVSTREAM_OK == aStor->GetError() )
{
GetConfigManager()->StoreConfiguration(aStor);