summaryrefslogtreecommitdiffstats
path: root/sfx2
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2009-12-09 12:48:52 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2009-12-09 12:48:52 +0100
commitb65cac5336385cc2637bc835fcce745fd5fe7cb0 (patch)
tree13a20bebebc0d29a2d038e61b0722b15d1d7a075 /sfx2
parentautorecovery: streamlined InsertDocument_Impl, as preparation for moving its ... (diff)
downloadcore-b65cac5336385cc2637bc835fcce745fd5fe7cb0.tar.gz
core-b65cac5336385cc2637bc835fcce745fd5fe7cb0.zip
autorecovery: removed SID_WIN_POSSIZE
There were two places which wrote this item (one being the TransformParameters in appuno.cxx, one a GetState method at the view frame), and both had different opinions whether this item should be an SfxStringItem or an SfxRectangleItem. Also, there seemed to be no code at all which evaluated this item.
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/inc/sfx2/sfxsids.hrc2
-rw-r--r--sfx2/sdi/frmslots.sdi5
-rw-r--r--sfx2/sdi/sfx.sdi27
-rw-r--r--sfx2/source/appl/appbas.cxx5
-rw-r--r--sfx2/source/appl/appuno.cxx18
-rw-r--r--sfx2/source/view/frame2.cxx23
-rw-r--r--sfx2/source/view/viewfrm2.cxx10
7 files changed, 6 insertions, 84 deletions
diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc
index 64161e96d043..c6d4771d97d5 100644
--- a/sfx2/inc/sfx2/sfxsids.hrc
+++ b/sfx2/inc/sfx2/sfxsids.hrc
@@ -733,7 +733,7 @@
#define SID_WIN_MINIMIZED (SID_SFX_START + 625)
#define SID_WIN_MAXIMIZED (SID_SFX_START + 626)
#define SID_WIN_FULLSCREEN (SID_SFX_START + 627)
-#define SID_WIN_POSSIZE (SID_SFX_START + 628)
+ // FREE, was SID_WIN_POSSIZE
#define SID_WIN_VISIBLE (SID_SFX_START + 629)
#define SID_VIEWSHELL0 (SID_SFX_START + 630)
diff --git a/sfx2/sdi/frmslots.sdi b/sfx2/sdi/frmslots.sdi
index 050c36e9d7d4..0b7ba4ea29c3 100644
--- a/sfx2/sdi/frmslots.sdi
+++ b/sfx2/sdi/frmslots.sdi
@@ -400,11 +400,6 @@ interface TopWindow : BrowseWindow
[
StateMethod = StateView_Impl ;
]
- SID_WIN_POSSIZE // ole(no) api(final/play/rec)
- [
- ExecMethod = Exec_Impl ;
- StateMethod = GetState_Impl ;
- ]
SID_CLOSEWIN // ole(no) api(final/play/rec)
[
ExecMethod = Exec_Impl ;
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index efa2c0e23a92..7caf442758b1 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -400,33 +400,6 @@ SfxVoidItem AddWatch SID_BASICIDE_ADDWATCH
]
//--------------------------------------------------------------------------
-SfxRectangleItem Area SID_WIN_POSSIZE
-
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- Readonly = FALSE,
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = ;
-]
-
-//--------------------------------------------------------------------------
SfxStringItem Author SID_DOCINFO_AUTHOR
[
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx
index 042ab05318b5..bb7d2eddbbbd 100644
--- a/sfx2/source/appl/appbas.cxx
+++ b/sfx2/source/appl/appbas.cxx
@@ -425,11 +425,6 @@ void SfxApplication::PropExec_Impl( SfxRequest &rReq )
break;
}
- case SID_WIN_POSSIZE:
- {
- break;
- }
-
case SID_INTERACTIVEMODE:
{
break;
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index a47bb6b33454..4d2a1f234ba6 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -181,7 +181,6 @@ static const String sMacroExecMode = String::CreateFromAscii( "Macr
static const String sUpdateDocMode = String::CreateFromAscii( "UpdateDocMode" );
static const String sMinimized = String::CreateFromAscii( "Minimized" );
static const String sInteractionHdl = String::CreateFromAscii( "InteractionHandler" );
-static const String sWindowState = String::CreateFromAscii( "WindowState" );
static const String sUCBContent = String::CreateFromAscii( "UCBContent" );
static const String sRepairPackage = String::CreateFromAscii( "RepairPackage" );
static const String sDocumentTitle = String::CreateFromAscii( "DocumentTitle" );
@@ -741,14 +740,6 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if (bOK)
rSet.Put( SfxStringItem( SID_CONTENTTYPE, sVal ) );
}
- else if ( aName == sWindowState )
- {
- ::rtl::OUString sVal;
- sal_Bool bOK = ((rProp.Value >>= sVal) && sVal.getLength());
- DBG_ASSERT( bOK, "invalid type or value for WindowState" );
- if (bOK)
- rSet.Put( SfxStringItem( SID_WIN_POSSIZE, sVal ) );
- }
else if ( aName == sTemplateName )
{
::rtl::OUString sVal;
@@ -1018,8 +1009,6 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
nAdditional++;
if ( rSet.GetItemState( SID_CONTENTTYPE ) == SFX_ITEM_SET )
nAdditional++;
- if ( rSet.GetItemState( SID_WIN_POSSIZE ) == SFX_ITEM_SET )
- nAdditional++;
if ( rSet.GetItemState( SID_POSTDATA ) == SFX_ITEM_SET )
nAdditional++;
if ( rSet.GetItemState( SID_FILLFRAME ) == SFX_ITEM_SET )
@@ -1175,8 +1164,6 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
continue;
if ( nId == SID_CONTENTTYPE )
continue;
- if ( nId == SID_WIN_POSSIZE )
- continue;
if ( nId == SID_TEMPLATE_NAME )
continue;
if ( nId == SID_TEMPLATE_REGIONNAME )
@@ -1498,11 +1485,6 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
pValue[nActProp].Name = sMediaType;
pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
}
- if ( rSet.GetItemState( SID_WIN_POSSIZE, sal_False, &pItem ) == SFX_ITEM_SET )
- {
- pValue[nActProp].Name = sWindowState;
- pValue[nActProp++].Value <<= ( ::rtl::OUString(((SfxStringItem*)pItem)->GetValue()) );
- }
if ( rSet.GetItemState( SID_TEMPLATE_NAME, sal_False, &pItem ) == SFX_ITEM_SET )
{
pValue[nActProp].Name = sTemplateName;
diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx
index 6c11f22ab4f9..4c9f8bc912fb 100644
--- a/sfx2/source/view/frame2.cxx
+++ b/sfx2/source/view/frame2.cxx
@@ -530,18 +530,14 @@ sal_Bool SfxFrame::InsertDocument_Impl( SfxObjectShell& rDoc, const ::comphelper
if( !pImp->bHidden )
rDoc.OwnerLock( sal_True );
- Sequence< PropertyValue > aUserData;
- bool bClearWinPosSizeItem = false;
- bool bReadUserData = false;
-
// if no view-related data exists in the set, then obtain the view data from the model
+ Sequence< PropertyValue > aUserData;
if ( !bHasJumpMark && !bHasPluginMode && !bHasViewId )
{
if ( lcl_getViewDataAndID( rDoc.GetModel(), aUserData, nViewId ) )
{
SfxItemSet* pMediumSet = rDoc.GetMedium()->GetItemSet();
pMediumSet->Put( SfxUInt16Item( SID_VIEW_ID, nViewId ) );
- bClearWinPosSizeItem = bReadUserData = true;
}
}
@@ -626,20 +622,11 @@ sal_Bool SfxFrame::InsertDocument_Impl( SfxObjectShell& rDoc, const ::comphelper
SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_VIEWCREATED, GlobalEventConfig::GetEventName( STR_EVENT_VIEWCREATED ), &rDoc ) );
- if ( bClearWinPosSizeItem )
- {
- SfxItemSet* pMediumSet = rDoc.GetMedium()->GetItemSet();
- pMediumSet->ClearItem( SID_WIN_POSSIZE );
- }
-
- if ( bReadUserData )
+ // UserData hier einlesen, da es ansonsten immer mit bBrowse=TRUE
+ // aufgerufen wird, beim Abspeichern wurde aber bBrowse=FALSE verwendet
+ if ( pViewFrame && pViewFrame->GetViewShell() && aUserData.getLength() )
{
- // UserData hier einlesen, da es ansonsten immer mit bBrowse=TRUE
- // aufgerufen wird, beim Abspeichern wurde aber bBrowse=FALSE verwendet
- if ( pViewFrame && pViewFrame->GetViewShell() && aUserData.getLength() )
- {
- pViewFrame->GetViewShell()->ReadUserDataSequence( aUserData, TRUE );
- }
+ pViewFrame->GetViewShell()->ReadUserDataSequence( aUserData, TRUE );
}
return GetCurrentDocument() == &rDoc;
diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx
index 882c24b44ee1..c7452978d564 100644
--- a/sfx2/source/view/viewfrm2.cxx
+++ b/sfx2/source/view/viewfrm2.cxx
@@ -323,9 +323,6 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq )
break;
}
- case SID_WIN_POSSIZE:
- break;
-
case SID_NEWDOCDIRECT :
{
SFX_REQUEST_ARG( rReq, pFactoryItem, SfxStringItem, SID_NEWDOCDIRECT, FALSE);
@@ -441,13 +438,6 @@ void SfxViewFrame::GetState_Impl( SfxItemSet &rSet )
case SID_SHOWPOPUPS :
break;
- case SID_WIN_POSSIZE:
- {
- rSet.Put( SfxRectangleItem( nWhich, Rectangle(
- GetWindow().GetPosPixel(), GetWindow().GetSizePixel() ) ) );
- break;
- }
-
case SID_OBJECT:
if ( GetViewShell() && GetViewShell()->GetVerbs().getLength() && !GetObjectShell()->IsInPlaceActive() )
{