summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorThorsten Behrens <tbehrens@novell.com>2011-04-28 00:12:58 +0200
committerThorsten Behrens <tbehrens@novell.com>2011-04-28 00:12:58 +0200
commitf51c3f66b1034c9f15171678d1239c25d64341ba (patch)
tree438eb4b3d4da31d276dcb227da6afce76e165f00 /svx
parentb8502c8251b0760f1bf03c968974f1fe3f288ae2 (diff)
parent86e7ed8c72184b7a04b836848743979aa3f5fd3d (diff)
Merge commit 'ooo/DEV300_m106' into integration/dev300_m106
Conflicts: avmedia/source/gstreamer/gstframegrabber.cxx avmedia/source/gstreamer/gstplayer.cxx avmedia/source/gstreamer/gstplayer.hxx basic/inc/basic/sbxdef.hxx basic/source/classes/sbxmod.cxx basic/source/comp/makefile.mk basic/source/comp/sbcomp.cxx basic/source/inc/namecont.hxx basic/source/inc/scriptcont.hxx basic/source/runtime/methods.cxx basic/source/runtime/runtime.cxx basic/source/runtime/stdobj.cxx basic/source/runtime/step1.cxx basic/source/uno/namecont.cxx basic/util/makefile.mk connectivity/source/commontools/predicateinput.cxx connectivity/source/drivers/dbase/DNoException.cxx connectivity/source/drivers/dbase/DTable.cxx connectivity/source/drivers/file/fcomp.cxx connectivity/source/drivers/jdbc/JConnection.cxx connectivity/source/drivers/odbcbase/OResultSet.cxx connectivity/source/drivers/odbcbase/OStatement.cxx connectivity/source/parse/sqlnode.cxx desktop/source/app/app.cxx drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx drawinglayer/source/processor2d/vclprocessor2d.cxx formula/inc/formula/token.hxx formula/source/core/api/token.cxx fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx fpicker/source/win32/filepicker/platform_vista.h framework/source/helper/persistentwindowstate.cxx framework/source/uielement/menubarmanager.cxx oovbaapi/ooo/vba/XFoundFiles.idl oovbaapi/ooo/vba/excel/XApplication.idl oovbaapi/ooo/vba/msforms/XCheckBox.idl oovbaapi/ooo/vba/msforms/XComboBox.idl oovbaapi/ooo/vba/msforms/XControl.idl oovbaapi/ooo/vba/msforms/XGroupBox.idl oovbaapi/ooo/vba/msforms/XLabel.idl oovbaapi/ooo/vba/msforms/XListBox.idl oovbaapi/ooo/vba/msforms/XNewFont.idl oovbaapi/ooo/vba/msforms/XRadioButton.idl oovbaapi/ooo/vba/msforms/XTextBox.idl oovbaapi/ooo/vba/msforms/XToggleButton.idl scripting/source/dlgprov/dlgevtatt.cxx sfx2/source/control/unoctitm.cxx sfx2/source/doc/objstor.cxx sfx2/source/doc/objxtor.cxx svx/inc/svx/svdograf.hxx svx/source/form/fmpage.cxx svx/source/form/fmpgeimp.cxx svx/source/svdraw/svdedtv.cxx svx/source/svdraw/svdfmtf.cxx svx/source/svdraw/svdograf.cxx svx/source/svdraw/svdouno.cxx svx/source/xml/xmlgrhlp.cxx uui/source/iahndl-ssl.cxx vbahelper/Library_msforms.mk vbahelper/Library_vbahelper.mk vbahelper/inc/vbahelper/vbahelper.hxx vbahelper/prj/build.lst vbahelper/source/msforms/vbacombobox.cxx vbahelper/source/msforms/vbacontrol.cxx vbahelper/source/msforms/vbacontrols.cxx vbahelper/source/msforms/vbaframe.cxx vbahelper/source/msforms/vbaframe.hxx vbahelper/source/msforms/vbalabel.cxx vbahelper/source/msforms/vbalabel.hxx vbahelper/source/msforms/vbalistbox.cxx vbahelper/source/msforms/vbalistbox.hxx vbahelper/source/msforms/vbamultipage.cxx vbahelper/source/msforms/vbatogglebutton.cxx vbahelper/source/msforms/vbauserform.cxx vbahelper/source/vbahelper/vbacommandbar.cxx vbahelper/source/vbahelper/vbacommandbarcontrol.cxx vbahelper/source/vbahelper/vbacommandbarcontrols.hxx vbahelper/source/vbahelper/vbahelper.cxx vbahelper/source/vbahelper/vbawindowbase.cxx xmloff/source/meta/xmlmetai.cxx xmloff/source/style/PageMasterExportPropMapper.cxx xmloff/source/style/PageMasterStyleMap.cxx xmloff/source/text/txtexppr.cxx xmloff/source/text/txtprmap.cxx
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/svx/svdograf.hxx2
-rwxr-xr-x[-rw-r--r--]svx/inc/svx/xoutbmp.hxx1
-rw-r--r--svx/source/dialog/_bmpmask.cxx3
-rw-r--r--svx/source/fmcomp/gridctrl.cxx12
-rw-r--r--svx/source/form/fmobj.cxx4
-rw-r--r--svx/source/form/fmpage.cxx3
-rw-r--r--svx/source/form/fmpgeimp.cxx76
-rw-r--r--svx/source/form/fmshell.cxx6
-rw-r--r--svx/source/gallery2/galtheme.cxx1
-rw-r--r--svx/source/inc/fmpgeimp.hxx4
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx3
-rw-r--r--svx/source/svdraw/svdedtv.cxx6
-rw-r--r--svx/source/svdraw/svdfmtf.cxx23
-rw-r--r--svx/source/svdraw/svdfmtf.hxx1
-rw-r--r--svx/source/svdraw/svdograf.cxx23
-rw-r--r--svx/source/svdraw/svdouno.cxx65
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx148
-rw-r--r--svx/source/xml/xmlgrhlp.cxx8
-rwxr-xr-x[-rw-r--r--]svx/source/xoutdev/_xoutbmp.cxx6
19 files changed, 232 insertions, 163 deletions
diff --git a/svx/inc/svx/svdograf.hxx b/svx/inc/svx/svdograf.hxx
index df317d9c4f91..88cf28d7f093 100644
--- a/svx/inc/svx/svdograf.hxx
+++ b/svx/inc/svx/svdograf.hxx
@@ -149,6 +149,8 @@ public:
// Keep ATM for SD.
sal_Bool IsAnimated() const;
sal_Bool IsEPS() const;
+ sal_Bool IsRenderGraphic() const;
+ sal_Bool HasRenderGraphic() const;
sal_Bool IsSwappedOut() const;
const MapMode& GetGrafPrefMapMode() const;
diff --git a/svx/inc/svx/xoutbmp.hxx b/svx/inc/svx/xoutbmp.hxx
index 63e6411961c3..2dd14e8b6b7d 100644..100755
--- a/svx/inc/svx/xoutbmp.hxx
+++ b/svx/inc/svx/xoutbmp.hxx
@@ -44,6 +44,7 @@
#define XOUTBMP_CONTOUR_HORZ 0x00000001L
#define XOUTBMP_CONTOUR_VERT 0x00000002L
#define XOUTBMP_CONTOUR_EDGEDETECT 0x00000004L
+#define XOUTBMP_DONT_ADD_EXTENSION 0x00000008L
#define XOUTBMP_DONT_EXPAND_FILENAME 0x10000000L
#define XOUTBMP_USE_GIF_IF_POSSIBLE 0x20000000L
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 674b9d18491d..aede0a96f5ec 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -1022,6 +1022,9 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf )
default:
{
+ OSL_ENSURE( pAction->GetType() != META_RENDERGRAPHIC_ACTION,
+ "META_RENDERGRAPHIC_ACTION currently not supported at masking" );
+
pAction->Duplicate();
aMtf.AddAction( pAction );
}
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 580fa90f7b1c..3d94a7c25fa1 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -2014,6 +2014,18 @@ void DbGridControl::AdjustRows()
RowRemoved(GetRowCount() - nDelta, nDelta, sal_False);
// es sind Zeilen weggefallen, dann ab der aktuellen Position neu zeichen
Invalidate();
+
+ sal_Int32 nNewPos = AlignSeekCursor();
+ if (m_bSynchDisplay)
+ DbGridControl_Base::GoToRow(nNewPos);
+
+ SetCurrent(nNewPos);
+ // there are rows so go to the selected current column
+ if (nRecordCount)
+ GoToRowColumnId(nNewPos, GetColumnId(GetCurColumnId()));
+ if (!IsResizing() && GetRowCount())
+ RecalcRows(GetTopRow(), GetVisibleRows(), sal_True);
+ m_aBar.InvalidateAll(m_nCurrentPos, sal_True);
}
else // zuwenig
RowInserted(GetRowCount(), -nDelta, sal_True);
diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx
index c86e492251f1..bcd6582c69a0 100644
--- a/svx/source/form/fmobj.cxx
+++ b/svx/source/form/fmobj.cxx
@@ -648,7 +648,9 @@ void FmFormObj::SetUnoControlModel( const Reference< com::sun::star::awt::XContr
{
SdrUnoObj::SetUnoControlModel( _rxModel );
- // TODO: call something like formObjectInserted at the form page, to tell it the new model
+ FmFormPage* pFormPage = PTR_CAST( FmFormPage, GetPage() );
+ if ( pFormPage )
+ pFormPage->GetImpl().formModelAssigned( *this );
impl_checkRefDevice_nothrow( true );
}
diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx
index 86fece89935a..75b27ed6033a 100644
--- a/svx/source/form/fmpage.cxx
+++ b/svx/source/form/fmpage.cxx
@@ -80,9 +80,10 @@ FmFormPage::FmFormPage(FmFormModel& rModel, StarBASIC* _pBasic, bool bMasterPage
//------------------------------------------------------------------
FmFormPage::FmFormPage(const FmFormPage& rPage)
:SdrPage(rPage)
- ,m_pImpl(new FmFormPageImpl( *this, rPage.GetImpl() ) )
+ ,m_pImpl(new FmFormPageImpl( *this ) )
,m_pBasic(0)
{
+ m_pImpl->initFrom( rPage.GetImpl() );
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "svx", "Ocke.Janssen@sun.com", "FmFormPage::FmFormPage" );
m_sPageName = rPage.m_sPageName;
}
diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx
index 1134b3e5f2be..b46c074118ba 100644
--- a/svx/source/form/fmpgeimp.cxx
+++ b/svx/source/form/fmpgeimp.cxx
@@ -168,21 +168,18 @@ namespace
}
//------------------------------------------------------------------------------
-FmFormPageImpl::FmFormPageImpl( FmFormPage& _rPage, const FmFormPageImpl& rImpl )
- :m_rPage( _rPage )
- ,m_bFirstActivation( sal_True )
- ,m_bAttemptedFormCreation( false )
+void FmFormPageImpl::initFrom( FmFormPageImpl& i_foreignImpl )
{
- DBG_CTOR(FmFormPageImpl,NULL);
-
// clone the Forms collection
- Reference< XCloneable > xCloneable( const_cast< FmFormPageImpl& >( rImpl ).getForms( false ), UNO_QUERY );
+ const Reference< XNameContainer > xForeignForms( const_cast< FmFormPageImpl& >( i_foreignImpl ).getForms( false ) );
+ const Reference< XCloneable > xCloneable( xForeignForms, UNO_QUERY );
if ( !xCloneable.is() )
{
// great, nothing to do
- OSL_ENSURE( !const_cast< FmFormPageImpl& >( rImpl ).getForms( false ).is(), "FmFormPageImpl::FmFormPageImpl: a non-cloneable forms container!?" );
+ OSL_ENSURE( !xForeignForms.is(), "FmFormPageImpl::FmFormPageImpl: a non-cloneable forms container!?" );
return;
}
+
try
{
m_xForms.set( xCloneable->createClone(), UNO_QUERY_THROW );
@@ -197,7 +194,7 @@ FmFormPageImpl::FmFormPageImpl( FmFormPage& _rPage, const FmFormPageImpl& rImpl
aVisitor.process( FormComponentPair( xCloneable, m_xForms ), aAssignmentProcessor );
// assign the cloned models to their SdrObjects
- SdrObjListIter aForeignIter( rImpl.m_rPage );
+ SdrObjListIter aForeignIter( i_foreignImpl.m_rPage );
SdrObjListIter aOwnIter( m_rPage );
OSL_ENSURE( aForeignIter.IsMore() == aOwnIter.IsMore(), "FmFormPageImpl::FmFormPageImpl: inconsistent number of objects (1)!" );
@@ -209,31 +206,23 @@ FmFormPageImpl::FmFormPageImpl( FmFormPage& _rPage, const FmFormPageImpl& rImpl
bool bForeignIsForm = pForeignObj && ( pForeignObj->GetObjInventor() == FmFormInventor );
bool bOwnIsForm = pOwnObj && ( pOwnObj->GetObjInventor() == FmFormInventor );
- if ( bForeignIsForm != bOwnIsForm )
- {
- OSL_FAIL( "FmFormPageImpl::FmFormPageImpl: inconsistent ordering of objects!" );
- // don't attempt to do further assignments, something's completely messed up
- break;
- }
+ ENSURE_OR_BREAK( bForeignIsForm == bOwnIsForm, "FmFormPageImpl::FmFormPageImpl: inconsistent ordering of objects!" );
+ // if this fires, don't attempt to do further assignments, something's completely messed up
+
if ( !bForeignIsForm )
// no form control -> next round
continue;
Reference< XControlModel > xForeignModel( pForeignObj->GetUnoControlModel() );
- OSL_ENSURE( xForeignModel.is(), "FmFormPageImpl::FmFormPageImpl: control shape without control!" );
- if ( !xForeignModel.is() )
- // the SdrObject does not have a UNO Control Model. This is pathological, but well ... So the cloned
- // SdrObject will also not have a UNO Control Model.
- continue;
-
- OSL_ENSURE( !pOwnObj->GetUnoControlModel().is(), "FmFormPageImpl::FmFormPageImpl: there already is a control model for the target object!" );
+ ENSURE_OR_CONTINUE( xForeignModel.is(), "FmFormPageImpl::FmFormPageImpl: control shape without control!" );
+ // if this fires, the SdrObject does not have a UNO Control Model. This is pathological, but well ...
+ // So the cloned SdrObject will also not have a UNO Control Model.
MapControlModels::const_iterator assignment = aModelAssignment.find( xForeignModel );
- OSL_ENSURE( assignment != aModelAssignment.end(), "FmFormPageImpl::FmFormPageImpl: no clone found for this model!" );
- if ( assignment == aModelAssignment.end() )
- // the source SdrObject has a model, but it is not part of the model hierarchy in rImpl.getForms().
+ ENSURE_OR_CONTINUE( assignment != aModelAssignment.end(), "FmFormPageImpl::FmFormPageImpl: no clone found for this model!" );
+ // if this fires, the source SdrObject has a model, but it is not part of the model hierarchy in
+ // i_foreignImpl.getForms().
// Pathological, too ...
- continue;
pOwnObj->SetUnoControlModel( assignment->second );
}
@@ -276,7 +265,7 @@ namespace
_map->put( makeAny( xControlModel ), makeAny( xControlShape ) );
}
- static void lcl_removeFormObject( const FmFormObj& _object, const Reference< XMap >& _map )
+ static void lcl_removeFormObject_throw( const FmFormObj& _object, const Reference< XMap >& _map, bool i_ignoreNonExistence = false )
{
// the control model
Reference< XControlModel > xControlModel( _object.GetUnoControlModel(), UNO_QUERY );
@@ -288,8 +277,13 @@ namespace
Any aOldAssignment =
#endif
_map->remove( makeAny( xControlModel ) );
- OSL_ENSURE( aOldAssignment == makeAny( Reference< XControlShape >( const_cast< FmFormObj& >( _object ).getUnoShape(), UNO_QUERY ) ),
- "lcl_removeFormObject: map was inconsistent!" );
+ #if OSL_DEBUG_LEVEL > 0
+ (void)aOldAssignment;
+ #endif
+ OSL_ENSURE( !i_ignoreNonExistence ||
+ ( aOldAssignment == makeAny( Reference< XControlShape >( const_cast< FmFormObj& >( _object ).getUnoShape(), UNO_QUERY ) ) ),
+ "lcl_removeFormObject: map was inconsistent!" );
+ (void)i_ignoreNonExistence;
}
}
@@ -704,7 +698,26 @@ Reference< XForm > FmFormPageImpl::findFormForDataSource(
return sName;
}
-//------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------------------------
+void FmFormPageImpl::formModelAssigned( const FmFormObj& _object )
+{
+ Reference< XMap > xControlShapeMap( m_aControlShapeMap.get(), UNO_QUERY );
+ if ( !xControlShapeMap.is() )
+ // our map does not exist -> not interested in this event
+ return;
+
+ try
+ {
+ lcl_removeFormObject_throw( _object, xControlShapeMap, false );
+ lcl_insertFormObject_throw( _object, xControlShapeMap );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+}
+
+//----------------------------------------------------------------------------------------------------------------------
void FmFormPageImpl::formObjectInserted( const FmFormObj& _object )
{
Reference< XMap > xControlShapeMap( m_aControlShapeMap.get(), UNO_QUERY );
@@ -722,6 +735,7 @@ void FmFormPageImpl::formObjectInserted( const FmFormObj& _object )
}
}
+//----------------------------------------------------------------------------------------------------------------------
void FmFormPageImpl::formObjectRemoved( const FmFormObj& _object )
{
Reference< XMap > xControlShapeMap( m_aControlShapeMap.get(), UNO_QUERY );
@@ -731,7 +745,7 @@ void FmFormPageImpl::formObjectRemoved( const FmFormObj& _object )
try
{
- lcl_removeFormObject( _object, xControlShapeMap );
+ lcl_removeFormObject_throw( _object, xControlShapeMap );
}
catch( const Exception& )
{
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index 42ef0bdcd361..df6aa255cc62 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -870,19 +870,19 @@ void FmFormShell::GetState(SfxItemSet &rSet)
case SID_FM_USE_WIZARDS:
if ( !SvtModuleOptions().IsModuleInstalled( SvtModuleOptions::E_SDATABASE ) )
rSet.Put( SfxVisibilityItem( nWhich, sal_False ) );
- else if (!m_bDesignMode || !GetFormModel())
+ else if (!GetFormModel())
rSet.DisableItem( nWhich );
else
rSet.Put( SfxBoolItem(nWhich, GetImpl()->GetWizardUsing() ) );
break;
case SID_FM_AUTOCONTROLFOCUS:
- if (!m_bDesignMode || !GetFormModel())
+ if (!GetFormModel())
rSet.DisableItem( nWhich );
else
rSet.Put( SfxBoolItem(nWhich, GetFormModel()->GetAutoControlFocus() ) );
break;
case SID_FM_OPEN_READONLY:
- if (!m_bDesignMode || !GetFormModel())
+ if (!GetFormModel())
rSet.DisableItem( nWhich );
else
rSet.Put( SfxBoolItem(nWhich, GetFormModel()->GetOpenInDesignMode() ) );
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index 7e9578411473..e239fbd659e3 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -920,6 +920,7 @@ sal_Bool GalleryTheme::InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInse
case( GFX_LINK_TYPE_NATIVE_WMF ): nExportFormat = CVT_WMF; break;
case( GFX_LINK_TYPE_NATIVE_MET ): nExportFormat = CVT_MET; break;
case( GFX_LINK_TYPE_NATIVE_PCT ): nExportFormat = CVT_PCT; break;
+ case( GFX_LINK_TYPE_NATIVE_SVG ): nExportFormat = CVT_SVG; break;
default:
break;
}
diff --git a/svx/source/inc/fmpgeimp.hxx b/svx/source/inc/fmpgeimp.hxx
index e806ce740bed..a62225d898cc 100644
--- a/svx/source/inc/fmpgeimp.hxx
+++ b/svx/source/inc/fmpgeimp.hxx
@@ -81,9 +81,10 @@ protected:
public:
FmFormPageImpl( FmFormPage& _rPage );
- FmFormPageImpl( FmFormPage& _rPage, const FmFormPageImpl& rImpl );
~FmFormPageImpl();
+ void initFrom( FmFormPageImpl& i_foreignImpl );
+
// nur wichtig fuer den DesignMode
void setCurForm(::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> xForm);
::com::sun::star::uno::Reference< ::com::sun::star::form::XForm> getDefaultForm();
@@ -135,6 +136,7 @@ public:
void formObjectInserted( const FmFormObj& _object );
void formObjectRemoved( const FmFormObj& _object );
+ void formModelAssigned( const FmFormObj& _object );
/** returns an object mapping from control models to drawing shapes.
*/
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index 5bbe1082cbc4..a0056f8e8313 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -58,8 +58,6 @@
#include <com/sun/star/container/XContainer.hpp>
/** === end UNO includes === **/
-#include <toolkit/helper/formpdfexport.hxx>
-#include <vcl/pdfextoutdevdata.hxx>
#include <vcl/svapp.hxx>
#include <osl/mutex.hxx>
#include <comphelper/processfactory.hxx>
@@ -70,7 +68,6 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <drawinglayer/primitive2d/controlprimitive2d.hxx>
-#include <boost/shared_ptr.hpp>
#include <boost/bind.hpp>
/*
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index 304915de299f..f5ada616c0f8 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -652,8 +652,12 @@ void SdrEditView::CheckPossibilities()
sal_Bool bGraf=HAS_BASE(SdrGrafObj,pObj);
sal_Bool bOle2=HAS_BASE(SdrOle2Obj,pObj);
- if( bGraf && ((SdrGrafObj*)pObj)->HasGDIMetaFile() && !((SdrGrafObj*)pObj)->IsEPS() )
+ if( bGraf &&
+ ((SdrGrafObj*)pObj)->HasGDIMetaFile() &&
+ !( ((SdrGrafObj*)pObj)->IsEPS() || ((SdrGrafObj*)pObj)->IsRenderGraphic() ) )
+ {
bImportMtfPossible = sal_True;
+ }
if (bOle2)
bImportMtfPossible=((SdrOle2Obj*)pObj)->GetObjRef().is();
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index fe986ef215fa..3fbde293e4e9 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -197,7 +197,7 @@ sal_uIntPtr ImpSdrGDIMetaFileImport::DoImport(const GDIMetaFile& rMtf,
case META_POP_ACTION : DoAction((MetaPopAction &)*pAct); break;
case META_HATCH_ACTION : DoAction((MetaHatchAction &)*pAct); break;
case META_COMMENT_ACTION : DoAction((MetaCommentAction &)*pAct, pMtf); break;
-
+ case META_RENDERGRAPHIC_ACTION : DoAction((MetaRenderGraphicAction &)*pAct); break;
}
if(pProgrInfo != NULL)
@@ -1026,6 +1026,27 @@ void ImpSdrGDIMetaFileImport::DoAction( MetaCommentAction& rAct, GDIMetaFile* pM
}
}
+////////////////////////////////////////////////////////////////////////////////////////////////////
+
+void ImpSdrGDIMetaFileImport::DoAction(MetaRenderGraphicAction& rAct)
+{
+ GDIMetaFile aMtf;
+ const ::vcl::RenderGraphic& rRenderGraphic = rAct.GetRenderGraphic();
+ Rectangle aRect( rAct.GetPoint(), rAct.GetSize() );
+ const Point aPos;
+ const Size aPrefSize( rRenderGraphic.GetPrefSize() );
+
+ aRect.Right()++; aRect.Bottom()++;
+
+ aMtf.SetPrefMapMode( rRenderGraphic.GetPrefMapMode() );
+ aMtf.SetPrefSize( aPrefSize );
+ aMtf.AddAction( new MetaRenderGraphicAction( aPos, aPrefSize, rRenderGraphic ) );
+ aMtf.WindStart();
+
+ SdrGrafObj* pGraf=new SdrGrafObj( aMtf, aRect );
+ InsertObj( pGraf );
+}
+
// eof
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/svdraw/svdfmtf.hxx b/svx/source/svdraw/svdfmtf.hxx
index a38a482c9c12..c2f99a212d79 100644
--- a/svx/source/svdraw/svdfmtf.hxx
+++ b/svx/source/svdraw/svdfmtf.hxx
@@ -141,6 +141,7 @@ protected:
void DoAction(MetaISectRectClipRegionAction& rAct) { rAct.Execute(&aVD); }
void DoAction(MetaISectRegionClipRegionAction& rAct) { rAct.Execute(&aVD); }
void DoAction(MetaCommentAction& rAct, GDIMetaFile* pMtf);
+ void DoAction(MetaRenderGraphicAction& rAct);
void ImportText( const Point& rPos, const XubString& rStr, const MetaAction& rAct );
void SetAttributes(SdrObject* pObj, bool bForceTextAttr = false);
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 5d22b4dd3a09..f39ef1719d06 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -504,6 +504,16 @@ sal_Bool SdrGrafObj::IsEPS() const
return pGraphic->IsEPS();
}
+sal_Bool SdrGrafObj::IsRenderGraphic() const
+{
+ return pGraphic->IsRenderGraphic();
+}
+
+sal_Bool SdrGrafObj::HasRenderGraphic() const
+{
+ return pGraphic->HasRenderGraphic();
+}
+
sal_Bool SdrGrafObj::IsSwappedOut() const
{
return mbIsPreview ? sal_True : pGraphic->IsSwappedOut();
@@ -658,6 +668,7 @@ void SdrGrafObj::ReleaseGraphicLink()
void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
{
bool bAnim = pGraphic->IsAnimated();
+ bool bRenderGraphic = pGraphic->HasRenderGraphic();
bool bNoPresGrf = ( pGraphic->GetType() != GRAPHIC_NONE ) && !bEmptyPresObj;
rInfo.bResizeFreeAllowed = aGeo.nDrehWink % 9000 == 0 ||
@@ -665,11 +676,11 @@ void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
aGeo.nDrehWink % 27000 == 0;
rInfo.bResizePropAllowed = sal_True;
- rInfo.bRotateFreeAllowed = bNoPresGrf && !bAnim;
- rInfo.bRotate90Allowed = bNoPresGrf && !bAnim;
- rInfo.bMirrorFreeAllowed = bNoPresGrf && !bAnim;
- rInfo.bMirror45Allowed = bNoPresGrf && !bAnim;
- rInfo.bMirror90Allowed = !bEmptyPresObj;
+ rInfo.bRotateFreeAllowed = bNoPresGrf && !bAnim && !bRenderGraphic;
+ rInfo.bRotate90Allowed = bNoPresGrf && !bAnim && !bRenderGraphic;
+ rInfo.bMirrorFreeAllowed = bNoPresGrf && !bAnim && !bRenderGraphic;
+ rInfo.bMirror45Allowed = bNoPresGrf && !bAnim && !bRenderGraphic;
+ rInfo.bMirror90Allowed = !bEmptyPresObj && !bRenderGraphic;
rInfo.bTransparenceAllowed = sal_False;
rInfo.bGradientAllowed = sal_False;
rInfo.bShearAllowed = sal_False;
@@ -677,7 +688,7 @@ void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
rInfo.bCanConvToPath = sal_False;
rInfo.bCanConvToPathLineToArea = sal_False;
rInfo.bCanConvToPolyLineToArea = sal_False;
- rInfo.bCanConvToPoly = !IsEPS();
+ rInfo.bCanConvToPoly = !IsEPS() && !bRenderGraphic;
rInfo.bCanConvToContour = (rInfo.bCanConvToPoly || LineGeometryUsageIsNecessary());
}
diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx
index d13d30e342ce..1c0763ad4a50 100644
--- a/svx/source/svdraw/svdouno.cxx
+++ b/svx/source/svdraw/svdouno.cxx
@@ -326,68 +326,23 @@ SdrUnoObj& SdrUnoObj::operator= (const SdrUnoObj& rObj)
SdrRectObj::operator= (rObj);
// release the reference to the current control model
- SetUnoControlModel(uno::Reference< awt::XControlModel >());
+ SetUnoControlModel( NULL );
aUnoControlModelTypeName = rObj.aUnoControlModelTypeName;
aUnoControlTypeName = rObj.aUnoControlTypeName;
// copy the uno control model
- uno::Reference< awt::XControlModel > xCtrl( rObj.GetUnoControlModel(), uno::UNO_QUERY );
- uno::Reference< util::XCloneable > xClone( xCtrl, uno::UNO_QUERY );
-
- if ( xClone.is() )
+ const uno::Reference< awt::XControlModel > xSourceControlModel( rObj.GetUnoControlModel(), uno::UNO_QUERY );
+ if ( xSourceControlModel.is() )
{
- // copy the model by cloning
- uno::Reference< awt::XControlModel > xNewModel( xClone->createClone(), uno::UNO_QUERY );
- DBG_ASSERT( xNewModel.is(), "SdrUnoObj::operator =, no control model!");
- xUnoControlModel = xNewModel;
- }
- else
- {
- // copy the model by streaming
- uno::Reference< io::XPersistObject > xObj( xCtrl, uno::UNO_QUERY );
- uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
-
- if ( xObj.is() && xFactory.is() )
+ try
{
- // creating a pipe
- uno::Reference< io::XOutputStream > xOutPipe(xFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.Pipe"))), uno::UNO_QUERY);
- uno::Reference< io::XInputStream > xInPipe(xOutPipe, uno::UNO_QUERY);
-
- // creating the mark streams
- uno::Reference< io::XInputStream > xMarkIn(xFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.MarkableInputStream"))), uno::UNO_QUERY);
- uno::Reference< io::XActiveDataSink > xMarkSink(xMarkIn, uno::UNO_QUERY);
-
- uno::Reference< io::XOutputStream > xMarkOut(xFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.MarkableOutputStream"))), uno::UNO_QUERY);
- uno::Reference< io::XActiveDataSource > xMarkSource(xMarkOut, uno::UNO_QUERY);
-
- // connect mark and sink
- uno::Reference< io::XActiveDataSink > xSink(xFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.ObjectInputStream"))), uno::UNO_QUERY);
-
- // connect mark and source
- uno::Reference< io::XActiveDataSource > xSource(xFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.io.ObjectOutputStream"))), uno::UNO_QUERY);
-
- uno::Reference< io::XObjectOutputStream > xOutStrm(xSource, uno::UNO_QUERY);
- uno::Reference< io::XObjectInputStream > xInStrm(xSink, uno::UNO_QUERY);
-
- if (xMarkSink.is() && xMarkSource.is() && xSink.is() && xSource.is())
- {
- xMarkSink->setInputStream(xInPipe);
- xMarkSource->setOutputStream(xOutPipe);
- xSink->setInputStream(xMarkIn);
- xSource->setOutputStream(xMarkOut);
-
- // write the object to source
- xOutStrm->writeObject(xObj);
- xOutStrm->closeOutput();
- // read the object
- uno::Reference< awt::XControlModel > xModel(xInStrm->readObject(), uno::UNO_QUERY);
- xInStrm->closeInput();
-
- DBG_ASSERT(xModel.is(), "SdrUnoObj::operator =, keine Model erzeugt");
-
- xUnoControlModel = xModel;
- }
+ uno::Reference< util::XCloneable > xClone( xSourceControlModel, uno::UNO_QUERY_THROW );
+ xUnoControlModel.set( xClone->createClone(), uno::UNO_QUERY_THROW );
+ }
+ catch( const uno::Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
}
}
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index f11dee45177c..29aea86ab33c 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -745,10 +745,8 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
{
SfxItemPool& rPool = rView.GetModel()->GetItemPool();
SfxItemSet aSet( rPool, SDRATTR_GRAF_FIRST, SDRATTR_GRAF_LAST );
-
- const bool bUndo = rView.IsUndoEnabled();
-
- String aUndoStr;
+ String aUndoStr;
+ const bool bUndo = rView.IsUndoEnabled();
if( bUndo )
{
@@ -1028,7 +1026,29 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView )
SfxItemPool& rPool = rView.GetModel()->GetItemPool();
SfxItemSet aAttrSet( rPool );
SfxWhichIter aIter( rSet );
- sal_uInt16 nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
+ const SdrMarkList& rMarkList = rView.GetMarkedObjectList();
+ bool bEnableColors = true;
+ bool bEnableTransparency = true;
+ bool bEnableCrop = ( 1 == rMarkList.GetMarkCount() );
+
+ for( int i = 0, nCount = rMarkList.GetMarkCount(); i < nCount; ++i )
+ {
+ SdrGrafObj* pGrafObj = dynamic_cast< SdrGrafObj* >( rMarkList.GetMark( i )->GetMarkedSdrObj() );
+
+ if( !pGrafObj ||
+ ( pGrafObj->GetGraphicType() == GRAPHIC_NONE ) ||
+ ( pGrafObj->GetGraphicType() == GRAPHIC_DEFAULT ) ||
+ pGrafObj->HasRenderGraphic() )
+ {
+ bEnableColors = bEnableTransparency = bEnableCrop = false;
+ break;
+ }
+ else if( bEnableTransparency && ( pGrafObj->HasGDIMetaFile() || pGrafObj->IsAnimated() ) )
+ {
+ bEnableTransparency = false;
+ }
+ }
rView.GetAttributes( aAttrSet );
@@ -1042,8 +1062,15 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView )
{
if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFMODE ) )
{
- rSet.Put( SfxUInt16Item( nSlotId,
- sal::static_int_cast< sal_uInt16 >( ITEMVALUE( aAttrSet, SDRATTR_GRAFMODE, SdrGrafModeItem ) ) ) );
+ if( bEnableColors )
+ {
+ rSet.Put( SfxUInt16Item( nSlotId,
+ sal::static_int_cast< sal_uInt16 >( ITEMVALUE( aAttrSet, SDRATTR_GRAFMODE, SdrGrafModeItem ) ) ) );
+ }
+ else
+ {
+ rSet.DisableItem( SID_ATTR_GRAF_MODE );
+ }
}
}
break;
@@ -1052,8 +1079,15 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView )
{
if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFRED ) )
{
- rSet.Put( SfxInt16Item( nSlotId,
- ITEMVALUE( aAttrSet, SDRATTR_GRAFRED, SdrGrafRedItem ) ) );
+ if( bEnableColors )
+ {
+ rSet.Put( SfxInt16Item( nSlotId,
+ ITEMVALUE( aAttrSet, SDRATTR_GRAFRED, SdrGrafRedItem ) ) );
+ }
+ else
+ {
+ rSet.DisableItem( SID_ATTR_GRAF_RED );
+ }
}
}
break;
@@ -1062,8 +1096,15 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView )
{
if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFGREEN ) )
{
- rSet.Put( SfxInt16Item( nSlotId,
- ITEMVALUE( aAttrSet, SDRATTR_GRAFGREEN, SdrGrafGreenItem ) ) );
+ if( bEnableColors )
+ {
+ rSet.Put( SfxInt16Item( nSlotId,
+ ITEMVALUE( aAttrSet, SDRATTR_GRAFGREEN, SdrGrafGreenItem ) ) );
+ }
+ else
+ {
+ rSet.DisableItem( SID_ATTR_GRAF_GREEN );
+ }
}
}
break;
@@ -1072,8 +1113,15 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView )
{
if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFBLUE ) )
{
- rSet.Put( SfxInt16Item( nSlotId,
- ITEMVALUE( aAttrSet, SDRATTR_GRAFBLUE, SdrGrafBlueItem ) ) );
+ if( bEnableColors )
+ {
+ rSet.Put( SfxInt16Item( nSlotId,
+ ITEMVALUE( aAttrSet, SDRATTR_GRAFBLUE, SdrGrafBlueItem ) ) );
+ }
+ else
+ {
+ rSet.DisableItem( SID_ATTR_GRAF_BLUE );
+ }
}
}
break;
@@ -1082,8 +1130,15 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView )
{
if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFLUMINANCE ) )
{
- rSet.Put( SfxInt16Item( nSlotId,
- ITEMVALUE( aAttrSet, SDRATTR_GRAFLUMINANCE, SdrGrafLuminanceItem ) ) );
+ if( bEnableColors )
+ {
+ rSet.Put( SfxInt16Item( nSlotId,
+ ITEMVALUE( aAttrSet, SDRATTR_GRAFLUMINANCE, SdrGrafLuminanceItem ) ) );
+ }
+ else
+ {
+ rSet.DisableItem( SID_ATTR_GRAF_LUMINANCE );
+ }
}
}
break;
@@ -1092,8 +1147,15 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView )
{
if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFCONTRAST ) )
{
- rSet.Put( SfxInt16Item( nSlotId,
- ITEMVALUE( aAttrSet, SDRATTR_GRAFCONTRAST, SdrGrafContrastItem ) ) );
+ if( bEnableColors )
+ {
+ rSet.Put( SfxInt16Item( nSlotId,
+ ITEMVALUE( aAttrSet, SDRATTR_GRAFCONTRAST, SdrGrafContrastItem ) ) );
+ }
+ else
+ {
+ rSet.DisableItem( SID_ATTR_GRAF_CONTRAST );
+ }
}
}
break;
@@ -1102,8 +1164,15 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView )
{
if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFGAMMA ) )
{
- rSet.Put( SfxUInt32Item( nSlotId,
- ITEMVALUE( aAttrSet, SDRATTR_GRAFGAMMA, SdrGrafGamma100Item ) ) );
+ if( bEnableColors )
+ {
+ rSet.Put( SfxUInt32Item( nSlotId,
+ ITEMVALUE( aAttrSet, SDRATTR_GRAFGAMMA, SdrGrafGamma100Item ) ) );
+ }
+ else
+ {
+ rSet.DisableItem( SID_ATTR_GRAF_GAMMA );
+ }
}
}
break;
@@ -1112,53 +1181,22 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView )
{
if( SFX_ITEM_AVAILABLE <= aAttrSet.GetItemState( SDRATTR_GRAFTRANSPARENCE ) )
{
- const SdrMarkList& rMarkList = rView.GetMarkedObjectList();
- sal_Bool bEnable = sal_True;
-
- for( sal_uInt16 i = 0, nCount = (sal_uInt16) rMarkList.GetMarkCount();
- ( i < nCount ) && bEnable; i++ )
+ if( bEnableTransparency )
{
- SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
-
- if( !pObj || !pObj->ISA( SdrGrafObj ) ||
- ( (SdrGrafObj*) pObj )->HasGDIMetaFile() ||
- ( (SdrGrafObj*) pObj )->IsAnimated() )
- {
- bEnable = sal_False;
- }
- }
-
- if( bEnable )
rSet.Put( SfxUInt16Item( nSlotId,
ITEMVALUE( aAttrSet, SDRATTR_GRAFTRANSPARENCE, SdrGrafTransparenceItem ) ) );
+ }
else
+ {
rSet.DisableItem( SID_ATTR_GRAF_TRANSPARENCE );
+ }
}
}
break;
case( SID_ATTR_GRAF_CROP ):
{
- const SdrMarkList& rMarkList = rView.GetMarkedObjectList();
- sal_Bool bDisable = sal_True;
-
- if( 1 == rMarkList.GetMarkCount() )
- {
- SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
-
- if( pObj && pObj->ISA( SdrGrafObj ) )
- {
- SdrGrafObj* pGrafObj = (SdrGrafObj*) pObj;
-
- if( ( pGrafObj->GetGraphicType() != GRAPHIC_NONE ) &&
- ( pGrafObj->GetGraphicType() != GRAPHIC_DEFAULT ) )
- {
- bDisable = sal_False;
- }
- }
- }
-
- if( bDisable )
+ if( !bEnableCrop )
rSet.DisableItem( nSlotId );
}
break;
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 1e7337b360c7..5bb7da42eb0e 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -153,7 +153,7 @@ SvXMLGraphicInputStream::SvXMLGraphicInputStream( const ::rtl::OUString& rGraphi
{
pStm->SetVersion( SOFFICE_FILEFORMAT_8 );
pStm->SetCompressMode( COMPRESSMODE_ZBITMAP );
- ( (GDIMetaFile&) aGraphic.GetGDIMetaFile() ).Write( *pStm );
+ ( (GDIMetaFile&) aGraphic.GetGDIMetaFile() ).Write( *pStm, GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC );
bRet = ( pStm->GetError() == 0 );
}
}
@@ -542,7 +542,8 @@ String SvXMLGraphicHelper::ImplGetGraphicMimeType( const String& rFileName ) con
{ "gif", "image/gif" },
{ "png", "image/png" },
{ "jpg", "image/jpeg" },
- { "tif", "image/tiff" }
+ { "tif", "image/tiff" },
+ { "svg", "image/svg+xml" }
};
String aMimeType;
@@ -647,7 +648,7 @@ sal_Bool SvXMLGraphicHelper::ImplWriteGraphic( const ::rtl::OUString& rPictureSt
pStream->Write( rLink.GetData(), rLink.GetDataSize() );
}
else
- rMtf.Write( *pStream );
+ rMtf.Write( *pStream, GDIMETAFILE_WRITE_REPLACEMENT_RENDERGRAPHIC );
bRet = ( pStream->GetError() == 0 );
}
@@ -727,6 +728,7 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s
case( GFX_LINK_TYPE_NATIVE_WMF ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".wmf" ) ); break;
case( GFX_LINK_TYPE_NATIVE_MET ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".met" ) ); break;
case( GFX_LINK_TYPE_NATIVE_PCT ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".pct" ) ); break;
+ case( GFX_LINK_TYPE_NATIVE_SVG ): aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".svg" ) ); break;
default:
aExtension = String( RTL_CONSTASCII_USTRINGPARAM( ".grf" ) );
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 547a5334d124..f5535e63957f 100644..100755
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -368,7 +368,8 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, String& rFileName,
if( aExt.Len() )
{
- aURL.setExtension( aExt );
+ if( 0 == (nFlags & XOUTBMP_DONT_ADD_EXTENSION))
+ aURL.setExtension( aExt );
rFileName = aURL.GetMainURL( INetURLObject::NO_DECODE );
SfxMedium aMedium( aURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_WRITE | STREAM_SHARE_DENYNONE | STREAM_TRUNC, sal_True );
@@ -473,7 +474,8 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, String& rFileName,
if( ( GRFILTER_FORMAT_NOTFOUND != nFilter ) && ( aGraphic.GetType() != GRAPHIC_NONE ) )
{
- aURL.setExtension( aExt );
+ if( 0 == (nFlags & XOUTBMP_DONT_ADD_EXTENSION))
+ aURL.setExtension( aExt );
rFileName = aURL.GetMainURL( INetURLObject::NO_DECODE );
nErr = ExportGraphic( aGraphic, aURL, *pFilter, nFilter, NULL );
}