summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Glazunov <vg@openoffice.org>2010-10-14 14:49:30 +0200
committerVladimir Glazunov <vg@openoffice.org>2010-10-14 14:49:30 +0200
commit5d492687a9dab2ec72ca7793c729d58571f2e697 (patch)
treea850d786691c21eebfc0e4058c562289ed69562c
parent0cb7e37ccc3c2c2efa4419ecb904cf7d099ee629 (diff)
parentbddea2c2376de5a1fa20df5776a7fddb2c8dd103 (diff)
CWS-TOOLING: integrate CWS impress201
Notes
split repo tag: impress_ooo/DEV300_m90
-rwxr-xr-xsd/inc/shapelist.hxx2
-rwxr-xr-xsd/source/core/shapelist.cxx38
-rwxr-xr-x[-rw-r--r--]sd/source/core/stlsheet.cxx41
-rwxr-xr-xsd/source/ui/accessibility/AccessibleTreeNode.cxx21
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/tpoption.src8
-rwxr-xr-xsd/source/ui/func/fupage.cxx7
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/AccessibleTreeNode.hxx24
-rwxr-xr-xsd/source/ui/inc/OutlineViewShell.hxx4
-rwxr-xr-x[-rw-r--r--]sd/source/ui/inc/SlideViewShell.hxx4
-rwxr-xr-xsd/source/ui/inc/taskpane/ControlContainer.hxx14
-rwxr-xr-xsd/source/ui/inc/taskpane/ScrollPanel.hxx4
-rwxr-xr-xsd/source/ui/inc/taskpane/SubToolPanel.hxx1
-rw-r--r--sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx3
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/ControlContainer.cxx55
-rwxr-xr-xsd/source/ui/toolpanel/ScrollPanel.cxx19
-rwxr-xr-xsd/source/ui/toolpanel/SubToolPanel.cxx29
-rwxr-xr-xsd/source/ui/toolpanel/ToolPanelViewShell.cxx12
-rwxr-xr-xsd/source/ui/view/ViewShellManager.cxx5
-rwxr-xr-xsd/source/ui/view/outlnvsh.cxx97
19 files changed, 32 insertions, 356 deletions
diff --git a/sd/inc/shapelist.hxx b/sd/inc/shapelist.hxx
index 1b87a6a9e10f..4b6ffb21d496 100755
--- a/sd/inc/shapelist.hxx
+++ b/sd/inc/shapelist.hxx
@@ -47,8 +47,6 @@ namespace sd
a pointer to the next shape in list or 0*/
SdrObject* removeShape( SdrObject& rObject );
- void replaceShape( SdrObject& rOldObject, SdrObject& rNewObject );
-
/** removes all shapes from this list */
void clear();
diff --git a/sd/source/core/shapelist.cxx b/sd/source/core/shapelist.cxx
index bf5b98471b53..4bb14b642f79 100755
--- a/sd/source/core/shapelist.cxx
+++ b/sd/source/core/shapelist.cxx
@@ -84,44 +84,6 @@ SdrObject* ShapeList::removeShape( SdrObject& rObject )
return 0;
}
-void ShapeList::replaceShape( SdrObject& rOldObject, SdrObject& rNewObject )
-{
- if( &rOldObject == &rNewObject )
- return;
-
- ListImpl::iterator aIter( std::find( maShapeList.begin(), maShapeList.end(), &rNewObject ) );
- if( aIter != maShapeList.end() )
- {
- bool bIterErased = aIter == maIter;
- (*aIter)->RemoveObjectUser(*this);
- aIter = maShapeList.erase( aIter );
-
- if( bIterErased )
- maIter = aIter;
- }
-
- aIter = std::find( maShapeList.begin(), maShapeList.end(), &rOldObject );
- if( aIter != maShapeList.end() )
- {
- bool bIterErased = aIter == maIter;
-
- ListImpl::iterator iNew( maShapeList.insert( aIter, &rNewObject ) );
-
- (*aIter)->RemoveObjectUser(*this);
- aIter = maShapeList.erase( aIter );
-
- rNewObject.AddObjectUser( *this );
-
- if( bIterErased )
- maIter = iNew;
- }
- else
- {
- DBG_ERROR("sd::ShapeList::replaceShape(), given shape not part of list!");
- addShape( rNewObject );
- }
-}
-
/** removes all shapes from this list
NOTE: iterators will become invalid */
void ShapeList::clear()
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 7e090d0e9a98..51d1375c9984 100644..100755
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -1003,13 +1003,11 @@ void SAL_CALL SdStyleSheet::setName( const OUString& rName ) throw(RuntimeExcep
{
OGuard aGuard( Application::GetSolarMutex() );
throwIfDisposed();
- if( IsUserDefined() )
+
+ if( SetName( rName ) )
{
- if( SetName( rName ) )
- {
- msApiName = rName;
- Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
- }
+ msApiName = rName;
+ Broadcast(SfxSimpleHint(SFX_HINT_DATACHANGED));
}
}
@@ -1056,28 +1054,25 @@ void SAL_CALL SdStyleSheet::setParentStyle( const OUString& rParentName ) throw
OGuard aGuard( Application::GetSolarMutex() );
throwIfDisposed();
- if( IsUserDefined() )
+ if( rParentName.getLength() )
{
- if( rParentName.getLength() )
- {
- const SfxStyles& rStyles = mxPool->GetStyles();
+ const SfxStyles& rStyles = mxPool->GetStyles();
- for( SfxStyles::const_iterator iter( rStyles.begin() ); iter != rStyles.end(); iter++ )
+ for( SfxStyles::const_iterator iter( rStyles.begin() ); iter != rStyles.end(); iter++ )
+ {
+ SdStyleSheet* pStyle = static_cast< SdStyleSheet* >( (*iter).get() );
+ if( pStyle && (pStyle->nFamily == nFamily) && (pStyle->msApiName == rParentName) )
{
- SdStyleSheet* pStyle = static_cast< SdStyleSheet* >( (*iter).get() );
- if( pStyle && (pStyle->nFamily == nFamily) && (pStyle->msApiName == rParentName) )
- {
- if( pStyle != this )
- SetParent( pStyle->GetName() );
- return;
- }
+ if( pStyle != this )
+ SetParent( pStyle->GetName() );
+ return;
}
- throw NoSuchElementException();
- }
- else
- {
- SetParent( rParentName );
}
+ throw NoSuchElementException();
+ }
+ else
+ {
+ SetParent( rParentName );
}
}
diff --git a/sd/source/ui/accessibility/AccessibleTreeNode.cxx b/sd/source/ui/accessibility/AccessibleTreeNode.cxx
index 5c7462581d0b..ced9852b74c3 100755
--- a/sd/source/ui/accessibility/AccessibleTreeNode.cxx
+++ b/sd/source/ui/accessibility/AccessibleTreeNode.cxx
@@ -82,27 +82,6 @@ AccessibleTreeNode::AccessibleTreeNode(
-AccessibleTreeNode::AccessibleTreeNode(
- const Reference<XAccessible>& rxParent,
- ::sd::toolpanel::TreeNode& rNode,
- const OUString& rsName,
- const OUString& rsDescription,
- const sal_Int16 eRole)
- : AccessibleTreeNodeBase(MutexOwner::maMutex),
- mxParent(rxParent),
- mrTreeNode(rNode),
- mrStateSet(new ::utl::AccessibleStateSetHelper()),
- msName(rsName),
- msDescription(rsDescription),
- meRole(eRole),
- mnClientId(0)
-{
- CommonConstructor();
-}
-
-
-
-
void AccessibleTreeNode::CommonConstructor (void)
{
UpdateStateSet();
diff --git a/sd/source/ui/dlg/tpoption.src b/sd/source/ui/dlg/tpoption.src
index 96149d4e6a1f..639f7524c6d3 100644..100755
--- a/sd/source/ui/dlg/tpoption.src
+++ b/sd/source/ui/dlg/tpoption.src
@@ -46,28 +46,28 @@ TabPage TP_OPTIONS_CONTENTS
CheckBox CBX_RULER
{
Pos = MAP_APPFONT ( 12 , 83 - 69 ) ;
- Size = MAP_APPFONT ( 134 , 10 ) ;
+ Size = MAP_APPFONT ( 242 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~Rulers visible" ;
};
CheckBox CBX_HELPLINES
{
Pos = MAP_APPFONT ( 12 , 97 - 69 ) ;
- Size = MAP_APPFONT ( 134 , 10 ) ;
+ Size = MAP_APPFONT ( 242 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~Guides when moving" ;
};
CheckBox CBX_HANDLES_BEZIER
{
Pos = MAP_APPFONT ( 12 , 111 - 69 ) ;
- Size = MAP_APPFONT ( 134 , 10 ) ;
+ Size = MAP_APPFONT ( 242 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~All control points in Bézier editor" ;
};
CheckBox CBX_MOVE_OUTLINE
{
Pos = MAP_APPFONT ( 12 , 125 - 69 ) ;
- Size = MAP_APPFONT ( 134 , 10 ) ;
+ Size = MAP_APPFONT ( 242 , 10 ) ;
TabStop = TRUE ;
Text [ en-US ] = "~Contour of each individual object" ;
};
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 3dea67412fac..d4e2fcd8083f 100755
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -318,7 +318,12 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
pTempSet.reset( new SfxItemSet( mpDoc->GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST, 0) );
pTempSet->Put( XFillStyleItem( XFILL_BITMAP ) );
- pTempSet->Put( XFillBitmapItem( String(RTL_CONSTASCII_USTRINGPARAM("background")), XOBitmap(aGraphic) ) );
+
+ // MigrateItemSet makes sure the XFillBitmapItem will have a unique name
+ SfxItemSet aMigrateSet( mpDoc->GetPool(), XATTR_FILLBITMAP, XATTR_FILLBITMAP );
+ aMigrateSet.Put( XFillBitmapItem( String(RTL_CONSTASCII_USTRINGPARAM("background")), XOBitmap(aGraphic) ) );
+ mpDoc->MigrateItemSet( &aMigrateSet, pTempSet.get(), NULL );
+
pTempSet->Put( XFillBmpStretchItem( TRUE ));
pTempSet->Put( XFillBmpTileItem( FALSE ));
}
diff --git a/sd/source/ui/inc/AccessibleTreeNode.hxx b/sd/source/ui/inc/AccessibleTreeNode.hxx
index 2c1031921009..ce9730936659 100644..100755
--- a/sd/source/ui/inc/AccessibleTreeNode.hxx
+++ b/sd/source/ui/inc/AccessibleTreeNode.hxx
@@ -96,30 +96,6 @@ public:
const ::rtl::OUString& rsDescription,
sal_Int16 eRole);
- /** Use this variant of the constructor when the accessible parent is
- non-standard.
- @param rxParent
- The accessible parent that will be returned by
- getAccessibleParent() and that is used for computing relative
- coordinates.
- @param rNode
- The TreeNode to make accessible.
- @param rsName
- The accessible name that will be returned by getAccessibleName().
- @param rsDescription
- The accessible description that will be returned by
- getAccessibleDescription().
- @param eRole
- The role that will be returned by getAccessibleRole().
- */
- AccessibleTreeNode(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible> & rxParent,
- ::sd::toolpanel::TreeNode& rNode,
- const ::rtl::OUString& rsName,
- const ::rtl::OUString& rsDescription,
- sal_Int16 eRole);
-
void FireAccessibleEvent (
short nEventId,
const ::com::sun::star::uno::Any& rOldValue,
diff --git a/sd/source/ui/inc/OutlineViewShell.hxx b/sd/source/ui/inc/OutlineViewShell.hxx
index 6c3848f39926..dce55f5d33f7 100755
--- a/sd/source/ui/inc/OutlineViewShell.hxx
+++ b/sd/source/ui/inc/OutlineViewShell.hxx
@@ -96,10 +96,6 @@ public:
/// inherited from sd::ViewShell
virtual SdPage* getCurrentPage() const;
- /** Return a string that describes the currently selected pages.
- */
- String GetPageRangeString (void);
-
void ExecCtrl(SfxRequest &rReq);
void GetCtrlState(SfxItemSet &rSet);
void GetMenuState(SfxItemSet &rSet);
diff --git a/sd/source/ui/inc/SlideViewShell.hxx b/sd/source/ui/inc/SlideViewShell.hxx
index ef8ab20fded3..7cb9d27bde18 100644..100755
--- a/sd/source/ui/inc/SlideViewShell.hxx
+++ b/sd/source/ui/inc/SlideViewShell.hxx
@@ -101,10 +101,6 @@ public:
*/
virtual SdPage* getCurrentPage() const;
- /** Return a string that describes the currently selected pages.
- */
- String GetPageRangeString (void);
-
void ExecCtrl(SfxRequest &rReq);
void GetCtrlState(SfxItemSet &rSet);
void GetMenuState(SfxItemSet &rSet);
diff --git a/sd/source/ui/inc/taskpane/ControlContainer.hxx b/sd/source/ui/inc/taskpane/ControlContainer.hxx
index 9c1652f05887..c4df3cfe4dc6 100755
--- a/sd/source/ui/inc/taskpane/ControlContainer.hxx
+++ b/sd/source/ui/inc/taskpane/ControlContainer.hxx
@@ -105,8 +105,6 @@ public:
*/
sal_uInt32 GetControlIndex (TreeNode* pControl) const;
- sal_uInt32 GetActiveControlIndex (void) const;
-
/** Return the number of controls in the container.
*/
sal_uInt32 GetControlCount (void) const;
@@ -164,18 +162,6 @@ public:
bool bIncludeHidden=false,
bool bCycle=false) const;
- /** Return the index of the first control.
- @param bIncludeHidden
- When <FALSE/> then the first visible control is returned.
- */
- sal_uInt32 GetFirstIndex (bool bIncludeHidden=false);
-
- /** Return the index of the last control.
- @param bIncludeHidden
- When <FALSE/> then the last visible control is returned.
- */
- sal_uInt32 GetLastIndex (bool bIncludeHidden=false);
-
void SetMultiSelection (bool bFlag);
/** This is method is called when the list of controls has changed,
diff --git a/sd/source/ui/inc/taskpane/ScrollPanel.hxx b/sd/source/ui/inc/taskpane/ScrollPanel.hxx
index f820edc69f09..f04af6f47168 100755
--- a/sd/source/ui/inc/taskpane/ScrollPanel.hxx
+++ b/sd/source/ui/inc/taskpane/ScrollPanel.hxx
@@ -56,10 +56,6 @@ class ScrollPanel
public TreeNode
{
public:
- /** Create a new sub tool panel with the given window as its
- parent. This will usually be a child window.
- */
- ScrollPanel (TreeNode* pParent);
/** Create a new scroll panel which itself is the root of a TreeNode hierarchy
parent. This will usually be a child window.
*/
diff --git a/sd/source/ui/inc/taskpane/SubToolPanel.hxx b/sd/source/ui/inc/taskpane/SubToolPanel.hxx
index 669c51cfcfad..468fd079f565 100755
--- a/sd/source/ui/inc/taskpane/SubToolPanel.hxx
+++ b/sd/source/ui/inc/taskpane/SubToolPanel.hxx
@@ -64,7 +64,6 @@ public:
/** Create a new sub tool panel with the given window as its
parent. This will usually be a child window.
*/
- SubToolPanel (TreeNode* pParent);
SubToolPanel (Window& i_rParentWindow);
virtual ~SubToolPanel (void);
diff --git a/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx b/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx
index 5bd0cd877803..fb9d31aa04a1 100644
--- a/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx
+++ b/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx
@@ -95,9 +95,6 @@ public:
virtual SdPage* GetActualPage (void);
virtual SdPage* getCurrentPage (void) const;
- void Execute (SfxRequest& rRequest);
- void GetState (SfxItemSet& rItemSet);
-
virtual void ArrangeGUIElements (void);
TaskPaneShellManager& GetSubShellManager (void) const;
diff --git a/sd/source/ui/toolpanel/ControlContainer.cxx b/sd/source/ui/toolpanel/ControlContainer.cxx
index cb8b6c41f5c3..78e4125b024d 100644..100755
--- a/sd/source/ui/toolpanel/ControlContainer.cxx
+++ b/sd/source/ui/toolpanel/ControlContainer.cxx
@@ -218,14 +218,6 @@ sal_uInt32 ControlContainer::GetControlIndex (TreeNode* pControlToExpand) const
-sal_uInt32 ControlContainer::GetActiveControlIndex (void) const
-{
- return mnActiveControlIndex;
-}
-
-
-
-
void ControlContainer::ListHasChanged (void)
{
}
@@ -375,53 +367,6 @@ sal_uInt32 ControlContainer::GetNextIndex (
-sal_uInt32 ControlContainer::GetFirstIndex (bool bIncludeHidden)
-{
- sal_uInt32 nIndex = 0;
-
- if (maControlList.size() == 0)
- {
- // The list is empty so there is no first element.
- nIndex = maControlList.size();
- }
- else if ( ! bIncludeHidden
- && ! maControlList[nIndex]->GetWindow()->IsVisible())
- {
- // The first element is not visible. Go the next visible one.
- nIndex = GetNextIndex (nIndex, bIncludeHidden, false);
- }
-
- return nIndex;
-}
-
-
-
-
-sal_uInt32 ControlContainer::GetLastIndex (bool bIncludeHidden)
-{
- sal_uInt32 nIndex;
-
- if (maControlList.size() == 0)
- {
- // The list is empty so there is no last element.
- nIndex = maControlList.size();
- }
- else
- {
- nIndex = maControlList.size() - 1;
- if ( ! bIncludeHidden
- && ! maControlList[nIndex]->GetWindow()->IsVisible())
- {
- // The last element is not visible. Go the previous visible one.
- nIndex = GetPreviousIndex (nIndex, bIncludeHidden, false);
- }
- }
- return nIndex;
-}
-
-
-
-
void ControlContainer::SetMultiSelection (bool bFlag)
{
mbMultiSelection = bFlag;
diff --git a/sd/source/ui/toolpanel/ScrollPanel.cxx b/sd/source/ui/toolpanel/ScrollPanel.cxx
index 6b10ed889424..33fd325313a3 100755
--- a/sd/source/ui/toolpanel/ScrollPanel.cxx
+++ b/sd/source/ui/toolpanel/ScrollPanel.cxx
@@ -41,25 +41,6 @@
namespace sd { namespace toolpanel {
ScrollPanel::ScrollPanel (
- TreeNode* pParent)
- : Control (pParent->GetWindow(), WB_DIALOGCONTROL),
- TreeNode(pParent),
- maScrollWindow(this, WB_DIALOGCONTROL),
- maVerticalScrollBar(this, WB_VERT),
- maHorizontalScrollBar(this, WB_HORZ),
- maScrollBarFiller(this),
- maScrollWindowFiller(&maScrollWindow),
- mbIsRearrangePending(true),
- mbIsLayoutPending(true),
- mnChildrenWidth(0),
- mnVerticalBorder(2),
- mnVerticalGap(3),
- mnHorizontalBorder(2)
-{
- Construct();
-}
-
-ScrollPanel::ScrollPanel (
::Window& i_rParentWindow)
: Control (&i_rParentWindow, WB_DIALOGCONTROL),
TreeNode(NULL),
diff --git a/sd/source/ui/toolpanel/SubToolPanel.cxx b/sd/source/ui/toolpanel/SubToolPanel.cxx
index 73783b0f0a41..4e85d8c9fec9 100755
--- a/sd/source/ui/toolpanel/SubToolPanel.cxx
+++ b/sd/source/ui/toolpanel/SubToolPanel.cxx
@@ -42,35 +42,6 @@ namespace sd { namespace toolpanel {
SubToolPanel::SubToolPanel (
- TreeNode* pParent)
- : Control (pParent->GetWindow(), WB_DIALOGCONTROL),
- TreeNode(pParent),
- maWindowFiller(this),
- mbIsRearrangePending(true),
- mbIsLayoutPending(true),
- mnChildrenWidth(0),
- mnVerticalBorder(0),
- mnVerticalGap(3),
- mnHorizontalBorder(2)
-{
- SetAccessibleName (
- ::rtl::OUString::createFromAscii("Sub Task Panel"));
- mpControlContainer->SetMultiSelection (true);
-
- SetBorderStyle (WINDOW_BORDER_NORMAL);
- SetMapMode (MapMode(MAP_PIXEL));
-
- // To reduce flickering during repaints make the container windows
- // transparent and rely on their children to paint the whole area.
- SetBackground(Wallpaper());
- maWindowFiller.SetBackground(
- Application::GetSettings().GetStyleSettings().GetWindowColor());
-}
-
-
-
-
-SubToolPanel::SubToolPanel (
Window& i_rParentWindow)
: Control (&i_rParentWindow, WB_DIALOGCONTROL),
TreeNode(NULL),
diff --git a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
index f193b2ece851..eb465789e7dc 100755
--- a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
+++ b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
@@ -607,18 +607,6 @@ SdPage* ToolPanelViewShell::getCurrentPage() const
}
// ---------------------------------------------------------------------------------------------------------------------
-void ToolPanelViewShell::Execute( SfxRequest& )
-{
- OSL_ENSURE( false, "ToolPanelViewShell::Execute: not to be called! (right?)" );
-}
-
-// ---------------------------------------------------------------------------------------------------------------------
-void ToolPanelViewShell::GetState( SfxItemSet& )
-{
- OSL_ENSURE( false, "ToolPanelViewShell::GetState: not to be called! (right?)" );
-}
-
-// ---------------------------------------------------------------------------------------------------------------------
TaskPaneShellManager& ToolPanelViewShell::GetSubShellManager() const
{
return *mpSubShellManager.get();
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index c25c0f11270a..c1ffcb884cd1 100755
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -228,8 +228,10 @@ private:
DECL_LINK(WindowEventHandler, VclWindowEvent*);
+#ifdef VERBOSE
void DumpShellStack (const ShellStack& rStack);
void DumpSfxShellStack (void);
+#endif
/** To be called before a shell is taken fom the SFX shell stack. This
method deactivates an active text editing to avoid problems with
@@ -1319,6 +1321,7 @@ void ViewShellManager::Implementation::Shutdown (void)
+#ifdef VERBOSE
void ViewShellManager::Implementation::DumpShellStack (const ShellStack& rStack)
{
ShellStack::const_reverse_iterator iEntry;
@@ -1345,7 +1348,7 @@ void ViewShellManager::Implementation::DumpSfxShellStack (void)
aSfxShellStack.push_back(mrBase.GetSubShell(nIndex));
DumpShellStack(aSfxShellStack);
}
-
+#endif
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 955a9d167b49..d83abefbea47 100755
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -1775,103 +1775,6 @@ SdPage* OutlineViewShell::GetActualPage()
}
-/*************************************************************************
-|*
-|* Retrieve range of marked pages
-|*
-\************************************************************************/
-
-String OutlineViewShell::GetPageRangeString()
-{
- ::sd::Window* pWin = GetActiveWindow();
- OutlinerView* pActiveView = pOlView->GetViewByWindow(pWin);
- ::Outliner* pOutl = pActiveView->GetOutliner();
- List* pSelList = (List*)pActiveView->CreateSelectionList();
- Paragraph* pPara = (Paragraph*)pSelList->First();
-
- String aStrPageRange;
- BOOL bFirstPageNo = TRUE;
- BOOL bOpenRange = FALSE;
- USHORT nLastPage = 0;
- USHORT nLastUsedPage = (USHORT)-1;
-
- USHORT nPageCount = 0;
- for( USHORT n = 0; n< GetDoc()->GetPageCount(); n++ )
- if( ( (SdPage*)GetDoc()->GetPage( n ) )->GetPageKind() == PK_STANDARD )
- nPageCount++;
-
- while ( pPara )
- {
- if ( !pOutl->HasParaFlag(pPara, PARAFLAG_ISPAGE) )
- {
- pPara = pOlView->GetPrevTitle(pPara);
- }
- USHORT nPageToSelect = 0;
- while(pPara)
- {
- pPara = pOlView->GetPrevTitle(pPara);
- if (pPara)
- nPageToSelect++;
- }
-
- if( bFirstPageNo )
- {
- bFirstPageNo = FALSE;
- aStrPageRange = String::CreateFromInt32( sal_Int32( nPageToSelect+1 ) );
- nLastUsedPage = nPageToSelect;
- nPageCount--;
- }
- else
- {
- if( nPageToSelect != nLastPage )
- {
- if( nPageToSelect == nLastPage+1 )
- {
- bOpenRange = TRUE;
- nPageCount--;
- }
- else
- {
- if( bOpenRange )
- {
- if( nLastPage == nLastUsedPage+1 )
- aStrPageRange.Append( sal_Unicode(',') );
- else
- aStrPageRange.Append( sal_Unicode('-') );
-
- aStrPageRange.Append( String::CreateFromInt32( sal_Int32( nLastPage+1 ) ) );
- }
- aStrPageRange.Append( sal_Unicode(',') );
- aStrPageRange.Append( String::CreateFromInt32( sal_Int32( nPageToSelect+1 ) ) );
- nLastUsedPage = nPageToSelect;
- bOpenRange = FALSE;
- nPageCount--;
- }
- }
- }
-
- nLastPage = nPageToSelect;
- pPara = (Paragraph*)pSelList->Next();
- }
-
- if( bOpenRange )
- {
- if( nLastPage == nLastUsedPage+1 )
- aStrPageRange.Append( sal_Unicode(',') );
- else
- aStrPageRange.Append( sal_Unicode('-') );
-
- aStrPageRange.Append( String::CreateFromInt32( sal_Int32( nLastPage+1 ) ) );
- }
-
- if( nPageCount == 0 )
- aStrPageRange.Erase();
-
- delete pSelList; // die wurde extra fuer uns erzeugt
-
- return aStrPageRange;
-}
-
void OutlineViewShell::UpdatePreview( SdPage* pPage, BOOL )
{
const bool bNewPage = pPage != pLastPage;