summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/guisaveas.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/doc/guisaveas.cxx')
-rw-r--r--sfx2/source/doc/guisaveas.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 2ccf5fa7a849..1df7d2b01920 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -670,6 +670,10 @@ sal_Int8 ModelData_Impl::CheckSaveAcceptable( sal_Int8 nCurStatus )
//-------------------------------------------------------------------------
sal_Int8 ModelData_Impl::CheckStateForSave()
{
+ // if the document is readonly or a new one a SaveAs operation must be used
+ if ( !GetStorable()->hasLocation() || GetStorable()->isReadonly() )
+ return STATUS_SAVEAS;
+
// check acceptable entries for media descriptor
sal_Bool bVersInfoNeedsStore = sal_False;
::comphelper::SequenceAsHashMap aAcceptedArgs;
@@ -701,10 +705,6 @@ sal_Int8 ModelData_Impl::CheckStateForSave()
if ( !GetModifiable()->isModified() && !bVersInfoNeedsStore )
return STATUS_NO_ACTION;
- // if the document is readonly or a new one a SaveAs operation must be used
- if ( !GetStorable()->hasLocation() || GetStorable()->isReadonly() )
- return STATUS_SAVEAS;
-
// check that the old filter is acceptable
::rtl::OUString aOldFilterName = GetDocProps().getUnpackedValueOrDefault(
aFilterNameString,