summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editeng/source/xml/xmltxtexp.cxx1
-rw-r--r--editeng/source/xml/xmltxtimp.cxx1
-rw-r--r--include/sfx2/docfile.hxx18
-rw-r--r--sfx2/source/doc/docfile.cxx7
-rw-r--r--svx/source/xml/xmlxtexp.cxx1
5 files changed, 11 insertions, 17 deletions
diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx
index a0136a6d4e1a..b59b3cf50963 100644
--- a/editeng/source/xml/xmltxtexp.cxx
+++ b/editeng/source/xml/xmltxtexp.cxx
@@ -419,7 +419,6 @@ void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection&
/* testcode
const OUString aURL( "file:///e:/test.xml" );
SfxMedium aMedium( aURL, STREAM_WRITE | STREAM_TRUNC, sal_True );
- aMedium.IsRemote();
uno::Reference<io::XOutputStream> xOut( new utl::OOutputStreamWrapper( *aMedium.GetOutStream() ) );
*/
diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx
index d15a53fd51d8..fe10d8f8c157 100644
--- a/editeng/source/xml/xmltxtimp.cxx
+++ b/editeng/source/xml/xmltxtimp.cxx
@@ -169,7 +169,6 @@ void SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& r
/* testcode
const OUString aURL( "file:///e:/test.xml" );
SfxMedium aMedium( aURL, STREAM_READ | STREAM_NOCREATE, sal_True );
- aMedium.IsRemote();
uno::Reference<io::XOutputStream> xOut( new utl::OOutputStreamWrapper( *aMedium.GetOutStream() ) );
aMedium.GetInStream()->Seek( 0 );
diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx
index 7d8f1ba4186f..ff3a91938bf9 100644
--- a/include/sfx2/docfile.hxx
+++ b/include/sfx2/docfile.hxx
@@ -127,13 +127,13 @@ public:
const INetURLObject& GetURLObject() const;
void CheckFileDate( const css::util::DateTime& aInitDate );
- bool DocNeedsFileDateCheck();
+ SAL_WARN_UNUSED_RESULT bool DocNeedsFileDateCheck() const;
css::util::DateTime GetInitFileDate( bool bIgnoreOldValue );
css::uno::Reference< css::ucb::XContent > GetContent() const;
const OUString& GetPhysicalName() const;
- bool IsRemote() const;
- bool IsOpen() const; // { return aStorage.Is() || pInStream; }
+ SAL_WARN_UNUSED_RESULT bool IsRemote() const;
+ SAL_WARN_UNUSED_RESULT bool IsOpen() const; // { return aStorage.Is() || pInStream; }
void Download( const Link& aLink = Link());
void SetDoneLink( const Link& rLink );
@@ -167,21 +167,21 @@ public:
css::uno::Reference< css::embed::XStorage > GetStorage( bool bCreateTempIfNo = true );
css::uno::Reference< css::embed::XStorage > GetOutputStorage();
void ResetError();
- bool UsesCache() const;
+ SAL_WARN_UNUSED_RESULT bool UsesCache() const;
void SetUsesCache( bool );
- bool IsExpired() const;
+ SAL_WARN_UNUSED_RESULT bool IsExpired() const;
void SetName( const OUString& rName, bool bSetOrigURL = false );
- bool IsAllowedForExternalBrowser() const;
- long GetFileVersion() const;
+ SAL_WARN_UNUSED_RESULT bool IsAllowedForExternalBrowser() const;
+ SAL_WARN_UNUSED_RESULT long GetFileVersion() const;
const css::uno::Sequence < css::util::RevisionTag >&
GetVersionList( bool _bNoReload = false );
- bool IsReadOnly();
+ SAL_WARN_UNUSED_RESULT bool IsReadOnly() const;
// Whether the medium had originally been opened r/o, independent of later
// changes via SetOpenMode; used to keep track of the "true" state of the
// medium across toggles via SID_EDITDOC (which do change SetOpenMode):
- bool IsOriginallyReadOnly() const;
+ SAL_WARN_UNUSED_RESULT bool IsOriginallyReadOnly() const;
css::uno::Reference< css::io::XInputStream > GetInputStream();
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 54bb317816ba..d1909252fabd 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -380,13 +380,11 @@ void SfxMedium::CheckFileDate( const util::DateTime& aInitDate )
}
}
-
-bool SfxMedium::DocNeedsFileDateCheck()
+bool SfxMedium::DocNeedsFileDateCheck() const
{
return ( !IsReadOnly() && ::utl::LocalFileHelper::IsLocalFile( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ) );
}
-
util::DateTime SfxMedium::GetInitFileDate( bool bIgnoreOldValue )
{
if ( ( bIgnoreOldValue || !pImp->m_bGotDateTime ) && !pImp->m_aLogicName.isEmpty() )
@@ -3172,8 +3170,7 @@ bool SfxMedium::SaveVersionList_Impl( bool /*bUseXML*/ )
return false;
}
-
-bool SfxMedium::IsReadOnly()
+bool SfxMedium::IsReadOnly() const
{
// a) ReadOnly filter can't produce read/write contents!
bool bReadOnly = (
diff --git a/svx/source/xml/xmlxtexp.cxx b/svx/source/xml/xmlxtexp.cxx
index 475cb2cd9f44..3c5bb5c836cd 100644
--- a/svx/source/xml/xmlxtexp.cxx
+++ b/svx/source/xml/xmlxtexp.cxx
@@ -246,7 +246,6 @@ bool SvxXMLXTableExportComponent::save(
else
{
pMedium = new SfxMedium( rURL, STREAM_WRITE | STREAM_TRUNC );
- pMedium->IsRemote();
SvStream* pStream = pMedium->GetOutStream();
if( !pStream )