summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-07-25 10:44:08 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-07-25 15:02:34 -0400
commit3faf775c4808a552f00f7ae61544b61340bcc8de (patch)
treea8b61a9a2755059c9d61e3898068621db0e13f7c
parented4ee6af8d1aee073b345099bb0f238fea63d996 (diff)
Move bRemote to Impl. BTW this never was properly initialized.
Change-Id: I3e94c0f567b1ccaf07c46c9cbcca7ba6fea1671d
-rw-r--r--sfx2/inc/sfx2/docfile.hxx1
-rw-r--r--sfx2/source/doc/docfile.cxx13
2 files changed, 8 insertions, 6 deletions
diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx
index eec96fd8d697..577226dc2b58 100644
--- a/sfx2/inc/sfx2/docfile.hxx
+++ b/sfx2/inc/sfx2/docfile.hxx
@@ -69,7 +69,6 @@ class DateTime;
class SFX2_DLLPUBLIC SfxMedium : public SvRefBase
{
sal_uInt32 eError;
- bool bRemote:1;
StreamMode nStorOpenMode;
INetURLObject* pURLObj;
rtl::OUString aName;
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index c6517ac06614..4139bf05a76d 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -262,6 +262,7 @@ public:
bool m_bOriginallyReadOnly:1;
bool m_bRoot:1;
bool m_bTriedStorage:1;
+ bool m_bRemote:1;
uno::Reference < embed::XStorage > xStorage;
@@ -330,6 +331,7 @@ SfxMedium_Impl::SfxMedium_Impl( SfxMedium* pAntiImplP )
m_bOriginallyReadOnly(false),
m_bRoot(false),
m_bTriedStorage(false),
+ m_bRemote(false),
pAntiImpl( pAntiImplP ),
nFileVersion( 0 ),
pOrigFilter( 0 ),
@@ -534,7 +536,7 @@ Reference < XContent > SfxMedium::GetContent() const
{
SvtSaveOptions aOpt;
bool bIsRemote = IsRemote();
- if( (bIsRemote && !aOpt.IsSaveRelINet()) || (!bRemote && !aOpt.IsSaveRelFSys()) )
+ if( (bIsRemote && !aOpt.IsSaveRelINet()) || (!pImp->m_bRemote && !aOpt.IsSaveRelFSys()) )
return ::rtl::OUString();
}
@@ -2356,7 +2358,7 @@ void SfxMedium::GetMedium_Impl()
//----------------------------------------------------------------
sal_Bool SfxMedium::IsRemote()
{
- return bRemote;
+ return pImp->m_bRemote;
}
//------------------------------------------------------------------
@@ -2724,15 +2726,16 @@ void SfxMedium::SetIsRemote_Impl()
case INET_PROT_NEWS:
case INET_PROT_IMAP:
case INET_PROT_VIM:
- bRemote = true; break;
+ pImp->m_bRemote = true;
+ break;
default:
- bRemote = GetName().compareToAscii("private:msgid", 13) == 0;
+ pImp->m_bRemote = GetName().compareToAscii("private:msgid", 13) == 0;
break;
}
// As files that are written to the remote transmission must also be able
// to be read.
- if( bRemote )
+ if (pImp->m_bRemote)
nStorOpenMode |= STREAM_READ;
}