summaryrefslogtreecommitdiff
path: root/sc/source/ui/drawfunc/fuins1.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/drawfunc/fuins1.cxx')
-rw-r--r--sc/source/ui/drawfunc/fuins1.cxx116
1 files changed, 58 insertions, 58 deletions
diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
index ead135751cce..70243ac10aaa 100644
--- a/sc/source/ui/drawfunc/fuins1.cxx
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -55,48 +55,48 @@
////========================================================================
-//// class ImportProgress
+//// class ImportProgress
////
//// Bemerkung:
-//// Diese Klasse stellt lediglich den Handler fuer den ImportProgress des
-//// Grafikfilters bereit.
+//// Diese Klasse stellt lediglich den Handler fuer den ImportProgress des
+//// Grafikfilters bereit.
////========================================================================
//
//class ImportProgress
//{
//public:
-// ImportProgress( GraphicFilter& rFilter );
-// ~ImportProgress();
+// ImportProgress( GraphicFilter& rFilter );
+// ~ImportProgress();
//
-// DECL_LINK( Update, GraphicFilter* );
+// DECL_LINK( Update, GraphicFilter* );
//
//private:
-// ScProgress aProgress;
+// ScProgress aProgress;
//};
//
////------------------------------------------------------------------------
//
//ImportProgress::ImportProgress( GraphicFilter& rFilter )
-// : aProgress( NULL, // SfxViewFrame*, NULL == alle Docs locken
-// String( ScResId(STR_INSERTGRAPHIC) ),
-// 100 )
+// : aProgress( NULL, // SfxViewFrame*, NULL == alle Docs locken
+// String( ScResId(STR_INSERTGRAPHIC) ),
+// 100 )
//{
-// rFilter.SetUpdatePercentHdl( LINK( this, ImportProgress, Update) );
+// rFilter.SetUpdatePercentHdl( LINK( this, ImportProgress, Update) );
//}
//
////------------------------------------------------------------------------
//
//__EXPORT ImportProgress::~ImportProgress()
//{
-// aProgress.SetState( 100 );
+// aProgress.SetState( 100 );
//}
//
////------------------------------------------------------------------------
//
//IMPL_LINK( ImportProgress, Update, GraphicFilter*, pGraphicFilter )
//{
-// aProgress.SetState( pGraphicFilter->GetPercent() );
-// return 0;
+// aProgress.SetState( pGraphicFilter->GetPercent() );
+// return 0;
//}
@@ -111,7 +111,7 @@ void SC_DLLPUBLIC ScLimitSizeOnDrawPage( Size& rSize, Point& rPos, const Size& r
BOOL bNegative = aPageSize.Width() < 0;
if ( bNegative )
{
- // make everything positive temporarily
+ // make everything positive temporarily
aPageSize.Width() = -aPageSize.Width();
rPos.X() = -rPos.X() - rSize.Width();
}
@@ -144,18 +144,18 @@ void SC_DLLPUBLIC ScLimitSizeOnDrawPage( Size& rSize, Point& rPos, const Size& r
rPos.Y() = aPageSize.Height() - rSize.Height();
if ( bNegative )
- rPos.X() = -rPos.X() - rSize.Width(); // back to real position
+ rPos.X() = -rPos.X() - rSize.Width(); // back to real position
}
//------------------------------------------------------------------------
void lcl_InsertGraphic( const Graphic& rGraphic,
const String& rFileName, const String& rFilterName, BOOL bAsLink, BOOL bApi,
- ScTabViewShell* pViewSh, Window* pWindow, SdrView* pView )
+ ScTabViewShell* pViewSh, Window* pWindow, SdrView* pView )
{
- // #74778# set the size so the graphic has its original pixel size
- // at 100% view scale (as in SetMarkedOriginalSize),
- // instead of respecting the current view scale
+ // #74778# set the size so the graphic has its original pixel size
+ // at 100% view scale (as in SetMarkedOriginalSize),
+ // instead of respecting the current view scale
ScDrawView* pDrawView = pViewSh->GetScDrawView();
MapMode aSourceMap = rGraphic.GetPrefMapMode();
@@ -170,7 +170,7 @@ void lcl_InsertGraphic( const Graphic& rGraphic,
Size aLogicSize = pWindow->LogicToLogic(
rGraphic.GetPrefSize(), &aSourceMap, &aDestMap );
- // Limit size
+ // Limit size
SdrPageView* pPV = pView->GetSdrPageView();
SdrPage* pPage = pPV->GetPage();
@@ -178,7 +178,7 @@ void lcl_InsertGraphic( const Graphic& rGraphic,
ScViewData* pData = pViewSh->GetViewData();
if ( pData->GetDocument()->IsNegativePage( pData->GetTabNo() ) )
- aInsertPos.X() -= aLogicSize.Width(); // move position to left edge
+ aInsertPos.X() -= aLogicSize.Width(); // move position to left edge
ScLimitSizeOnDrawPage( aLogicSize, aInsertPos, pPage->GetSize() );
@@ -188,13 +188,13 @@ void lcl_InsertGraphic( const Graphic& rGraphic,
// #118522# calling SetGraphicLink here doesn't work
- // #49961# Path is no longer used as name for the graphics object
+ // #49961# Path is no longer used as name for the graphics object
ScDrawLayer* pLayer = (ScDrawLayer*) pView->GetModel();
- String aName = pLayer->GetNewGraphicName(); // "Grafik x"
+ String aName = pLayer->GetNewGraphicName(); // "Grafik x"
pObj->SetName(aName);
- // don't select if from (dispatch) API, to allow subsequent cell operations
+ // don't select if from (dispatch) API, to allow subsequent cell operations
ULONG nInsOptions = bApi ? SDRINSERT_DONTMARK : 0;
pView->InsertObjectAtView( pObj, *pPV, nInsOptions );
@@ -211,12 +211,12 @@ void lcl_InsertMedia( const ::rtl::OUString& rMediaURL, bool bApi,
ScTabViewShell* pViewSh, Window* pWindow, SdrView* pView,
const Size& rPrefSize )
{
- SdrPageView* pPV = pView->GetSdrPageView();
- SdrPage* pPage = pPV->GetPage();
- ScViewData* pData = pViewSh->GetViewData();
- Point aInsertPos( pViewSh->GetInsertPos() );
- Size aSize;
-
+ SdrPageView* pPV = pView->GetSdrPageView();
+ SdrPage* pPage = pPV->GetPage();
+ ScViewData* pData = pViewSh->GetViewData();
+ Point aInsertPos( pViewSh->GetInsertPos() );
+ Size aSize;
+
if( rPrefSize.Width() && rPrefSize.Height() )
{
if( pWindow )
@@ -228,13 +228,13 @@ void lcl_InsertMedia( const ::rtl::OUString& rMediaURL, bool bApi,
aSize = Size( 5000, 5000 );
ScLimitSizeOnDrawPage( aSize, aInsertPos, pPage->GetSize() );
-
+
if( pData->GetDocument()->IsNegativePage( pData->GetTabNo() ) )
aInsertPos.X() -= aSize.Width();
SdrMediaObj* pObj = new SdrMediaObj( Rectangle( aInsertPos, aSize ) );
-
- pObj->setURL( rMediaURL );
+
+ pObj->setURL( rMediaURL );
pView->InsertObjectAtView( pObj, *pPV, bApi ? SDRINSERT_DONTMARK : 0 );
}
@@ -248,11 +248,11 @@ void lcl_InsertMedia( const ::rtl::OUString& rMediaURL, bool bApi,
#pragma optimize("",off)
#endif
-FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh,
- Window* pWin,
+FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh,
+ Window* pWin,
ScDrawView* pViewP,
- SdrModel* pDoc,
- SfxRequest& rReq )
+ SdrModel* pDoc,
+ SfxRequest& rReq )
: FuPoor(pViewSh, pWin, pViewP, pDoc, rReq)
{
const SfxItemSet* pReqArgs = rReq.GetArgs();
@@ -301,7 +301,7 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh,
lcl_InsertGraphic( aGraphic, aFileName, aFilterName, bAsLink, FALSE, pViewSh, pWindow, pView );
- // append items for recording
+ // append items for recording
rReq.AppendItem( SfxStringItem( SID_INSERT_GRAPHIC, aFileName ) );
rReq.AppendItem( SfxStringItem( FN_PARAM_FILTER, aFilterName ) );
rReq.AppendItem( SfxBoolItem( FN_PARAM_1, bAsLink ) );
@@ -309,18 +309,18 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh,
}
else
{
- // error is handled in SvxOpenGraphicDialog::GetGraphic
+ // error is handled in SvxOpenGraphicDialog::GetGraphic
#if 0
USHORT nRes = 0;
switch ( nError )
{
- case GRFILTER_OPENERROR: nRes = SCSTR_GRFILTER_OPENERROR; break;
- case GRFILTER_IOERROR: nRes = SCSTR_GRFILTER_IOERROR; break;
- case GRFILTER_FORMATERROR: nRes = SCSTR_GRFILTER_FORMATERROR; break;
- case GRFILTER_VERSIONERROR: nRes = SCSTR_GRFILTER_VERSIONERROR; break;
- case GRFILTER_FILTERERROR: nRes = SCSTR_GRFILTER_FILTERERROR; break;
- case GRFILTER_TOOBIG: nRes = SCSTR_GRFILTER_TOOBIG; break;
+ case GRFILTER_OPENERROR: nRes = SCSTR_GRFILTER_OPENERROR; break;
+ case GRFILTER_IOERROR: nRes = SCSTR_GRFILTER_IOERROR; break;
+ case GRFILTER_FORMATERROR: nRes = SCSTR_GRFILTER_FORMATERROR; break;
+ case GRFILTER_VERSIONERROR: nRes = SCSTR_GRFILTER_VERSIONERROR; break;
+ case GRFILTER_FILTERERROR: nRes = SCSTR_GRFILTER_FILTERERROR; break;
+ case GRFILTER_TOOBIG: nRes = SCSTR_GRFILTER_TOOBIG; break;
}
if ( nRes )
{
@@ -377,21 +377,21 @@ void FuInsertGraphic::Deactivate()
|*
\************************************************************************/
-FuInsertMedia::FuInsertMedia( ScTabViewShell* pViewSh,
- Window* pWin,
+FuInsertMedia::FuInsertMedia( ScTabViewShell* pViewSh,
+ Window* pWin,
ScDrawView* pViewP,
- SdrModel* pDoc,
- SfxRequest& rReq ) :
+ SdrModel* pDoc,
+ SfxRequest& rReq ) :
FuPoor(pViewSh, pWin, pViewP, pDoc, rReq)
{
- ::rtl::OUString aURL;
- const SfxItemSet* pReqArgs = rReq.GetArgs();
- bool bAPI = false;
+ ::rtl::OUString aURL;
+ const SfxItemSet* pReqArgs = rReq.GetArgs();
+ bool bAPI = false;
if( pReqArgs )
{
const SfxStringItem* pStringItem = PTR_CAST( SfxStringItem, &pReqArgs->Get( rReq.GetSlot() ) );
-
+
if( pStringItem )
{
aURL = pStringItem->GetValue();
@@ -405,19 +405,19 @@ FuInsertMedia::FuInsertMedia( ScTabViewShell* pViewSh,
if( pWin )
pWin->EnterWait();
-
+
if( !::avmedia::MediaWindow::isMediaURL( aURL, true, &aPrefSize ) )
{
if( pWin )
pWin->LeaveWait();
-
+
if( !bAPI )
::avmedia::MediaWindow::executeFormatErrorBox( pWindow );
}
else
{
lcl_InsertMedia( aURL, bAPI, pViewSh, pWindow, pView, aPrefSize );
-
+
if( pWin )
pWin->LeaveWait();
}