summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2005-07-12 12:38:22 +0000
committerKurt Zenker <kz@openoffice.org>2005-07-12 12:38:22 +0000
commit0c676c601db6321e8dff668bb2f6792573a3fdba (patch)
tree9ebee8d21aa3dec383d915b4c3ed827e5196131b /svx
parenta34adb9e956c89a317a06a86948e05622ec4a87a (diff)
INTEGRATION: CWS sj21 (1.34.352); FILE MERGED
2005/06/24 13:53:53 sj 1.34.352.1: #i50423# fixed crash if inserting customshapes (ReadOnly of the gallery theme may not been set though the file can't be written (because of security reasons))
Diffstat (limited to 'svx')
-rw-r--r--svx/source/gallery2/galtheme.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 04d066ba1eb6..a796a15f24d9 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: galtheme.cxx,v $
*
- * $Revision: 1.34 $
+ * $Revision: 1.35 $
*
- * last change: $Author: rt $ $Date: 2005-01-11 13:00:56 $
+ * last change: $Author: kz $ $Date: 2005-07-12 13:38:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -143,7 +143,12 @@ GalleryTheme::~GalleryTheme()
void GalleryTheme::ImplCreateSvDrawStorage()
{
if( !pThm->IsImported() )
+ {
aSvDrawStorageRef = new SvStorage( FALSE, GetSdvURL().GetMainURL( INetURLObject::NO_DECODE ), pThm->IsReadOnly() ? STREAM_READ : STREAM_STD_READWRITE );
+ // #i50423# ReadOnly may not been set though the file can't be written (because of security reasons)
+ if ( ( aSvDrawStorageRef->GetError() != ERRCODE_NONE ) && !pThm->IsReadOnly() )
+ aSvDrawStorageRef = new SvStorage( FALSE, GetSdvURL().GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ );
+ }
else
aSvDrawStorageRef.Clear();
}