summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/inc/ViewSettingsSequenceDefines.hxx2
-rw-r--r--sc/inc/dpobject.hxx4
-rw-r--r--sc/inc/dpsave.hxx1
-rw-r--r--sc/inc/pivot.hxx1
-rw-r--r--sc/inc/unonames.hxx1
-rw-r--r--sc/source/core/data/dpobject.cxx35
-rw-r--r--sc/source/core/data/dpsave.cxx5
-rw-r--r--sc/source/core/data/dptabsrc.cxx6
-rw-r--r--sc/source/core/data/pivot2.cxx1
-rw-r--r--sc/source/core/data/table2.cxx11
-rw-r--r--sc/source/filter/xml/XMLExportDataPilot.cxx10
-rw-r--r--sc/source/ui/dbgui/pvfundlg.cxx5
-rw-r--r--sc/source/ui/dbgui/pvlaydlg.cxx57
-rw-r--r--sc/source/ui/inc/pvlaydlg.hxx1
-rw-r--r--sc/source/ui/inc/tabvwsh.hxx1
-rw-r--r--sc/source/ui/view/gridwin2.cxx13
-rw-r--r--sc/source/ui/view/prevwsh.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx8
19 files changed, 133 insertions, 33 deletions
diff --git a/sc/inc/ViewSettingsSequenceDefines.hxx b/sc/inc/ViewSettingsSequenceDefines.hxx
index a8086fbdbe40..7437ba698f8a 100644
--- a/sc/inc/ViewSettingsSequenceDefines.hxx
+++ b/sc/inc/ViewSettingsSequenceDefines.hxx
@@ -104,6 +104,6 @@
#define SC_PAGEVIEWZOOMVALUE "PageViewZoomValue"
#define SC_SHOWPAGEBREAKPREVIEW "ShowPageBreakPreview"
#define SC_VIEWID "ViewId"
-#define SC_VIEW "View"
+#define SC_VIEW "view"
#endif
diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx
index 44aa1daa9a92..e1b88919dad6 100644
--- a/sc/inc/dpobject.hxx
+++ b/sc/inc/dpobject.hxx
@@ -186,7 +186,7 @@ public:
bool IsDataDescriptionCell(const ScAddress& rPos);
bool IsDimNameInUse(const ::rtl::OUString& rName) const;
- String GetDimName( long nDim, BOOL& rIsDataLayout );
+ String GetDimName( long nDim, BOOL& rIsDataLayout, sal_Int32* pFlags = NULL );
BOOL IsDuplicated( long nDim );
long GetDimCount();
void GetHeaderPositionData(const ScAddress& rPos, ::com::sun::star::sheet::DataPilotTableHeaderData& rData);
@@ -259,6 +259,8 @@ public:
PivotField* pRefColFields = NULL, SCSIZE nRefColCount = 0,
PivotField* pRefRowFields = NULL, SCSIZE nRefRowCount = 0,
PivotField* pRefPageFields = NULL, SCSIZE nRefPageCount = 0 );
+
+ static bool IsOrientationAllowed( USHORT nOrient, sal_Int32 nDimFlags );
};
diff --git a/sc/inc/dpsave.hxx b/sc/inc/dpsave.hxx
index bfff0b97a168..8272b850b27e 100644
--- a/sc/inc/dpsave.hxx
+++ b/sc/inc/dpsave.hxx
@@ -140,6 +140,7 @@ public:
void SetSubTotals(long nCount, const USHORT* pFuncs);
long GetSubTotalsCount() const { return nSubTotalCount; }
USHORT GetSubTotalFunc(long nIndex) const { return pSubTotalFuncs[nIndex]; }
+ bool HasShowEmpty() const;
void SetShowEmpty(BOOL bSet);
BOOL GetShowEmpty() const { return BOOL(nShowEmptyMode); }
void SetFunction(USHORT nNew); // enum GeneralFunction
diff --git a/sc/inc/pivot.hxx b/sc/inc/pivot.hxx
index 23fc41311fd4..3a0a776205c8 100644
--- a/sc/inc/pivot.hxx
+++ b/sc/inc/pivot.hxx
@@ -150,6 +150,7 @@ struct ScDPLabelData
SCsCOL mnCol;
USHORT mnFuncMask; /// Page/Column/Row subtotal function.
sal_Int32 mnUsedHier; /// Used hierarchy.
+ sal_Int32 mnFlags; /// Flags from the DataPilotSource dimension
bool mbShowAll; /// true = Show all (also empty) results.
bool mbIsValue; /// true = Sum or count in data field.
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx
index f06662846158..f66f6c8cf6eb 100644
--- a/sc/inc/unonames.hxx
+++ b/sc/inc/unonames.hxx
@@ -568,6 +568,7 @@
#define SC_UNO_FIELD_SUBTOTALNAME "FieldSubtotalName"
#define SC_UNO_GRANDTOTAL_NAME "GrandTotalName"
#define SC_UNO_HAS_HIDDEN_MEMBER "HasHiddenMember"
+#define SC_UNO_FLAGS "Flags"
// (preliminary:)
#define SC_UNO_REFVALUE "ReferenceValue"
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index e994339f4a9a..29ba9f15dc92 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -65,6 +65,7 @@
#include <com/sun/star/sheet/DataPilotTableHeaderData.hpp>
#include <com/sun/star/sheet/DataPilotTablePositionData.hpp>
#include <com/sun/star/sheet/DataPilotTablePositionType.hpp>
+#include <com/sun/star/sheet/DimensionFlags.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XSingleComponentFactory.hpp>
@@ -845,7 +846,7 @@ bool ScDPObject::IsDimNameInUse(const OUString& rName) const
return false;
}
-String ScDPObject::GetDimName( long nDim, BOOL& rIsDataLayout )
+String ScDPObject::GetDimName( long nDim, BOOL& rIsDataLayout, sal_Int32* pFlags )
{
rIsDataLayout = FALSE;
String aRet;
@@ -879,6 +880,10 @@ String ScDPObject::GetDimName( long nDim, BOOL& rIsDataLayout )
rIsDataLayout = TRUE;
else
aRet = String( aName );
+
+ if (pFlags)
+ *pFlags = ScUnoHelpFunctions::GetLongProperty( xDimProp,
+ rtl::OUString::createFromAscii(SC_UNO_FLAGS), 0 );
}
}
}
@@ -2003,6 +2008,8 @@ BOOL ScDPObject::FillLabelData(ScPivotParam& rParam)
GetHierarchies(nDim, pNewLabel->maHiers);
GetMembers(nDim, GetUsedHierarchy(nDim), pNewLabel->maMembers);
lcl_FillLabelData(*pNewLabel, xDimProp);
+ pNewLabel->mnFlags = ScUnoHelpFunctions::GetLongProperty( xDimProp,
+ rtl::OUString::createFromAscii(SC_UNO_FLAGS), 0 );
rParam.maLabelArray.push_back(pNewLabel);
}
}
@@ -2231,6 +2238,32 @@ void ScDPObject::ConvertOrientation( ScDPSaveData& rSaveData,
}
}
+// static
+bool ScDPObject::IsOrientationAllowed( USHORT nOrient, sal_Int32 nDimFlags )
+{
+ bool bAllowed = true;
+ switch (nOrient)
+ {
+ case sheet::DataPilotFieldOrientation_PAGE:
+ bAllowed = ( nDimFlags & sheet::DimensionFlags::NO_PAGE_ORIENTATION ) == 0;
+ break;
+ case sheet::DataPilotFieldOrientation_COLUMN:
+ bAllowed = ( nDimFlags & sheet::DimensionFlags::NO_COLUMN_ORIENTATION ) == 0;
+ break;
+ case sheet::DataPilotFieldOrientation_ROW:
+ bAllowed = ( nDimFlags & sheet::DimensionFlags::NO_ROW_ORIENTATION ) == 0;
+ break;
+ case sheet::DataPilotFieldOrientation_DATA:
+ bAllowed = ( nDimFlags & sheet::DimensionFlags::NO_DATA_ORIENTATION ) == 0;
+ break;
+ default:
+ {
+ // allowed to remove from previous orientation
+ }
+ }
+ return bAllowed;
+}
+
// -----------------------------------------------------------------------
// static
diff --git a/sc/source/core/data/dpsave.cxx b/sc/source/core/data/dpsave.cxx
index 48f1698f3a77..2b51ca68d170 100644
--- a/sc/source/core/data/dpsave.cxx
+++ b/sc/source/core/data/dpsave.cxx
@@ -406,6 +406,11 @@ void ScDPSaveDimension::SetSubTotals(long nCount, const USHORT* pFuncs)
bSubTotalDefault = FALSE;
}
+bool ScDPSaveDimension::HasShowEmpty() const
+{
+ return nShowEmptyMode != SC_DPSAVEMODE_DONTKNOW;
+}
+
void ScDPSaveDimension::SetShowEmpty(BOOL bSet)
{
nShowEmptyMode = bSet;
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index 7d8da8c999f8..c971302b1b1e 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -1558,6 +1558,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScDPDimension::getPropertySetIn
static SfxItemPropertyMapEntry aDPDimensionMap_Impl[] =
{
{MAP_CHAR_LEN(SC_UNO_FILTER), 0, &getCppuType((uno::Sequence<sheet::TableFilterField>*)0), 0, 0 },
+ {MAP_CHAR_LEN(SC_UNO_FLAGS), 0, &getCppuType((sal_Int32*)0), beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNO_FUNCTION), 0, &getCppuType((sheet::GeneralFunction*)0), 0, 0 },
{MAP_CHAR_LEN(SC_UNO_ISDATALA), 0, &getBooleanCppuType(), beans::PropertyAttribute::READONLY, 0 },
{MAP_CHAR_LEN(SC_UNO_NUMBERFO), 0, &getCppuType((sal_Int32*)0), beans::PropertyAttribute::READONLY, 0 },
@@ -1735,6 +1736,11 @@ uno::Any SAL_CALL ScDPDimension::getPropertyValue( const rtl::OUString& aPropert
aRet <<= mpSubtotalName.get() ? *mpSubtotalName : OUString::createFromAscii("");
else if (aNameStr.EqualsAscii(SC_UNO_HAS_HIDDEN_MEMBER))
aRet <<= mbHasHiddenMember;
+ else if (aNameStr.EqualsAscii(SC_UNO_FLAGS))
+ {
+ sal_Int32 nFlags = 0; // tabular data: all orientations are possible
+ aRet <<= nFlags;
+ }
else
{
DBG_ERROR("unknown property");
diff --git a/sc/source/core/data/pivot2.cxx b/sc/source/core/data/pivot2.cxx
index 5d7e3d273ad0..8bb32a4c8386 100644
--- a/sc/source/core/data/pivot2.cxx
+++ b/sc/source/core/data/pivot2.cxx
@@ -87,6 +87,7 @@ ScDPLabelData::ScDPLabelData( const String& rName, short nCol, bool bIsValue ) :
mnCol( nCol ),
mnFuncMask( PIVOT_FUNC_NONE ),
mnUsedHier( 0 ),
+ mnFlags( 0 ),
mbShowAll( false ),
mbIsValue( bIsValue )
{
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index d718ecdecfa2..598be4ee92fc 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -3085,10 +3085,13 @@ void ScTable::SetDrawPageSize(bool bResetStreamValid, bool bUpdateNoteCaptionPos
ScDrawLayer* pDrawLayer = pDocument->GetDrawLayer();
if( pDrawLayer )
{
- long x = GetColOffset( MAXCOL + 1 );
- long y = GetRowOffset( MAXROW + 1 );
- x = (long) ((double) x * HMM_PER_TWIPS);
- y = (long) ((double) y * HMM_PER_TWIPS);
+ double fValX = GetColOffset( MAXCOL + 1 ) * HMM_PER_TWIPS;
+ double fValY = GetRowOffset( MAXROW + 1 ) * HMM_PER_TWIPS;
+ const long nMax = ::std::numeric_limits<long>::max();
+ // #i113884# Avoid int32 overflow with possible negative results than can cause bad effects.
+ // If the draw page size is smaller than all rows, only the bottom of the sheet is affected.
+ long x = ( fValX > (double)nMax ) ? nMax : (long) fValX;
+ long y = ( fValY > (double)nMax ) ? nMax : (long) fValY;
if ( IsLayoutRTL() ) // IsNegativePage
x = -x;
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index 3079119dcbbd..de39b168524a 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
@@ -503,9 +503,13 @@ void ScXMLExportDataPilot::WriteMembers(ScDPSaveDimension* pDim)
void ScXMLExportDataPilot::WriteLevels(ScDPSaveDimension* pDim)
{
- rtl::OUStringBuffer sBuffer;
- SvXMLUnitConverter::convertBool(sBuffer, pDim->GetShowEmpty());
- rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SHOW_EMPTY, sBuffer.makeStringAndClear());
+ // #i114202# GetShowEmpty is only valid if HasShowEmpty is true.
+ if (pDim->HasShowEmpty())
+ {
+ rtl::OUStringBuffer sBuffer;
+ SvXMLUnitConverter::convertBool(sBuffer, pDim->GetShowEmpty());
+ rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SHOW_EMPTY, sBuffer.makeStringAndClear());
+ }
SvXMLElementExport aElemDPL(rExport, XML_NAMESPACE_TABLE, XML_DATA_PILOT_LEVEL, sal_True, sal_True);
WriteSubTotals(pDim);
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx
index 4c6e5e8ee5f2..daa549688f21 100644
--- a/sc/source/ui/dbgui/pvfundlg.cxx
+++ b/sc/source/ui/dbgui/pvfundlg.cxx
@@ -801,8 +801,9 @@ ScDPShowDetailDlg::ScDPShowDetailDlg( Window* pParent, ScDPObject& rDPObj, USHOR
for (long nDim=0; nDim<nDimCount; nDim++)
{
BOOL bIsDataLayout;
- String aName = rDPObj.GetDimName( nDim, bIsDataLayout );
- if ( !bIsDataLayout && !rDPObj.IsDuplicated( nDim ) )
+ sal_Int32 nDimFlags = 0;
+ String aName = rDPObj.GetDimName( nDim, bIsDataLayout, &nDimFlags );
+ if ( !bIsDataLayout && !rDPObj.IsDuplicated( nDim ) && ScDPObject::IsOrientationAllowed( nOrient, nDimFlags ) )
{
const ScDPSaveDimension* pDimension = pSaveData ? pSaveData->GetExistingDimensionByName(aName) : 0;
if ( !pDimension || (pDimension->GetOrientation() != nOrient) )
diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index b2a6cba1743d..2d3ae285c45f 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -582,7 +582,9 @@ void ScDPLayoutDlg::AddField( size_t nFromIndex, ScDPFieldType eToType, const Po
}
}
- if ( (toArr->back().get() == NULL)
+ bool bAllowed = IsOrientationAllowed( fData.mnCol, eToType );
+ if ( bAllowed
+ && (toArr->back().get() == NULL)
&& (!Contains( toArr, fData.mnCol, nAt )) )
{
// ggF. in anderem Fenster entfernen
@@ -733,7 +735,8 @@ void ScDPLayoutDlg::MoveField( ScDPFieldType eFromType, size_t nFromIndex, ScDPF
{
ScDPFuncData fData( *((*fromArr)[nFromIndex]) );
- if ( Contains( fromArr, fData.mnCol, nAt ) )
+ bool bAllowed = IsOrientationAllowed( fData.mnCol, eToType );
+ if ( bAllowed && Contains( fromArr, fData.mnCol, nAt ) )
{
fromWnd->DelField( nAt );
Remove( fromArr, nAt );
@@ -962,21 +965,41 @@ PointerStyle ScDPLayoutDlg::NotifyMouseMove( const Point& rAt )
if ( bIsDrag )
{
Point aPos = ScreenToOutputPixel( rAt );
+ ScDPFieldType eCheckTarget = TYPE_SELECT;
if ( aRectPage.IsInside( aPos ) )
- ePtr = lclGetPointerForField( TYPE_PAGE );
+ eCheckTarget = TYPE_PAGE;
else if ( aRectCol.IsInside( aPos ) )
- ePtr = lclGetPointerForField( TYPE_COL );
+ eCheckTarget = TYPE_COL;
else if ( aRectRow.IsInside( aPos ) )
- ePtr = lclGetPointerForField( TYPE_ROW );
+ eCheckTarget = TYPE_ROW;
else if ( aRectData.IsInside( aPos ) )
- ePtr = lclGetPointerForField( TYPE_DATA );
+ eCheckTarget = TYPE_DATA;
else if ( eDnDFromType != TYPE_SELECT )
ePtr = POINTER_PIVOT_DELETE;
else if ( aRectSelect.IsInside( aPos ) )
ePtr = lclGetPointerForField( TYPE_SELECT );
else
ePtr = POINTER_NOTALLOWED;
+
+ if ( eCheckTarget != TYPE_SELECT )
+ {
+ // check if the target orientation is allowed for this field
+ ScDPFuncDataVec* fromArr = NULL;
+ switch ( eDnDFromType )
+ {
+ case TYPE_PAGE: fromArr = &aPageArr; break;
+ case TYPE_COL: fromArr = &aColArr; break;
+ case TYPE_ROW: fromArr = &aRowArr; break;
+ case TYPE_DATA: fromArr = &aDataArr; break;
+ case TYPE_SELECT: fromArr = &aSelectArr; break;
+ }
+ ScDPFuncData fData( *((*fromArr)[nDnDFromIndex]) );
+ if (IsOrientationAllowed( fData.mnCol, eCheckTarget ))
+ ePtr = lclGetPointerForField( eCheckTarget );
+ else
+ ePtr = POINTER_NOTALLOWED;
+ }
}
return ePtr;
@@ -1264,6 +1287,28 @@ String ScDPLayoutDlg::GetLabelString( SCsCOL nCol )
return String();
}
+//----------------------------------------------------------------------------
+
+bool ScDPLayoutDlg::IsOrientationAllowed( SCsCOL nCol, ScDPFieldType eType )
+{
+ bool bAllowed = true;
+ ScDPLabelData* pData = GetLabelData( nCol );
+ DBG_ASSERT( pData, "LabelData not found" );
+ if (pData)
+ {
+ sheet::DataPilotFieldOrientation eOrient = sheet::DataPilotFieldOrientation_HIDDEN;
+ switch (eType)
+ {
+ case TYPE_PAGE: eOrient = sheet::DataPilotFieldOrientation_PAGE; break;
+ case TYPE_COL: eOrient = sheet::DataPilotFieldOrientation_COLUMN; break;
+ case TYPE_ROW: eOrient = sheet::DataPilotFieldOrientation_ROW; break;
+ case TYPE_DATA: eOrient = sheet::DataPilotFieldOrientation_DATA; break;
+ case TYPE_SELECT: eOrient = sheet::DataPilotFieldOrientation_HIDDEN; break;
+ }
+ bAllowed = ScDPObject::IsOrientationAllowed( (USHORT)eOrient, pData->mnFlags );
+ }
+ return bAllowed;
+}
//----------------------------------------------------------------------------
diff --git a/sc/source/ui/inc/pvlaydlg.hxx b/sc/source/ui/inc/pvlaydlg.hxx
index 382d5e803704..0b1be1300040 100644
--- a/sc/source/ui/inc/pvlaydlg.hxx
+++ b/sc/source/ui/inc/pvlaydlg.hxx
@@ -193,6 +193,7 @@ private:
Point DlgPos2WndPos ( const Point& rPt, Window& rWnd );
ScDPLabelData* GetLabelData ( SCsCOL nCol, size_t* pPos = NULL );
String GetLabelString ( SCsCOL nCol );
+ bool IsOrientationAllowed( SCsCOL nCol, ScDPFieldType eType );
String GetFuncString ( USHORT& rFuncMask, BOOL bIsValue = TRUE );
BOOL Contains ( ScDPFuncDataVec* pArr, SCsCOL nCol, size_t& nAt );
void Remove ( ScDPFuncDataVec* pArr, size_t nAt );
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 9508148c6228..efb000579fdf 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -144,7 +144,6 @@ private:
ScNavigatorSettings* pNavSettings;
// used in first Activate
- ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue > aPendingUserData;
BOOL bFirstActivate;
BOOL bActiveDrawSh;
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index 2448f3d4d6d4..3574426f731b 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -305,10 +305,17 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove )
aPosRect, nOrient, nDimPos );
UpdateDragRect( bHasRange && bMove, aPosRect );
+ BOOL bIsDataLayout;
+ sal_Int32 nDimFlags = 0;
+ String aDimName = pDragDPObj->GetDimName( nDPField, bIsDataLayout, &nDimFlags );
+ bool bAllowed = !bHasRange || ScDPObject::IsOrientationAllowed( nOrient, nDimFlags );
+
if (bMove) // set mouse pointer
{
PointerStyle ePointer = POINTER_PIVOT_DELETE;
- if ( bHasRange )
+ if ( !bAllowed )
+ ePointer = POINTER_NOTALLOWED;
+ else if ( bHasRange )
switch (nOrient)
{
case sheet::DataPilotFieldOrientation_COLUMN: ePointer = POINTER_PIVOT_COL; break;
@@ -323,15 +330,13 @@ void ScGridWindow::DPTestMouse( const MouseEvent& rMEvt, BOOL bMove )
if (!bHasRange)
nOrient = sheet::DataPilotFieldOrientation_HIDDEN;
- BOOL bIsDataLayout;
- String aDimName = pDragDPObj->GetDimName( nDPField, bIsDataLayout );
if ( bIsDataLayout && ( nOrient != sheet::DataPilotFieldOrientation_COLUMN &&
nOrient != sheet::DataPilotFieldOrientation_ROW ) )
{
// removing data layout is not allowed
pViewData->GetView()->ErrorMessage(STR_PIVOT_MOVENOTALLOWED);
}
- else
+ else if ( bAllowed )
{
ScDPSaveData aSaveData( *pDragDPObj->GetSaveData() );
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index 81a96cf57b5f..d12c5492f883 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -103,7 +103,7 @@ SFX_IMPL_INTERFACE( ScPreviewShell, SfxViewShell, ScResId(SCSTR_PREVIEWSHELL) )
SFX_POPUPMENU_REGISTRATION(ScResId(RID_POPUP_PREVIEW));
}
-SFX_IMPL_VIEWFACTORY( ScPreviewShell, ScResId(STR_NONAME) )
+SFX_IMPL_NAMED_VIEWFACTORY( ScPreviewShell, "PrintPreview" )
{
SFX_VIEW_REGISTRATION(ScDocShell);
}
diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx
index 1733cf2e19b5..2fc2bba072d9 100644
--- a/sc/source/ui/view/tabvwsh.cxx
+++ b/sc/source/ui/view/tabvwsh.cxx
@@ -102,7 +102,7 @@ SFX_IMPL_INTERFACE(ScTabViewShell,SfxViewShell,ScResId(SCSTR_TABVIEWSHELL))
//-->Added by PengYunQuan for Validity Cell Range Picker
}
-SFX_IMPL_VIEWFACTORY( ScTabViewShell, ScResId(STR_NONAME) )
+SFX_IMPL_NAMED_VIEWFACTORY( ScTabViewShell, "Default" )
{
SFX_VIEW_REGISTRATION(ScDocShell);
}
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 769a840dab63..bcff0f699b5e 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -173,13 +173,6 @@ void __EXPORT ScTabViewShell::Activate(BOOL bMDI)
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_NAVIGATOR_UPDATEALL ) );
bFirstActivate = FALSE;
- if ( aPendingUserData.hasElements() )
- {
- // #89897# read user data from print preview now, after ctor
- DoReadUserDataSequence( aPendingUserData );
- aPendingUserData.realloc( 0 );
- }
-
// #116278# ReadExtOptions (view settings from Excel import) must also be done
// after the ctor, because of the potential calls to Window::Show.
// Even after the fix for #104887# (Window::Show no longer notifies the access
@@ -1876,7 +1869,6 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame,
if ( pOldSh && pOldSh->ISA( ScPreviewShell ) )
{
ScPreviewShell* pPreviewShell = ((ScPreviewShell*)pOldSh);
- aPendingUserData = pPreviewShell->GetSourceData(); // used in Activate
nForceDesignMode = pPreviewShell->GetSourceDesignMode();
}