diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-08-23 15:11:16 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-08-23 15:11:16 +0200 |
commit | 0553d10867217e30a86c88c17ccb15a06030ce07 (patch) | |
tree | 4d85a5a78ea132f8fd53b26ce93e94ae30dad1f9 /sd/source/ui/toolpanel | |
parent | d0ac8f1e7866c637be15f081b59ef456aacb954a (diff) |
recreated tag OOO_BUILD_3_2_98_1 which had these commits:
commit c0de36f21ef8f0afd7667f53a5d97dbc264a1cfb (tag: refs/tags/OOO_BUILD_3_2_98_1)
Author: Petr Mladek <pmladek@walk.suse.cz>
Date: Wed Sep 15 19:03:26 2010 +0200
Release ooo-build-3.2.98.1, tag OOO_BUILD_3_2_98_1 (3.3-alpha1)
commit e31a45314a5a2f1e7e2bbea4a2bb6eca7beb7962
Merge: 7234327 29a7259
Author: Jan Holesovsky <kendy@suse.cz>
Date: Wed Sep 8 11:34:03 2010 +0200
Merge commit 'ooo/OOO330_m7'
commit 29a72592b0046498a30e87a7beedae4d29161f9b (tag: refs/tags/ooo/OOO330_m7)
Merge: 10146e0 6b04480
Author: Kurt Zenker <kz@openoffice.org>
Date: Tue Aug 31 15:10:03 2010 +0200
CWS-TOOLING: integrate CWS impress197
commit 6b04480dd88a5bd048d12874dc8c07630670c239
Author: sj <sj@openoffice.org>
Date: Mon Aug 9 14:11:58 2010 +0200
impress197: #163250# fixed string handling, improved polygon splitting
sd/source/filter/ppt/propread.cxx | 128 ++++++++++++++++++++++++-------------
1 files changed, 83 insertions(+), 45 deletions(-)
commit a37d85f979d1616b158c918762821ed82b1e0691
Merge: 1380a03 d766efe
Author: Christian Lippka <christian.lippka@sun.com>
Date: Fri Aug 6 14:53:07 2010 +0200
merge
commit 1380a03aaf7464643eb99de1488ab5b372663ccd
Author: Christian Lippka <christian.lippka@sun.com>
Date: Wed Aug 4 10:48:35 2010 +0200
#i113603# only change layout shape size on init or of user call is set
sd/source/core/sdpage.cxx | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit d766efe9f601a65cd22b46e0f4131d9acd74b1a8
Author: Andre Fischer<andre.f.fischer <Andre Fischer<andre.f.fischer@oracle.com>
Date: Thu Jan 1 00:00:00 1970 +0000
impress197: #i112420# Create accessibility object of ToolPanelViewShell in constructor.
sd/source/ui/toolpanel/ToolPanelViewShell.cxx | 17 +++++++++++++++--
sd/source/ui/view/sdwindow.cxx | 4 ++--
2 files changed, 17 insertions(+), 4 deletions(-)
Notes
Notes:
split repo tag: impress_OOO_BUILD_3_2_98_1
Diffstat (limited to 'sd/source/ui/toolpanel')
65 files changed, 336 insertions, 323 deletions
diff --git a/sd/source/ui/toolpanel/ConstrainedIterator.cxx b/sd/source/ui/toolpanel/ConstrainedIterator.cxx index 261017ee3e1d..3eaa9ba76741 100644 --- a/sd/source/ui/toolpanel/ConstrainedIterator.cxx +++ b/sd/source/ui/toolpanel/ConstrainedIterator.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 @@ -39,7 +39,7 @@ namespace sd { namespace toolpanel { template <class Container> -ConstrainedIterator<Container>::value_type& +ConstrainedIterator<Container>::value_type& ConstrainedIterator<Container>::operator* (void) { return *maIterator; @@ -49,7 +49,7 @@ ConstrainedIterator<Container>::value_type& template <class Container> -const ConstrainedIterator<Container>::value_type& +const ConstrainedIterator<Container>::value_type& ConstrainedIterator<Container>::operator* (void) const { @@ -60,7 +60,7 @@ const ConstrainedIterator<Container>::value_type& template <class Container> -ConstrainedIterator<Container>::value_type& +ConstrainedIterator<Container>::value_type& ConstrainedIterator<Container>::operator-> (void) { return *maIterator; @@ -70,7 +70,7 @@ ConstrainedIterator<Container>::value_type& template <class Container> -const ConstrainedIterator<Container>::value_type& +const ConstrainedIterator<Container>::value_type& ConstrainedIterator<Container>::operator-> (void) const { diff --git a/sd/source/ui/toolpanel/ConstrainedIterator.hxx b/sd/source/ui/toolpanel/ConstrainedIterator.hxx index 8f81ba89ebe7..90b615006c53 100644 --- a/sd/source/ui/toolpanel/ConstrainedIterator.hxx +++ b/sd/source/ui/toolpanel/ConstrainedIterator.hxx @@ -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 @@ -38,7 +38,7 @@ class Constraint { public: virtual bool operator() ( - const Container& rContainer, + const Container& rContainer, const Container::iterator& rIterator) const = 0; }; @@ -61,10 +61,10 @@ public: ConstrainedIterator (void); ConstrainedIterator ( - const Container& rContainer, + const Container& rContainer, const Container::iterator& rIterator); ConstrainedIterator ( - const Container& rContainer, + const Container& rContainer, const Container::iterator& rIterator, const Constraint<Container>& pConstraint); ConstrainedIterator ( diff --git a/sd/source/ui/toolpanel/ControlContainer.cxx b/sd/source/ui/toolpanel/ControlContainer.cxx index cb8b6c41f5c3..e86660bdc3f0 100644 --- a/sd/source/ui/toolpanel/ControlContainer.cxx +++ b/sd/source/ui/toolpanel/ControlContainer.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 @@ -102,7 +102,7 @@ void ControlContainer::SetExpansionState ( ExpansionState aState) { ::osl::MutexGuard aGuard (maMutex); - + bool bResizeNecessary (false); if (mbMultiSelection) @@ -252,7 +252,7 @@ sal_uInt32 ControlContainer::GetVisibleControlCount (void) const if (maControlList[nIndex]->GetWindow()->IsVisible()) nCount += 1; } - + return nCount; } @@ -316,7 +316,7 @@ sal_uInt32 ControlContainer::GetPreviousIndex ( // The candidate does not meet our constraints so do one more loop. } - + return nCandidate; } @@ -368,7 +368,7 @@ sal_uInt32 ControlContainer::GetNextIndex ( // The candidate does not meet our constraints so do one more loop. } - + return nCandidate; } diff --git a/sd/source/ui/toolpanel/ControlContainerDescriptor.hxx b/sd/source/ui/toolpanel/ControlContainerDescriptor.hxx index 3557200880d2..3375381a65b7 100644 --- a/sd/source/ui/toolpanel/ControlContainerDescriptor.hxx +++ b/sd/source/ui/toolpanel/ControlContainerDescriptor.hxx @@ -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 @@ -66,12 +66,12 @@ public: @param eType Type of the title bar. This specifies how the title bar will be formated. For more information see TitleBar. - + */ ControlContainerDescriptor ( ControlContainer& rContainer, ::Window* pParent, - ::std::auto_ptr<ILayoutableWindow> pControl, + ::std::auto_ptr<ILayoutableWindow> pControl, const String& rTitle, TitleBar::TitleBarType eType); diff --git a/sd/source/ui/toolpanel/ControlList.hxx b/sd/source/ui/toolpanel/ControlList.hxx index 623a9567215f..97f746e6b37a 100644 --- a/sd/source/ui/toolpanel/ControlList.hxx +++ b/sd/source/ui/toolpanel/ControlList.hxx @@ -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 diff --git a/sd/source/ui/toolpanel/LayoutMenu.cxx b/sd/source/ui/toolpanel/LayoutMenu.cxx index ec4eb1e43d4d..926ae1b9bb8e 100755 --- a/sd/source/ui/toolpanel/LayoutMenu.cxx +++ b/sd/source/ui/toolpanel/LayoutMenu.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 @@ -111,7 +111,7 @@ private: }; -SFX_IMPL_INTERFACE(LayoutMenu, SfxShell, +SFX_IMPL_INTERFACE(LayoutMenu, SfxShell, SdResId(STR_TASKPANELAYOUTMENU)) { SFX_POPUPMENU_REGISTRATION(SdResId(RID_TASKPANE_LAYOUTMENU_POPUP)); @@ -156,15 +156,15 @@ static snewfoil_value_info standard[] = { {BMP_LAYOUT_EMPTY, BMP_LAYOUT_EMPTY_H, STR_AUTOLAYOUT_NONE, WritingMode_LR_TB, AUTOLAYOUT_NONE}, {BMP_LAYOUT_HEAD03, BMP_LAYOUT_HEAD03_H, STR_AUTOLAYOUT_TITLE, WritingMode_LR_TB, AUTOLAYOUT_TITLE}, - {BMP_LAYOUT_HEAD02, BMP_LAYOUT_HEAD02_H, STR_AUTOLAYOUT_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_ENUM}, + {BMP_LAYOUT_HEAD02, BMP_LAYOUT_HEAD02_H, STR_AUTOLAYOUT_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_ENUM}, {BMP_LAYOUT_HEAD02A, BMP_LAYOUT_HEAD02A_H, STR_AUTOLAYOUT_2CONTENT, WritingMode_LR_TB, AUTOLAYOUT_2TEXT}, - {BMP_LAYOUT_HEAD01, BMP_LAYOUT_HEAD01_H, STR_AUTOLAYOUT_ONLY_TITLE, WritingMode_LR_TB, AUTOLAYOUT_ONLY_TITLE}, + {BMP_LAYOUT_HEAD01, BMP_LAYOUT_HEAD01_H, STR_AUTOLAYOUT_ONLY_TITLE, WritingMode_LR_TB, AUTOLAYOUT_ONLY_TITLE}, {BMP_LAYOUT_TEXTONLY, BMP_LAYOUT_TEXTONLY_H, STR_AUTOLAYOUT_ONLY_TEXT, WritingMode_LR_TB, AUTOLAYOUT_ONLY_TEXT}, {BMP_LAYOUT_HEAD03B, BMP_LAYOUT_HEAD03B_H, STR_AUTOLAYOUT_2CONTENT_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_2OBJTEXT}, {BMP_LAYOUT_HEAD03C, BMP_LAYOUT_HEAD03C_H, STR_AUTOLAYOUT_CONTENT_2CONTENT, WritingMode_LR_TB, AUTOLAYOUT_TEXT2OBJ}, - {BMP_LAYOUT_HEAD03A, BMP_LAYOUT_HEAD03A_H, STR_AUTOLAYOUT_2CONTENT_OVER_CONTENT,WritingMode_LR_TB, AUTOLAYOUT_2OBJOVERTEXT}, + {BMP_LAYOUT_HEAD03A, BMP_LAYOUT_HEAD03A_H, STR_AUTOLAYOUT_2CONTENT_OVER_CONTENT,WritingMode_LR_TB, AUTOLAYOUT_2OBJOVERTEXT}, {BMP_LAYOUT_HEAD02B, BMP_LAYOUT_HEAD02B_H, STR_AUTOLAYOUT_CONTENT_OVER_CONTENT, WritingMode_LR_TB, AUTOLAYOUT_OBJOVERTEXT}, - {BMP_LAYOUT_HEAD04, BMP_LAYOUT_HEAD04_H, STR_AUTOLAYOUT_4CONTENT, WritingMode_LR_TB, AUTOLAYOUT_4OBJ}, + {BMP_LAYOUT_HEAD04, BMP_LAYOUT_HEAD04_H, STR_AUTOLAYOUT_4CONTENT, WritingMode_LR_TB, AUTOLAYOUT_4OBJ}, {BMP_LAYOUT_HEAD06, BMP_LAYOUT_HEAD06_H, STR_AUTOLAYOUT_6CONTENT, WritingMode_LR_TB, AUTOLAYOUT_6CLIPART}, // vertical @@ -223,7 +223,7 @@ void LayoutMenu::implConstruct( DrawDocShell& rDocumentShell ) SetSmartHelpId(SmartId(HID_SD_TASK_PANE_PREVIEW_LAYOUTS)); SetAccessibleName(SdResId(STR_TASKPANEL_LAYOUT_MENU_TITLE)); - + Link aStateChangeLink (LINK(this,LayoutMenu,StateChangeHandler)); mxListener = new ::sd::tools::SlotStateListener( aStateChangeLink, @@ -241,7 +241,7 @@ LayoutMenu::~LayoutMenu (void) // Tell the shell factory that this object is no longer available. if (GetShellManager() != NULL) GetShellManager()->RemoveSubShell(this); - + Reference<lang::XComponent> xComponent (mxListener, UNO_QUERY); if (xComponent.is()) xComponent->dispose(); @@ -266,7 +266,7 @@ LayoutMenu::~LayoutMenu (void) AutoLayout LayoutMenu::GetSelectedAutoLayout (void) { AutoLayout aResult = AUTOLAYOUT_NONE; - + if ( ! IsNoSelection() && GetSelectItemId()!=0) { AutoLayout* pLayout = static_cast<AutoLayout*>(GetItemData(GetSelectItemId())); @@ -287,7 +287,7 @@ Size LayoutMenu::GetPreferredSize (void) { Size aItemSize = CalcItemSizePixel (Size()); Size aPreferredWindowSize = CalcWindowSizePixel ( - aItemSize, + aItemSize, (USHORT)mnPreferredColumnCount, (USHORT)CalculateRowCount (aItemSize,mnPreferredColumnCount)); return aPreferredWindowSize; @@ -388,7 +388,7 @@ void LayoutMenu::UpdateEnabledState (const MasterMode eMode) // expanded. bIsEnabled = true; break; - + case ViewShell::ST_DRAW: case ViewShell::ST_IMPRESS: { @@ -481,7 +481,7 @@ void LayoutMenu::Resize (void) nColumnCount = 4; int nRowCount = CalculateRowCount (aItemSize, nColumnCount); - + SetColCount ((USHORT)nColumnCount); SetLineCount ((USHORT)nRowCount); } @@ -504,7 +504,7 @@ void LayoutMenu::MouseButtonDown (const MouseEvent& rEvent) if (nIndex > 0) SelectItem(nIndex); } - + ValueSet::MouseButtonDown (rEvent); } @@ -697,7 +697,7 @@ void LayoutMenu::AssignLayoutToSelectedSlides (AutoLayout aLayout) pPageSelection.reset(new ::sd::slidesorter::SlideSorterViewShell::PageSelection()); pPageSelection->push_back(pMainViewShell->GetActualPage()); } - + if (pPageSelection->empty()) break; @@ -742,7 +742,7 @@ SfxRequest LayoutMenu::CreateRequest ( break; SetOfByte aVisibleLayers (pPage->TRG_GetMasterPageVisibleLayers()); - + aRequest.AppendItem( SfxStringItem (ID_VAL_PAGENAME, String()));//pPage->GetName())); aRequest.AppendItem(SfxUInt32Item (ID_VAL_WHATLAYOUT, aLayout)); @@ -767,7 +767,7 @@ void LayoutMenu::Fill (void) SvtLanguageOptions aLanguageOptions; sal_Bool bVertical = aLanguageOptions.IsVerticalTextEnabled(); SdDrawDocument* pDocument = mrBase.GetDocument(); - sal_Bool bRightToLeft = (pDocument!=NULL + sal_Bool bRightToLeft = (pDocument!=NULL && pDocument->GetDefaultWritingMode() == WritingMode_RL_TB); // Get URL of the view in the center pane. @@ -785,7 +785,7 @@ void LayoutMenu::Fill (void) } catch (RuntimeException&) {} - + snewfoil_value_info* pInfo = NULL; if (sCenterPaneViewName.equals(framework::FrameworkHelper::msNotesViewURL)) { @@ -811,10 +811,10 @@ void LayoutMenu::Fill (void) { if ((WritingMode_TB_RL != pInfo->meWritingMode) || bVertical) { - BitmapEx aBmp (SdResId (bHighContrast - ? pInfo->mnHCBmpResId + BitmapEx aBmp (SdResId (bHighContrast + ? pInfo->mnHCBmpResId : pInfo->mnBmpResId)); - + if (bRightToLeft && (WritingMode_TB_RL != pInfo->meWritingMode)) aBmp.Mirror (BMP_MIRROR_HORZ); @@ -925,7 +925,7 @@ void LayoutMenu::UpdateSelection (void) ViewShell* pViewShell = mrBase.GetMainViewShell().get(); if (pViewShell == NULL) break; - + SdPage* pCurrentPage = pViewShell->getCurrentPage(); if (pCurrentPage == NULL) break; diff --git a/sd/source/ui/toolpanel/LayoutMenu.hxx b/sd/source/ui/toolpanel/LayoutMenu.hxx index 627a363fb576..b9b1658c18c9 100755 --- a/sd/source/ui/toolpanel/LayoutMenu.hxx +++ b/sd/source/ui/toolpanel/LayoutMenu.hxx @@ -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 @@ -67,7 +67,7 @@ class LayoutMenu : public ValueSet, public TreeNode, public SfxShell, - public DragSourceHelper, + public DragSourceHelper, public DropTargetHelper { public: diff --git a/sd/source/ui/toolpanel/MethodGuard.hxx b/sd/source/ui/toolpanel/MethodGuard.hxx index 45b81367c8de..a8f6d673e605 100644 --- a/sd/source/ui/toolpanel/MethodGuard.hxx +++ b/sd/source/ui/toolpanel/MethodGuard.hxx @@ -1,6 +1,6 @@ /************************************************************************* * 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 diff --git a/sd/source/ui/toolpanel/ScrollPanel.cxx b/sd/source/ui/toolpanel/ScrollPanel.cxx index 6b10ed889424..1d827874a1ee 100755 --- a/sd/source/ui/toolpanel/ScrollPanel.cxx +++ b/sd/source/ui/toolpanel/ScrollPanel.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 @@ -135,7 +135,7 @@ ScrollPanel::~ScrollPanel (void) TitledControl* ScrollPanel::AddControl ( - ::std::auto_ptr<TreeNode> pControl, + ::std::auto_ptr<TreeNode> pControl, const String& rTitle, ULONG nHelpId) { @@ -143,14 +143,14 @@ TitledControl* ScrollPanel::AddControl ( // managed by the content object. TitledControl* pTitledControl = new TitledControl( this, - pControl, + pControl, rTitle, TitledControlStandardClickHandler(GetControlContainer(), ControlContainer::ES_TOGGLE), TitleBar::TBT_SUB_CONTROL_HEADLINE); pTitledControl->GetTitleBar()->SetHelpId(nHelpId); AddControl(::std::auto_ptr<TreeNode>(pTitledControl)); - + return pTitledControl; } @@ -169,7 +169,7 @@ void ScrollPanel::AddControl (::std::auto_ptr<TreeNode> pControl) const Link aWindowListener(LINK(this,ScrollPanel,WindowEventListener)); OSL_ASSERT(pControl->GetWindow()!=NULL); pControl->GetWindow()->AddEventListener(aWindowListener); - + TitledControl* pTitledControl = dynamic_cast<TitledControl*>(pControl.get()); if (pTitledControl != NULL) { @@ -192,8 +192,8 @@ void ScrollPanel::AddControl (::std::auto_ptr<TreeNode> pControl) rFocusManager.RegisterLink(pFirst,pControl->GetWindow(), KEY_UP); rFocusManager.RegisterLink(pControl->GetWindow(),pFirst, KEY_DOWN); } - - + + // Add a down link only for the first control so that when entering // the sub tool panel the focus is set to the first control. if (nControlCount == 0) @@ -230,7 +230,7 @@ void ScrollPanel::Paint (const Rectangle& rRect) Size aSize (maScrollWindow.GetOutputSizePixel()); // Paint left and right vertical border. Rectangle aVerticalArea ( - Point(0,0), + Point(0,0), Size(mnHorizontalBorder,aSize.Height())); maScrollWindow.DrawRect (aVerticalArea); aVerticalArea.Right() += mnHorizontalBorder + mnChildrenWidth - 1; @@ -252,7 +252,7 @@ void ScrollPanel::Paint (const Rectangle& rRect) break; maScrollWindow.DrawRect (aStripeArea); } - + maScrollWindow.SetLineColor (aOriginalLineColor); maScrollWindow.SetFillColor (aOriginalFillColor); } @@ -397,7 +397,7 @@ void ScrollPanel::Rearrange (void) mnChildrenWidth += aRequiredSize.Width(); else mnChildrenWidth += aAvailableSize.Width(); - + sal_Int32 nChildrenHeight (LayoutChildren()); maVerticalScrollBar.SetRangeMax ( nChildrenHeight + mnVerticalBorder); @@ -413,7 +413,7 @@ Size ScrollPanel::GetRequiredSize (void) { // First determine the width of the children. This is the maximum of // the current window width and the individual minimum widths of the - // children. + // children. int nChildrenWidth (GetSizePixel().Width()); unsigned int nCount = mpControlContainer->GetControlCount(); unsigned int nIndex; @@ -428,7 +428,7 @@ Size ScrollPanel::GetRequiredSize (void) // Determine the accumulated width of all children when scaled to the // minimum width. nChildrenWidth -= 2*mnHorizontalBorder; - Size aTotalSize (nChildrenWidth, + Size aTotalSize (nChildrenWidth, 2*mnVerticalBorder + (nCount-1) * mnVerticalGap); for (nIndex=0; nIndex<nCount; nIndex++) { @@ -528,7 +528,7 @@ Size ScrollPanel::SetupScrollBars (const Size& rRequiredSize) if (GetMinimumWidth() + aScrollBarSize.Width() > aWindowSize.Width()) bShowHorizontal = true; } - + // Setup the scroll bars. aRemainingSize.Width() = SetupVerticalScrollBar (bShowVertical, rRequiredSize.Height()); @@ -585,7 +585,7 @@ sal_Int32 ScrollPanel::SetupVerticalScrollBar (bool bShow, sal_Int32 nRange) long nMinPos = maVerticalScrollBar.GetRangeMin(); if (maVerticalScrollBar.GetThumbPos() < nMinPos) maVerticalScrollBar.SetThumbPos(nMinPos); - long nMaxPos = maVerticalScrollBar.GetRangeMax() + long nMaxPos = maVerticalScrollBar.GetRangeMax() - maVerticalScrollBar.GetVisibleSize(); if (maVerticalScrollBar.GetThumbPos() >= nMaxPos) maVerticalScrollBar.SetThumbPos(nMaxPos); @@ -638,7 +638,7 @@ sal_Int32 ScrollPanel::SetupHorizontalScrollBar (bool bShow, sal_Int32 nRange) long nMinPos = maHorizontalScrollBar.GetRangeMin(); if (maHorizontalScrollBar.GetThumbPos() < nMinPos) maHorizontalScrollBar.SetThumbPos(nMinPos); - long nMaxPos = maHorizontalScrollBar.GetRangeMax() + long nMaxPos = maHorizontalScrollBar.GetRangeMax() - maHorizontalScrollBar.GetVisibleSize(); if (maHorizontalScrollBar.GetThumbPos() >= nMaxPos) maHorizontalScrollBar.SetThumbPos(nMaxPos); @@ -731,7 +731,7 @@ void ScrollPanel::MakeRectangleVisible ( aRectangle.Move( -maScrollOffset.X() + aRelativeBox.Left(), -maScrollOffset.Y() + aRelativeBox.Top()); - + const int nVisibleHeight (maVerticalScrollBar.GetVisibleSize()); const int nVisibleTop (maVerticalScrollBar.GetThumbPos()); if (aRectangle.Bottom() >= nVisibleTop+nVisibleHeight) @@ -764,12 +764,12 @@ IMPL_LINK(ScrollPanel,WindowEventListener,VclSimpleEvent*,pEvent) Rectangle aBox (pControl->GetItemRect(pControl->GetSelectItemId())); aBox.Top()-=4; aBox.Bottom()+=4; - + MakeRectangleVisible(aBox, pControl); } } break; - + case VCLEVENT_WINDOW_MOUSEBUTTONDOWN: { // Make the item under the mouse visible. We need this case @@ -790,13 +790,13 @@ IMPL_LINK(ScrollPanel,WindowEventListener,VclSimpleEvent*,pEvent) Rectangle aBox (pControl->GetItemRect(pControl->GetItemId(aPosition))); aBox.Top()-=4; aBox.Bottom()+=4; - + MakeRectangleVisible(aBox, pControl); } } } break; - + case VCLEVENT_WINDOW_GETFOCUS: { @@ -814,7 +814,7 @@ IMPL_LINK(ScrollPanel,WindowEventListener,VclSimpleEvent*,pEvent) } } break; - + case VCLEVENT_WINDOW_SHOW: case VCLEVENT_WINDOW_HIDE: case VCLEVENT_WINDOW_ACTIVATE: diff --git a/sd/source/ui/toolpanel/SlideSorterCacheDisplay.cxx b/sd/source/ui/toolpanel/SlideSorterCacheDisplay.cxx index a032b6ef02f0..78301f8d82b9 100755 --- a/sd/source/ui/toolpanel/SlideSorterCacheDisplay.cxx +++ b/sd/source/ui/toolpanel/SlideSorterCacheDisplay.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 @@ -58,7 +58,7 @@ public: virtual void Paint (const Rectangle& rBoundingBox) { mpDisplay->Paint(rBoundingBox); ::Window::Paint(rBoundingBox); } virtual void Resize (void) { mpDisplay->Resize(); ::Window::Resize(); } - + private: ::sd::toolpanel::SlideSorterCacheDisplay* mpDisplay; }; @@ -177,7 +177,7 @@ void SlideSorterCacheDisplay::Resize (void) ++nC; } double nAspect2 = double(nC) / double(nR); - + mnRowCount = nR; mnColumnCount = nC; mnHorizontalGap = 2; @@ -206,10 +206,10 @@ SlideSorterCacheDisplay* SlideSorterCacheDisplay::Instance (const SdDrawDocument { pDisplay = new SlideSorterCacheDisplay(pDocument); } - + return pDisplay; } - + diff --git a/sd/source/ui/toolpanel/SubToolPanel.cxx b/sd/source/ui/toolpanel/SubToolPanel.cxx index 73783b0f0a41..2dd496106e24 100755 --- a/sd/source/ui/toolpanel/SubToolPanel.cxx +++ b/sd/source/ui/toolpanel/SubToolPanel.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 @@ -133,7 +133,7 @@ void SubToolPanel::Paint (const Rectangle& rRect) Size aSize (GetOutputSizePixel()); // Paint left and right vertical border. Rectangle aVerticalArea ( - Point(0,0), + Point(0,0), Size(mnHorizontalBorder,aSize.Height())); DrawRect (aVerticalArea); aVerticalArea.Right() += mnHorizontalBorder + mnChildrenWidth - 1; @@ -155,7 +155,7 @@ void SubToolPanel::Paint (const Rectangle& rRect) break; DrawRect (aStripeArea); } - + SetLineColor (aOriginalLineColor); SetFillColor (aOriginalFillColor); } @@ -262,7 +262,7 @@ void SubToolPanel::Rearrange (void) aRequiredSize.Width() = aAvailableSize.Width(); mnChildrenWidth = -2*mnHorizontalBorder; mnChildrenWidth += aAvailableSize.Width(); - + LayoutChildren(); mbIsRearrangePending = false; @@ -276,7 +276,7 @@ Size SubToolPanel::GetRequiredSize (void) { // First determine the width of the children. This is the maximum of // the current window width and the individual minimum widths of the - // children. + // children. int nChildrenWidth (GetSizePixel().Width()); unsigned int nCount = mpControlContainer->GetControlCount(); unsigned int nIndex; @@ -291,7 +291,7 @@ Size SubToolPanel::GetRequiredSize (void) // Determine the accumulated width of all children when scaled to the // minimum width. nChildrenWidth -= 2*mnHorizontalBorder; - Size aTotalSize (nChildrenWidth, + Size aTotalSize (nChildrenWidth, 2*mnVerticalBorder + (nCount-1) * mnVerticalGap); for (nIndex=0; nIndex<nCount; nIndex++) { diff --git a/sd/source/ui/toolpanel/TaskPaneControlFactory.cxx b/sd/source/ui/toolpanel/TaskPaneControlFactory.cxx index 4ad610df7f7f..c85d2a0f7df3 100755 --- a/sd/source/ui/toolpanel/TaskPaneControlFactory.cxx +++ b/sd/source/ui/toolpanel/TaskPaneControlFactory.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 diff --git a/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx b/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx index 48882d0f2f9e..cf9e9bfd2a2c 100644 --- a/sd/source/ui/toolpanel/TaskPaneFocusManager.cxx +++ b/sd/source/ui/toolpanel/TaskPaneFocusManager.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 @@ -41,7 +41,7 @@ namespace { class WindowHash { public: - size_t operator()(const ::Window* argument) const + size_t operator()(const ::Window* argument) const { return reinterpret_cast<unsigned long>(argument); } }; @@ -176,7 +176,7 @@ void FocusManager::RemoveLinks ( Clear(); return; } - + ::std::pair<LinkMap::iterator,LinkMap::iterator> aCandidates; LinkMap::iterator iCandidate; bool bLoop (mpLinks->size() > 0); @@ -226,7 +226,7 @@ void FocusManager::RemoveLinks (::Window* pWindow) // Make sure that we are not called back for the window. pWindow->RemoveEventListener (LINK (this, FocusManager, WindowEventListener)); - + // Remove the links from the given window. ::std::pair<LinkMap::iterator,LinkMap::iterator> aCandidates(mpLinks->equal_range(pWindow)); mpLinks->erase(aCandidates.first, aCandidates.second); @@ -257,7 +257,7 @@ void FocusManager::RemoveLinks (::Window* pWindow) void FocusManager::RemoveUnusedEventListener (::Window* pWindow) { OSL_ASSERT(pWindow!=NULL); - + if (pWindow == NULL) return; diff --git a/sd/source/ui/toolpanel/TaskPaneFocusManager.hxx b/sd/source/ui/toolpanel/TaskPaneFocusManager.hxx index b9b28154dc5b..3111b2fe1102 100644 --- a/sd/source/ui/toolpanel/TaskPaneFocusManager.hxx +++ b/sd/source/ui/toolpanel/TaskPaneFocusManager.hxx @@ -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 @@ -106,7 +106,7 @@ private: static FocusManager* spInstance; class LinkMap; ::std::auto_ptr<LinkMap> mpLinks; - + FocusManager (void); ~FocusManager (void); @@ -114,7 +114,7 @@ private: listeners. */ void Clear (void); - + /** Remove all links from or to the given window. */ void RemoveLinks (::Window* pWindow); diff --git a/sd/source/ui/toolpanel/TaskPaneShellManager.cxx b/sd/source/ui/toolpanel/TaskPaneShellManager.cxx index 0a9667dd2431..eb49ca4d4477 100755 --- a/sd/source/ui/toolpanel/TaskPaneShellManager.cxx +++ b/sd/source/ui/toolpanel/TaskPaneShellManager.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 diff --git a/sd/source/ui/toolpanel/TaskPaneShellManager.hxx b/sd/source/ui/toolpanel/TaskPaneShellManager.hxx index 92e7b6b83b8d..10862070d50b 100755 --- a/sd/source/ui/toolpanel/TaskPaneShellManager.hxx +++ b/sd/source/ui/toolpanel/TaskPaneShellManager.hxx @@ -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 @@ -72,7 +72,7 @@ public: ShellId nId, ::Window* pParentWindow, FrameView* pFrameView = NULL); - + virtual void ReleaseShell (SfxShell* pShell); /** Add a sub shell to the set of sub shells managed by the @@ -86,7 +86,7 @@ public: NULL when this shell is requested. */ void RemoveSubShell (const SfxShell* pShell); - /** removes the shell given by its ID from the set of sub shells managed by the + /** removes the shell given by its ID from the set of sub shells managed by the TaskPaneShellManager. Subsequent calls to CreateShell() will return NULL when this shell is requested. */ diff --git a/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx b/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx index 8c69e12c504d..32ec30de1275 100755 --- a/sd/source/ui/toolpanel/TaskPaneTreeNode.cxx +++ b/sd/source/ui/toolpanel/TaskPaneTreeNode.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 @@ -250,7 +250,7 @@ TaskPaneShellManager* TreeNode::GetShellManager (void) void TreeNode::AddStateChangeListener (const Link& rListener) { if (::std::find ( - maStateChangeListeners.begin(), + maStateChangeListeners.begin(), maStateChangeListeners.end(), rListener) == maStateChangeListeners.end()) { diff --git a/sd/source/ui/toolpanel/TestMenu.cxx b/sd/source/ui/toolpanel/TestMenu.cxx index a8f0b6df7893..81d36ae82c7d 100755 --- a/sd/source/ui/toolpanel/TestMenu.cxx +++ b/sd/source/ui/toolpanel/TestMenu.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 @@ -59,15 +59,15 @@ ColorMenu::ColorMenu (::Window* i_pParent) maSet (this), mnPreferredColumnCount(2) { - WinBits aStyle = - WB_ITEMBORDER - | WB_DOUBLEBORDER - | WB_NAMEFIELD + WinBits aStyle = + WB_ITEMBORDER + | WB_DOUBLEBORDER + | WB_NAMEFIELD | WB_FLATVALUESET | WB_TABSTOP | WB_VSCROLL; - maSet.SetStyle (maSet.GetStyle() | aStyle); + maSet.SetStyle (maSet.GetStyle() | aStyle); maSet.SetExtraSpacing(2); Fill (); @@ -117,7 +117,7 @@ sal_Int32 ColorMenu::GetPreferredWidth (sal_Int32 nHeight) int nRowCount = nHeight / aItemSize.Height(); if (nRowCount <= 0) nRowCount = 1; - int nColumnCount = (maSet.GetItemCount() + nRowCount-1) + int nColumnCount = (maSet.GetItemCount() + nRowCount-1) / nRowCount; nPreferredWidth = nColumnCount * aItemSize.Width(); } @@ -143,7 +143,7 @@ sal_Int32 ColorMenu::GetPreferredHeight (sal_Int32 nWidth) nColumnCount = 1; else if (nColumnCount > 4) nColumnCount = 4; - int nRowCount = (maSet.GetItemCount() + nColumnCount-1) + int nRowCount = (maSet.GetItemCount() + nColumnCount-1) / nColumnCount; nPreferredHeight = nRowCount * aItemSize.Height(); } @@ -194,7 +194,7 @@ void ColorMenu::Resize (void) nColumnCount = 4; USHORT nRowCount = (USHORT)CalculateRowCount (aItemSize, nColumnCount); - + maSet.SetColCount ((USHORT)nColumnCount); maSet.SetLineCount (nRowCount); } diff --git a/sd/source/ui/toolpanel/TestMenu.hxx b/sd/source/ui/toolpanel/TestMenu.hxx index 0c4b3bfe6530..1670e9531620 100755 --- a/sd/source/ui/toolpanel/TestMenu.hxx +++ b/sd/source/ui/toolpanel/TestMenu.hxx @@ -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 diff --git a/sd/source/ui/toolpanel/TestPanel.cxx b/sd/source/ui/toolpanel/TestPanel.cxx index 044b40dcdb4f..2fa8b4354ac3 100755 --- a/sd/source/ui/toolpanel/TestPanel.cxx +++ b/sd/source/ui/toolpanel/TestPanel.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 @@ -58,8 +58,8 @@ class Wrapper { public: Wrapper ( - TreeNode* pParent, - Size aPreferredSize, + TreeNode* pParent, + Size aPreferredSize, ::Window* pWrappedControl, bool bIsResizable) : TreeNode (pParent), @@ -69,7 +69,7 @@ public: { mpWrappedControl->Show(); } - virtual ~Wrapper (void) + virtual ~Wrapper (void) { delete mpWrappedControl; } diff --git a/sd/source/ui/toolpanel/TestPanel.hxx b/sd/source/ui/toolpanel/TestPanel.hxx index 494e5086b179..135e2827bed3 100755 --- a/sd/source/ui/toolpanel/TestPanel.hxx +++ b/sd/source/ui/toolpanel/TestPanel.hxx @@ -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 diff --git a/sd/source/ui/toolpanel/TitleBar.cxx b/sd/source/ui/toolpanel/TitleBar.cxx index de49b7a6abb5..8ab7b89ae200 100755 --- a/sd/source/ui/toolpanel/TitleBar.cxx +++ b/sd/source/ui/toolpanel/TitleBar.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 @@ -58,7 +58,7 @@ namespace sd { namespace toolpanel { const int TitleBar::snIndentationWidth = 16; - + TitleBar::TitleBar ( ::Window* pParent, const String& rsTitle, TitleBarType eType, bool bIsExpandable) : ::Window (pParent, WB_TABSTOP) , TreeNode(this) @@ -286,7 +286,7 @@ void TitleBar::PaintSubPanelHeadLineBar (void) Rectangle aTextBox (CalculateTextBoundingBox (nWidth, true)); Rectangle aTitleBarBox (CalculateTitleBarBox(aTextBox, nWidth)); - int nVerticalOffset = -aTitleBarBox.Top(); + int nVerticalOffset = -aTitleBarBox.Top(); aTitleBarBox.Top() += nVerticalOffset; aTitleBarBox.Bottom() += nVerticalOffset; aTextBox.Top() += nVerticalOffset; @@ -352,7 +352,7 @@ Rectangle TitleBar::PaintExpansionIndicator (const Rectangle& rTextBox) if (meType == TBT_SUB_CONTROL_HEADLINE) aPosition.X() += 3; mpDevice->DrawImage (aPosition, aImage); - + aExpansionIndicatorArea = Rectangle ( aPosition, aImage.GetSizePixel()); } @@ -376,9 +376,9 @@ USHORT TitleBar::GetTextStyle (void) { if(IsEnabled()) { - return TEXT_DRAW_LEFT + return TEXT_DRAW_LEFT | TEXT_DRAW_TOP - | TEXT_DRAW_MULTILINE + | TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK; } else @@ -451,7 +451,7 @@ Rectangle TitleBar::CalculateTextBoundingBox ( Rectangle aTextBox ( Point(0,0), - Size (nAvailableWidth, + Size (nAvailableWidth, GetSettings().GetStyleSettings().GetTitleHeight())); aTextBox.Top() += (aTextBox.GetHeight() - GetTextHeight()) / 2; if (HasExpansionIndicator()) @@ -530,7 +530,7 @@ void TitleBar::DataChanged (const DataChangedEvent& rEvent) mpDevice.reset(new VirtualDevice (*this)); // fall through. - + case DATACHANGED_FONTS: case DATACHANGED_FONTSUBSTITUTION: { @@ -541,7 +541,7 @@ void TitleBar::DataChanged (const DataChangedEvent& rEvent) if (IsControlFont()) aFont.Merge(GetControlFont()); SetZoomedPointFont(aFont); - + // Color. Color aColor; if (IsControlForeground()) diff --git a/sd/source/ui/toolpanel/TitledControl.cxx b/sd/source/ui/toolpanel/TitledControl.cxx index e83e6c47c10a..891ade2ddecd 100755 --- a/sd/source/ui/toolpanel/TitledControl.cxx +++ b/sd/source/ui/toolpanel/TitledControl.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 @@ -38,12 +38,12 @@ #include <vcl/svapp.hxx> -namespace sd { namespace toolpanel { +namespace sd { namespace toolpanel { TitledControl::TitledControl ( TreeNode* pParent, - ::std::auto_ptr<TreeNode> pControl, + ::std::auto_ptr<TreeNode> pControl, const String& rTitle, const ClickHandler& rClickHandler, TitleBar::TitleBarType eType) @@ -137,7 +137,7 @@ sal_Int32 TitledControl::GetPreferredHeight (sal_Int32 nWidth) bool TitledControl::IsResizable (void) { - return IsExpanded() + return IsExpanded() && GetControl()->IsResizable(); } @@ -156,7 +156,7 @@ void TitledControl::Resize (void) { Size aWindowSize (GetOutputSizePixel()); - int nTitleBarHeight + int nTitleBarHeight = GetTitleBar()->GetPreferredHeight(aWindowSize.Width()); GetTitleBar()->GetWindow()->SetPosSizePixel ( Point (0,0), @@ -164,7 +164,7 @@ void TitledControl::Resize (void) TreeNode* pControl = GetControl(); - if (pControl != NULL + if (pControl != NULL && pControl->GetWindow() != NULL && pControl->GetWindow()->IsVisible()) { @@ -257,7 +257,7 @@ bool TitledControl::Expand (bool bExpanded) if (bExpansionStateChanged) UpdateStates(); } - + return bExpansionStateChanged; } @@ -287,7 +287,7 @@ bool TitledControl::IsExpanded (void) const return false; } -void TitledControl::SetEnabledState(bool bFlag) +void TitledControl::SetEnabledState(bool bFlag) { if (!bFlag) { @@ -296,13 +296,13 @@ void TitledControl::SetEnabledState(bool bFlag) ControlContainer::ES_COLLAPSE); Disable(); } - else + else { -/* +/* GetParentNode()->GetControlContainer().SetExpansionState ( this, ControlContainer::ES_EXPAND); -*/ +*/ Enable(); } @@ -351,7 +351,7 @@ void TitledControl::UpdateStates (void) -IMPL_LINK(TitledControl, WindowEventListener, +IMPL_LINK(TitledControl, WindowEventListener, VclSimpleEvent*, pEvent) { if (pEvent!=NULL && pEvent->ISA(VclWindowEvent)) diff --git a/sd/source/ui/toolpanel/ToolPanel.cxx b/sd/source/ui/toolpanel/ToolPanel.cxx index 6dbcae52547a..2438ed521267 100755 --- a/sd/source/ui/toolpanel/ToolPanel.cxx +++ b/sd/source/ui/toolpanel/ToolPanel.cxx @@ -1,6 +1,6 @@ /************************************************************************* * 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 @@ -88,7 +88,7 @@ namespace sd { namespace toolpanel ToolPanelGuard aGuard( *this ); return Reference< XWindow >( m_pControl->GetWindow()->GetComponentInterface(), UNO_QUERY_THROW ); } - + //------------------------------------------------------------------------------------------------------------------ Reference< XAccessible > SAL_CALL ToolPanel::createAccessible( const Reference< XAccessible >& i_rParentAccessible ) throw (RuntimeException) { diff --git a/sd/source/ui/toolpanel/ToolPanel.hxx b/sd/source/ui/toolpanel/ToolPanel.hxx index 2fe4a64c71be..f40873a4161a 100644 --- a/sd/source/ui/toolpanel/ToolPanel.hxx +++ b/sd/source/ui/toolpanel/ToolPanel.hxx @@ -1,6 +1,6 @@ /************************************************************************* * 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 diff --git a/sd/source/ui/toolpanel/ToolPanelDescriptor.hxx b/sd/source/ui/toolpanel/ToolPanelDescriptor.hxx index 4ac31ef53e23..0210246d7ac1 100644 --- a/sd/source/ui/toolpanel/ToolPanelDescriptor.hxx +++ b/sd/source/ui/toolpanel/ToolPanelDescriptor.hxx @@ -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 @@ -46,7 +46,7 @@ public: /** Create a new descriptor for the given control. @param pControl */ - ToolPanelDescriptor (::std::auto_ptr< ::Window> pControl, + ToolPanelDescriptor (::std::auto_ptr< ::Window> pControl, const String& rTitle); ~ToolPanelDescriptor (void); @@ -71,7 +71,7 @@ public: int GetTotalHeight (void) const; int GetWindowHeight (void) const; - + private: ::std::auto_ptr< ::Window> mpControl; String msTitle; diff --git a/sd/source/ui/toolpanel/ToolPanelFactory.cxx b/sd/source/ui/toolpanel/ToolPanelFactory.cxx index db4602c991d0..767dece4464e 100644 --- a/sd/source/ui/toolpanel/ToolPanelFactory.cxx +++ b/sd/source/ui/toolpanel/ToolPanelFactory.cxx @@ -1,6 +1,6 @@ /************************************************************************* * 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 diff --git a/sd/source/ui/toolpanel/ToolPanelUIElement.cxx b/sd/source/ui/toolpanel/ToolPanelUIElement.cxx index e81f683bcfa7..b9b8081330d1 100644 --- a/sd/source/ui/toolpanel/ToolPanelUIElement.cxx +++ b/sd/source/ui/toolpanel/ToolPanelUIElement.cxx @@ -1,6 +1,6 @@ /************************************************************************* * 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 @@ -93,21 +93,21 @@ namespace sd { namespace toolpanel UIElementMethodGuard aGuard( *this ); return m_xFrame; } - + //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString SAL_CALL ToolPanelUIElement::getResourceURL() throw (RuntimeException) { UIElementMethodGuard aGuard( *this ); return m_sResourceURL; } - + //------------------------------------------------------------------------------------------------------------------ ::sal_Int16 SAL_CALL ToolPanelUIElement::getType() throw (RuntimeException) { UIElementMethodGuard aGuard( *this ); return UIElementType::TOOLPANEL; } - + //------------------------------------------------------------------------------------------------------------------ Reference< XInterface > SAL_CALL ToolPanelUIElement::getRealInterface( ) throw (RuntimeException) { diff --git a/sd/source/ui/toolpanel/ToolPanelUIElement.hxx b/sd/source/ui/toolpanel/ToolPanelUIElement.hxx index 0a74b7bd449e..4b0baf02cc52 100644 --- a/sd/source/ui/toolpanel/ToolPanelUIElement.hxx +++ b/sd/source/ui/toolpanel/ToolPanelUIElement.hxx @@ -1,6 +1,6 @@ /************************************************************************* * 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 diff --git a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx index c62faf29ca50..4e7e55eeaa19 100755 --- a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx +++ b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx @@ -1,6 +1,6 @@ /************************************************************************* * 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 @@ -239,7 +239,7 @@ public: If the panel is not active currently, nothing happens. */ void DeactivatePanelByResource( const ::rtl::OUString& i_rPanelResourceURL ); - + /** provides access to the the VCL window of the panel deck */ ::sfx2::ModuleTaskPane& GetTaskPane() { return *m_pTaskPane; } @@ -512,12 +512,20 @@ ToolPanelViewShell::ToolPanelViewShell( SfxViewFrame* pFrame, ViewShellBase& rVi SetName( String( RTL_CONSTASCII_USTRINGPARAM( "ToolPanelViewShell" ) ) ); + // Some recent changes to the toolpanel make it necessary to create the + // accessibility object now. Creating it on demand would lead to a + // pointer cycle in the tree of accessibility objects and would lead + // e.g. the accerciser AT tool into an infinite loop. + // It would be nice to get rid of this workaround in the future. + if (mpContentWindow.get()) + mpContentWindow->SetAccessible(mpImpl->CreateAccessible(*mpContentWindow)); + // For accessibility we have to shortly hide the content window. This // triggers the construction of a new accessibility object for the new // view shell. (One is created earlier while the construtor of the base // class is executed. At that time the correct accessibility object can // not be constructed.) - if ( mpContentWindow.get() ) + if (mpContentWindow.get()) { mpContentWindow->Hide(); mpContentWindow->Show(); @@ -587,13 +595,13 @@ void ToolPanelViewShell::KeyInput( const KeyEvent& i_rKeyEvent ) } // --------------------------------------------------------------------------------------------------------------------- -SdPage* ToolPanelViewShell::GetActualPage() +SdPage* ToolPanelViewShell::GetActualPage() { return NULL; } // --------------------------------------------------------------------------------------------------------------------- -SdPage* ToolPanelViewShell::getCurrentPage() const +SdPage* ToolPanelViewShell::getCurrentPage() const { return NULL; } @@ -633,7 +641,12 @@ DockingWindow* ToolPanelViewShell::GetDockingWindow() Reference< XAccessible > ToolPanelViewShell::CreateAccessibleDocumentView( ::sd::Window* i_pWindow ) { ENSURE_OR_RETURN( i_pWindow, "ToolPanelViewShell::CreateAccessibleDocumentView: illegal window!", NULL ); - return mpImpl->CreateAccessible( *i_pWindow ); + // As said above, we have to create the accessibility object + // (unconditionally) in the constructor, not here on demand, or + // otherwise we would create a cycle in the tree of accessible objects + // which could lead to infinite loops in AT tools. + // return mpImpl->CreateAccessible( *i_pWindow ); + return Reference<XAccessible>(); } // --------------------------------------------------------------------------------------------------------------------- diff --git a/sd/source/ui/toolpanel/controls/AllMasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/AllMasterPagesSelector.cxx index 86abd44e3a83..a43812e3ca6f 100644 --- a/sd/source/ui/toolpanel/controls/AllMasterPagesSelector.cxx +++ b/sd/source/ui/toolpanel/controls/AllMasterPagesSelector.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 @@ -133,7 +133,7 @@ void AllMasterPagesSelector::NotifyContainerChangeEvent ( AddItem(rEvent.maChildToken); MasterPagesSelector::Fill(); break; - + case MasterPageContainerChangeEvent::INDEX_CHANGED: case MasterPageContainerChangeEvent::INDEXES_CHANGED: mpSortedMasterPages->clear(); diff --git a/sd/source/ui/toolpanel/controls/AllMasterPagesSelector.hxx b/sd/source/ui/toolpanel/controls/AllMasterPagesSelector.hxx index e937958dbbf0..10ed29853b8b 100644 --- a/sd/source/ui/toolpanel/controls/AllMasterPagesSelector.hxx +++ b/sd/source/ui/toolpanel/controls/AllMasterPagesSelector.hxx @@ -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 @@ -43,7 +43,7 @@ class AllMasterPagesSelector { public: AllMasterPagesSelector ( - TreeNode* pParent, + TreeNode* pParent, SdDrawDocument& rDocument, ViewShellBase& rBase, DrawViewShell& rViewShell, diff --git a/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.cxx b/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.cxx index 730fc74795f2..01531d4f250a 100755 --- a/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.cxx +++ b/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.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 @@ -27,7 +27,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx b/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx index dd3388fb0342..1b947de166d5 100755 --- a/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx +++ b/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx @@ -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 @@ -27,7 +27,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx index 7f4149d7e6fd..57b2984528d1 100644 --- a/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx +++ b/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.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 @@ -92,7 +92,7 @@ CurrentMasterPagesSelector::~CurrentMasterPagesSelector (void) { OSL_ASSERT(mrDocument.GetDocSh() != NULL); } - + Link aLink (LINK(this,CurrentMasterPagesSelector,EventMultiplexerListener)); mrBase.GetEventMultiplexer()->RemoveEventListener(aLink); } @@ -236,7 +236,7 @@ void CurrentMasterPagesSelector::Execute (SfxRequest& rRequest) } } break; - + default: MasterPagesSelector::Execute(rRequest); break; @@ -305,7 +305,7 @@ IMPL_LINK(CurrentMasterPagesSelector,EventMultiplexerListener, break; } } - + return 0; } diff --git a/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.hxx b/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.hxx index ee3503d9787d..ca3676957410 100644 --- a/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.hxx +++ b/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.hxx @@ -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 @@ -45,7 +45,7 @@ class CurrentMasterPagesSelector { public: CurrentMasterPagesSelector ( - TreeNode* pParent, + TreeNode* pParent, SdDrawDocument& rDocument, ViewShellBase& rBase, const ::boost::shared_ptr<MasterPageContainer>& rpContainer); @@ -69,7 +69,7 @@ protected: virtual ResId GetContextMenuResId (void) const; virtual void Execute (SfxRequest& rRequest); virtual void GetState (SfxItemSet& rItemSet); - + private: ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> mxListener; diff --git a/sd/source/ui/toolpanel/controls/CustomAnimationPanel.cxx b/sd/source/ui/toolpanel/controls/CustomAnimationPanel.cxx index e7edf109cffd..e20f1934cfee 100755 --- a/sd/source/ui/toolpanel/controls/CustomAnimationPanel.cxx +++ b/sd/source/ui/toolpanel/controls/CustomAnimationPanel.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 @@ -37,11 +37,11 @@ #include "sdresid.hxx" namespace sd -{ - +{ + class ViewShellBase; extern ::Window * createCustomAnimationPanel( ::Window* pParent, ViewShellBase& rBase ); - + namespace toolpanel { namespace controls { diff --git a/sd/source/ui/toolpanel/controls/CustomAnimationPanel.hxx b/sd/source/ui/toolpanel/controls/CustomAnimationPanel.hxx index 864ba637b94d..f4eeca4caa99 100755 --- a/sd/source/ui/toolpanel/controls/CustomAnimationPanel.hxx +++ b/sd/source/ui/toolpanel/controls/CustomAnimationPanel.hxx @@ -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 @@ -47,7 +47,7 @@ class CustomAnimationPanel { public: CustomAnimationPanel ( - Window& i_rParentWindow, + Window& i_rParentWindow, ToolPanelViewShell& i_rPanelViewShell); virtual ~CustomAnimationPanel (void); diff --git a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx index b9040e72283f..7267c97220cf 100755 --- a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx +++ b/sd/source/ui/toolpanel/controls/DocumentHelper.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 @@ -117,7 +117,7 @@ SdPage* DocumentHelper::CopyMasterPageToLocalDocument ( } if (bPageExists) break; - + // Create a new slide (and its notes page.) uno::Reference<drawing::XDrawPagesSupplier> xSlideSupplier ( rTargetDocument.getUnoModel(), uno::UNO_QUERY); @@ -142,7 +142,7 @@ SdPage* DocumentHelper::CopyMasterPageToLocalDocument ( pNewMasterPage = AddMasterPage(rTargetDocument, pMasterPage); if (pNewMasterPage==NULL) break; - SdPage* pNewNotesMasterPage + SdPage* pNewNotesMasterPage = AddMasterPage(rTargetDocument, pNotesMasterPage); if (pNewNotesMasterPage==NULL) break; @@ -239,7 +239,7 @@ SdPage* DocumentHelper::AddMasterPage ( // Copy the precious flag. pClonedMasterPage->SetPrecious(pMasterPage->IsPrecious()); - + // Now that the styles are available we can insert the cloned // master page. rTargetDocument.InsertMasterPage (pClonedMasterPage); @@ -283,8 +283,8 @@ void DocumentHelper::ProvideStyles ( static_cast<SdStyleSheetPool*>(rTargetDocument.GetStyleSheetPool()); SdStyleSheetVector aCreatedStyles; pTargetStyleSheetPool->CopyLayoutSheets ( - sLayoutName, - *pSourceStyleSheetPool, + sLayoutName, + *pSourceStyleSheetPool, aCreatedStyles); // Add an undo action for the copied style sheets. @@ -295,8 +295,8 @@ void DocumentHelper::ProvideStyles ( { SdMoveStyleSheetsUndoAction* pMovStyles = new SdMoveStyleSheetsUndoAction ( - &rTargetDocument, - aCreatedStyles, + &rTargetDocument, + aCreatedStyles, TRUE); pUndoManager->AddUndoAction (pMovStyles); } @@ -350,8 +350,8 @@ void DocumentHelper::AssignMasterPageToPageList ( break; // Assign the master pages to the given list of pages. - for (iPage=aCleanedList.begin(); - iPage!=aCleanedList.end(); + for (iPage=aCleanedList.begin(); + iPage!=aCleanedList.end(); ++iPage) { AssignMasterPageToPage ( @@ -383,7 +383,7 @@ SdPage* DocumentHelper::AddMasterPage ( // Copy the precious flag. pClonedMasterPage->SetPrecious(pMasterPage->IsPrecious()); - + // Copy the necessary styles. SdDrawDocument* pSourceDocument = static_cast<SdDrawDocument*>(pMasterPage->GetModel()); @@ -439,7 +439,7 @@ void DocumentHelper::AssignMasterPageToPage ( SdDrawDocument* pDocument = dynamic_cast<SdDrawDocument*>(pPage->GetModel()); if (pDocument == NULL) return; - + if ( ! pPage->IsMasterPage()) { // 1. Remove the background object (so that that, if it exists, does @@ -450,7 +450,7 @@ void DocumentHelper::AssignMasterPageToPage ( *pDocument, *pPage, pPage->getSdrPageProperties().GetItemSet()), TRUE); pPage->getSdrPageProperties().PutItem(XFillStyleItem(XFILL_NONE)); - + pDocument->SetMasterPage ( (pPage->GetPageNum()-1)/2, rsBaseLayoutName, @@ -513,7 +513,7 @@ SdPage* DocumentHelper::ProvideMasterPage ( { // When the given master page or its associated notes master page do // not already belong to the document we have to create copies of - // them and insert them into the document. + // them and insert them into the document. // Determine the position where the new master pages are inserted. // By default they are inserted at the end. When we assign to a @@ -535,7 +535,7 @@ SdPage* DocumentHelper::ProvideMasterPage ( pMasterPageInDocument = pMasterPage; if (pNotesMasterPage->GetModel() != &rTargetDocument) { - SdPage* pClonedNotesMasterPage + SdPage* pClonedNotesMasterPage = AddMasterPage (rTargetDocument, pNotesMasterPage, nInsertionIndex+1); if( rTargetDocument.IsUndoEnabled() ) rTargetDocument.AddUndo( diff --git a/sd/source/ui/toolpanel/controls/DocumentHelper.hxx b/sd/source/ui/toolpanel/controls/DocumentHelper.hxx index 2ff1c8aa575a..9329c2fef6f8 100644 --- a/sd/source/ui/toolpanel/controls/DocumentHelper.hxx +++ b/sd/source/ui/toolpanel/controls/DocumentHelper.hxx @@ -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 @@ -89,7 +89,7 @@ private: SdDrawDocument& rTargetDocument, SdPage* pMasterPage, const ::boost::shared_ptr<std::vector<SdPage*> >& rpPageList); - + /** Assign the given master page to the given page. @param pMasterPage In contrast to AssignMasterPageToPageList() this page is assumed diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx index 80a094ec1a66..0f0d0b67b4ff 100755 --- a/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPageContainer.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 @@ -151,7 +151,7 @@ private: determine the correct size ratio. */ bool mbFirstPageObjectSeen; - + // The widths for the previews contain two pixels for the border that is // painted arround the preview. static const int SMALL_PREVIEW_WIDTH = 72 + 2; @@ -209,7 +209,7 @@ static const MasterPageContainer::Token NIL_TOKEN (-1); MasterPageContainer::Implementation::Instance (void) { ::boost::shared_ptr<MasterPageContainer::Implementation> pInstance; - + if (Implementation::mpInstance.expired()) { ::osl::GetGlobalMutex aMutexFunctor; @@ -702,7 +702,7 @@ void MasterPageContainer::Implementation::UpdatePreviewSizePixel (void) // The default aspect ratio is 4:3 int nWidth (4); int nHeight (3); - + // Search for the first entry with an existing master page. MasterPageContainerType::const_iterator iDescriptor; MasterPageContainerType::const_iterator iContainerEnd(maContainer.end()); @@ -790,7 +790,7 @@ MasterPageContainer::Token MasterPageContainer::Implementation::PutMasterPage ( { if (mbContainerCleaningPending) CleanContainer(); - + aResult = maContainer.size(); rpDescriptor->SetToken(aResult); @@ -807,10 +807,10 @@ MasterPageContainer::Token MasterPageContainer::Implementation::PutMasterPage ( default: break; } - + maContainer.push_back(rpDescriptor); aEntry = maContainer.end()-1; - + FireContainerChange(MasterPageContainerChangeEvent::CHILD_ADDED,aResult); } } @@ -825,7 +825,7 @@ MasterPageContainer::Token MasterPageContainer::Implementation::PutMasterPage ( // One or more aspects of the descriptor have changed. Send // appropriate events to the listeners. UpdateDescriptor(*aEntry,false,false, true); - + std::vector<MasterPageContainerChangeEvent::EventType>::const_iterator iEventType; for (iEventType=pEventTypes->begin(); iEventType!=pEventTypes->end(); ++iEventType) { @@ -902,7 +902,7 @@ Image MasterPageContainer::Implementation::GetPreviewForToken ( PreviewState ePreviewState (GetPreviewState(aToken)); SharedMasterPageDescriptor pDescriptor = GetDescriptor(aToken); - + // When the preview is missing but inexpensively creatable then do that // now. if (pDescriptor.get()!=NULL) @@ -941,7 +941,7 @@ Image MasterPageContainer::Implementation::GetPreviewForToken ( break; } } - + return aPreview; } @@ -1002,7 +1002,7 @@ Reference<frame::XModel> MasterPageContainer::Implementation::GetModel (void) RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")); uno::Reference<frame::XComponentLoader> xDesktop ( ::comphelper::getProcessServiceFactory()->createInstance( - sDesktopServiceName), + sDesktopServiceName), uno::UNO_QUERY); // Create a new model. @@ -1068,7 +1068,7 @@ Image MasterPageContainer::Implementation::GetPreviewSubstitution ( const ::osl::MutexGuard aGuard (maMutex); Image aPreview; - + switch (nId) { case STR_TASKPANEL_PREPARING_PREVIEW_SUBSTITUTION: diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainer.hxx b/sd/source/ui/toolpanel/controls/MasterPageContainer.hxx index 60f760f63e34..b4d2ca4cfde6 100755 --- a/sd/source/ui/toolpanel/controls/MasterPageContainer.hxx +++ b/sd/source/ui/toolpanel/controls/MasterPageContainer.hxx @@ -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 @@ -59,12 +59,12 @@ class MasterPageDescriptor; master pages. Each MasterPageContainer, however, has its own PreviewSize value and thus can independantly switch between large and small previews. - + The container maintains its own document to store master page objects. - + For each master page container stores its URL, preview bitmap, page name, and, if available, the page object. - + Entries are accessed via a Token, which is mostly a numerical index but whose values do not neccessarily have to be consecutive. */ @@ -109,7 +109,7 @@ public: bool RequestPreview (Token aToken); /** Each entry of the container is either the first page of a template - document or is a master page of an Impress document. + document or is a master page of an Impress document. */ enum Origin { MASTERPAGE, // Master page of a document. @@ -136,8 +136,8 @@ public: /** Determine whether the container has a member for the given token. */ bool HasToken (Token aToken) const; - - /** Return a token for an index in the range + + /** Return a token for an index in the range 0 <= index < GetTokenCount(). */ Token GetTokenForIndex (int nIndex); @@ -153,7 +153,7 @@ public: Origin GetOriginForToken (Token aToken); sal_Int32 GetTemplateIndexForToken (Token aToken); ::boost::shared_ptr<MasterPageDescriptor> GetDescriptorForToken (Token aToken); - + void InvalidatePreview (Token aToken); /** Return a preview for the specified token. When the preview is not diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerFiller.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainerFiller.cxx index 23663b4822ef..f83e1a6372fe 100644 --- a/sd/source/ui/toolpanel/controls/MasterPageContainerFiller.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPageContainerFiller.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 @@ -86,11 +86,11 @@ void MasterPageContainerFiller::RunNextStep (void) case SCAN_TEMPLATE: meState = ScanTemplate(); break; - + case ADD_TEMPLATE: meState = AddTemplate(); break; - + case DONE: case ERROR: default: @@ -124,7 +124,7 @@ bool MasterPageContainerFiller::HasNextStep (void) case DONE: case ERROR: return false; - + default: return true; } diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerFiller.hxx b/sd/source/ui/toolpanel/controls/MasterPageContainerFiller.hxx index c8ba61fef378..3c15fe6ea757 100644 --- a/sd/source/ui/toolpanel/controls/MasterPageContainerFiller.hxx +++ b/sd/source/ui/toolpanel/controls/MasterPageContainerFiller.hxx @@ -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 @@ -57,10 +57,10 @@ public: */ virtual void FillingDone (void) = 0; }; - + MasterPageContainerFiller (ContainerAdapter& rContainerAdapter); virtual ~MasterPageContainerFiller (void); - + /** Run the next step of the task. After HasNextStep() returns false this method should ignore further calls. */ @@ -85,7 +85,7 @@ private: ::std::auto_ptr<TemplateScanner> mpScannerTask; const TemplateEntry* mpLastAddedEntry; int mnIndex; - + State ScanTemplate (void); State AddTemplate (void); }; diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx index 61483f278a4f..53941ae398f2 100755 --- a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.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 @@ -65,7 +65,7 @@ Image PagePreviewProvider::operator () ( ::sd::PreviewRenderer& rRenderer) { Image aPreview; - + if (pPage != NULL) { // Use the given renderer to create a preview of the given page @@ -116,9 +116,9 @@ Image TemplatePreviewProvider::operator() ( { // Unused parameters. (void)nWidth; - (void)pPage; + (void)pPage; (void)rRenderer; - + // Load the thumbnail from a template document. uno::Reference<io::XInputStream> xIStream; @@ -129,11 +129,11 @@ Image TemplatePreviewProvider::operator() ( try { uno::Reference<lang::XSingleServiceFactory> xStorageFactory( - xServiceManager->createInstance( + xServiceManager->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.embed.StorageFactory")), uno::UNO_QUERY); - + if (xStorageFactory.is()) { uno::Sequence<uno::Any> aArgs (2); @@ -267,9 +267,9 @@ SdPage* TemplatePageObjectProvider::operator() (SdDrawDocument* pContainerDocume { // Unused parameters. (void)pContainerDocument; - + SdPage* pPage = NULL; - + mxDocumentShell = NULL; ::sd::DrawDocShell* pDocumentShell = NULL; try @@ -400,7 +400,7 @@ ExistingPageProvider::ExistingPageProvider (SdPage* pPage) SdPage* ExistingPageProvider::operator() (SdDrawDocument* pDocument) { (void)pDocument; // Unused parameter. - + return mpPage; } diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx index 071b23cdbb16..a561fbf9bbf0 100755 --- a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx +++ b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx @@ -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 diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.cxx index 35b02497575e..32f7f3edbffb 100644 --- a/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.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 @@ -145,7 +145,7 @@ bool MasterPageContainerQueue::RequestPreview (const SharedMasterPageDescriptor& && rpDescriptor->maLargePreview.GetSizePixel().Width() == 0) { sal_Int32 nPriority (CalculatePriority(rpDescriptor)); - + // Add a new or replace an existing request. RequestQueue::iterator iRequest (::std::find_if( mpRequestQueue->begin(), @@ -196,7 +196,7 @@ sal_Int32 MasterPageContainerQueue::CalculatePriority ( // Add a term that introduces an order based on the appearance in the // AllMasterPagesSelector. nPriority -= rpDescriptor->maToken / 3; - + // Process requests for the CurrentMasterPagesSelector first. if (rpDescriptor->meOrigin == MasterPageContainer::MASTERPAGE) nPriority += snMasterPagePriorityBoost; @@ -244,7 +244,7 @@ IMPL_LINK(MasterPageContainerQueue, DelayedPreviewCreation, Timer*, pTimer) } mpRequestQueue->erase(mpRequestQueue->begin()); - + if (aRequest.mpDescriptor.get() != NULL) { mnRequestsServedCount += 1; @@ -257,7 +257,7 @@ IMPL_LINK(MasterPageContainerQueue, DelayedPreviewCreation, Timer*, pTimer) } } while (false); - + if (mpRequestQueue->size() > 0 && ! bWaitForMoreRequests) { int nTimeout (snDelayedCreationTimeout); diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.hxx b/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.hxx index 3e8d31e67c1b..76a075dc324a 100644 --- a/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.hxx +++ b/sd/source/ui/toolpanel/controls/MasterPageContainerQueue.hxx @@ -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 @@ -81,7 +81,7 @@ public: templates are inserted into the MasterPageContainer. */ void ProcessAllRequests (void); - + private: ::boost::weak_ptr<ContainerAdapter> mpWeakContainer; class PreviewCreationRequest; @@ -93,7 +93,7 @@ private: // There are a couple of values that define various aspects of the // heuristic that defines the order and timing in which requests for // preview creation are processed. - + /** The time to wait (in milliseconds) between the creation of previews. */ static const sal_Int32 snDelayedCreationTimeout; @@ -101,7 +101,7 @@ private: /** The time to wait when the system is not idle. */ static const sal_Int32 snDelayedCreationTimeoutWhenNotIdle; - + /** Requests for previews of master pages in a document have their priority increased by this value. */ @@ -119,7 +119,7 @@ private: present. */ static sal_uInt32 snWaitForMoreRequestsCount; - + MasterPageContainerQueue (const ::boost::weak_ptr<ContainerAdapter>& rpContainer); void LateInit (void); @@ -127,7 +127,7 @@ private: are processed. */ sal_Int32 CalculatePriority (const SharedMasterPageDescriptor& rDescriptor) const; - + DECL_LINK(DelayedPreviewCreation, Timer *); }; diff --git a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx index 6871883d65f5..bbdbc09287cf 100755 --- a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.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 @@ -65,7 +65,7 @@ MasterPageDescriptor::MasterPageDescriptor ( mnUseCount(0) { } - + @@ -131,31 +131,31 @@ Image MasterPageDescriptor::GetPreview (MasterPageContainer::PreviewSize eSize) meOrigin = rDescriptor.meOrigin; bIndexChanged = true; } - + if (msURL.getLength()==0 && rDescriptor.msURL.getLength()!=0) { msURL = rDescriptor.msURL; bDataChanged = true; } - + if (msPageName.getLength()==0 && rDescriptor.msPageName.getLength()!=0) { msPageName = rDescriptor.msPageName; bDataChanged = true; } - + if (msStyleName.getLength()==0 && rDescriptor.msStyleName.getLength()!=0) { msStyleName = rDescriptor.msStyleName; bDataChanged = true; } - + if (mpPageObjectProvider.get()==NULL && rDescriptor.mpPageObjectProvider.get()!=NULL) { mpPageObjectProvider = rDescriptor.mpPageObjectProvider; bDataChanged = true; } - + if (mpPreviewProvider.get()==NULL && rDescriptor.mpPreviewProvider.get()!=NULL) { mpPreviewProvider = rDescriptor.mpPreviewProvider; @@ -180,7 +180,7 @@ Image MasterPageDescriptor::GetPreview (MasterPageContainer::PreviewSize eSize) if (bPreviewChanged) pResult->push_back(MasterPageContainerChangeEvent::PREVIEW_CHANGED); } - + return pResult; } @@ -192,14 +192,14 @@ bool MasterPageDescriptor::UpdatePageObject ( SdDrawDocument* pDocument) { bool bModified (false); - + // Update the page object when that is not yet known. if (mpMasterPage == NULL && mpPageObjectProvider.get()!=NULL && (nCostThreshold<0 || mpPageObjectProvider->GetCostIndex()<=nCostThreshold)) { // Note that pDocument may be NULL. - + SdPage* pPage = (*mpPageObjectProvider)(pDocument); if (meOrigin == MasterPageContainer::MASTERPAGE) { @@ -249,7 +249,7 @@ bool MasterPageDescriptor::UpdatePreview ( ::sd::PreviewRenderer& rRenderer) { bool bModified (false); - + // Update the preview when that is not yet known. if (maLargePreview.GetSizePixel().Width()==0 && mpPreviewProvider.get()!=NULL @@ -309,7 +309,7 @@ MasterPageDescriptor::URLClassification MasterPageDescriptor::GetURLClassificati meURLClassification = URLCLASS_USER; } } - + return meURLClassification; } @@ -361,7 +361,7 @@ bool MasterPageDescriptor::StyleNameComparator::operator() ( //===== PageObjectComparator ================================================== -MasterPageDescriptor::PageObjectComparator::PageObjectComparator (const SdPage* pPageObject) +MasterPageDescriptor::PageObjectComparator::PageObjectComparator (const SdPage* pPageObject) : mpMasterPage(pPageObject) { } diff --git a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx index 0303989e3379..2a31bab48ae2 100755 --- a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx +++ b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx @@ -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 @@ -70,7 +70,7 @@ public: ::std::auto_ptr<std::vector<MasterPageContainerChangeEvent::EventType> > Update ( const MasterPageDescriptor& rDescriptor); - + /** This convenience method returns either a small or a large preview, depending on the given size specifier. Note that the previews are not created when they are not present. @@ -81,18 +81,18 @@ public: /** Use the PreviewProvider to get access to a preview of the master page. - + Note that this is only done, when either bForce is <TRUE/> or the PreviewProvider::GetCostIndex() returns 0. - + The small preview is created by scaling the large one, not by calling PreviewProvider::operator() a second time. - + It is the responsibility of the caller to call UpdatePageObject() before calling this method when the PreviewProvider can only work when the master page object is present, i.e. its NeedsPageObject() method returns <TRUE/>. - + @param nCostThreshold When this is zero or positive then the preview is created only when the preview provider has a cost equal to or smaller than @@ -115,7 +115,7 @@ public: ::sd::PreviewRenderer& rRenderer); /** Use the PageObjectProvider to get access to the master page object. - + Note that this is only done, when either bForce is <TRUE/> or the PreviewProvider::GetCostIndex() returns 0. @@ -145,7 +145,7 @@ public: }; URLClassification GetURLClassification (void); - + /** The Token under which the MasterPageContainer gives access to the object. */ @@ -154,16 +154,16 @@ public: /** A rough specification of the origin of the master page. */ MasterPageContainer::Origin meOrigin; - + /** The URL is not empty for master pages loaded from a template document. */ ::rtl::OUString msURL; - + /** Taken from the title of the template file. */ ::rtl::OUString msPageName; - + /** Taken from the master page object. */ ::rtl::OUString msStyleName; @@ -173,17 +173,17 @@ public: /** The actual master page. */ SdPage* mpMasterPage; - + /** A slide that uses the master page. */ SdPage* mpSlide; - + /** A small (the default size) preview of the master page. May be empty. When this smaller preview is not empty then the larger one is not empty, too. */ Image maSmallPreview; - + /** A large preview of the master page. May be empty. When this larger preview is not empty then the smaller one is not empty, too. */ @@ -198,7 +198,7 @@ public: the lifetime of a MasterPageDescriptor object. */ ::boost::shared_ptr<PageObjectProvider> mpPageObjectProvider; - + /** This index represents the order in which templates are provided via the TemplateScanner. It defines the order in which the entries in the AllMasterPagesSelector are displayed. The default value is -1. diff --git a/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx b/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx index 2ba0cc678403..a25a1dde9e4a 100755 --- a/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPageObserver.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 @@ -61,7 +61,7 @@ public: document. */ void UnregisterDocument (SdDrawDocument& rDocument); - + /** Add a listener that is informed of master pages that are newly assigned to slides or become unassigned. @param rEventListener @@ -89,7 +89,7 @@ private: ::std::vector<Link> maListeners; struct DrawDocHash { - size_t operator()(SdDrawDocument* argument) const + size_t operator()(SdDrawDocument* argument) const { return reinterpret_cast<unsigned long>(argument); } }; typedef ::std::hash_map<SdDrawDocument*, @@ -132,7 +132,7 @@ MasterPageObserver& MasterPageObserver::Instance (void) { OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER(); } - + DBG_ASSERT(Implementation::mpInstance!=NULL, "MasterPageObserver::Instance(): instance is NULL"); return *Implementation::mpInstance; @@ -156,7 +156,7 @@ void MasterPageObserver::UnregisterDocument (SdDrawDocument& rDocument) - + void MasterPageObserver::AddEventListener (const Link& rEventListener) { @@ -222,7 +222,7 @@ void MasterPageObserver::Implementation::UnregisterDocument ( - + void MasterPageObserver::Implementation::AddEventListener ( const Link& rEventListener) { @@ -232,7 +232,7 @@ void MasterPageObserver::Implementation::AddEventListener ( rEventListener) == maListeners.end()) { maListeners.push_back (rEventListener); - + // Tell the new listener about all the master pages that are // currently in use. typedef ::std::vector<String> StringList; @@ -274,7 +274,7 @@ void MasterPageObserver::Implementation::RemoveEventListener ( -MasterPageObserver::MasterPageNameSet +MasterPageObserver::MasterPageNameSet MasterPageObserver::Implementation::GetMasterPageNames ( SdDrawDocument& rDocument) { @@ -354,8 +354,8 @@ void MasterPageObserver::Implementation::AnalyzeUsedMasterPages ( ::std::set<String>::iterator J; int i=0; - for (J=aOldMasterPagesDescriptor->second.begin(); - J!=aOldMasterPagesDescriptor->second.end(); + for (J=aOldMasterPagesDescriptor->second.begin(); + J!=aOldMasterPagesDescriptor->second.end(); ++J) OSL_TRACE("old used master page %d is %s", i++, @@ -376,8 +376,8 @@ void MasterPageObserver::Implementation::AnalyzeUsedMasterPages ( RTL_TEXTENCODING_UTF8).getStr()); MasterPageObserverEvent aEvent ( - MasterPageObserverEvent::ET_MASTER_PAGE_ADDED, - rDocument, + MasterPageObserverEvent::ET_MASTER_PAGE_ADDED, + rDocument, *I); SendEvent (aEvent); } @@ -397,7 +397,7 @@ void MasterPageObserver::Implementation::AnalyzeUsedMasterPages ( MasterPageObserverEvent aEvent ( MasterPageObserverEvent::ET_MASTER_PAGE_REMOVED, - rDocument, + rDocument, *I); SendEvent (aEvent); } diff --git a/sd/source/ui/toolpanel/controls/MasterPagesPanel.cxx b/sd/source/ui/toolpanel/controls/MasterPagesPanel.cxx index 8dab51e93a58..90600ebcec75 100755 --- a/sd/source/ui/toolpanel/controls/MasterPagesPanel.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPagesPanel.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 @@ -63,12 +63,12 @@ void MasterPagesPanel::impl_construct( ViewShellBase& rBase ) TitledControl* pTitledControl; ::boost::shared_ptr<MasterPageContainer> pContainer (new MasterPageContainer()); - + // Create a panel with the master pages that are in use by the currently // edited document. DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(rBase.GetMainViewShell().get()); pSelector.reset(new controls::CurrentMasterPagesSelector ( - this, + this, *pDocument, rBase, pContainer)); @@ -82,10 +82,10 @@ void MasterPagesPanel::impl_construct( ViewShellBase& rBase ) ::std::auto_ptr<TreeNode>(pSelector.release()), SdResId(STR_TASKPANEL_CURRENT_MASTER_PAGES_TITLE), HID_SD_CURRENT_MASTERS); - + // Create a panel with the most recently used master pages. pSelector.reset(new controls::RecentMasterPagesSelector ( - this, + this, *pDocument, rBase, pContainer)); @@ -102,7 +102,7 @@ void MasterPagesPanel::impl_construct( ViewShellBase& rBase ) // Create a panel with all available master pages. pSelector.reset(new controls::AllMasterPagesSelector ( - this, + this, *pDocument, rBase, *pDrawViewShell, diff --git a/sd/source/ui/toolpanel/controls/MasterPagesPanel.hxx b/sd/source/ui/toolpanel/controls/MasterPagesPanel.hxx index 932007802ebf..691cf0ac2bd5 100755 --- a/sd/source/ui/toolpanel/controls/MasterPagesPanel.hxx +++ b/sd/source/ui/toolpanel/controls/MasterPagesPanel.hxx @@ -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 @@ -51,7 +51,7 @@ class MasterPagesPanel { public: MasterPagesPanel ( - ::Window& i_rParentWindow, + ::Window& i_rParentWindow, ToolPanelViewShell& i_rPanelViewShell); virtual ~MasterPagesPanel (void); diff --git a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx index b321dbf8dd14..057d4c924f5f 100755 --- a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPagesSelector.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 @@ -85,7 +85,7 @@ using namespace ::com::sun::star::text; namespace sd { namespace toolpanel { namespace controls { -SFX_IMPL_INTERFACE(MasterPagesSelector, SfxShell, +SFX_IMPL_INTERFACE(MasterPagesSelector, SfxShell, SdResId(STR_MASTERPAGESSELECTOR)) { SFX_POPUPMENU_REGISTRATION( SdResId(RID_TASKPANE_MASTERPAGESSELECTOR_POPUP) ); @@ -190,7 +190,7 @@ Size MasterPagesSelector::GetPreferredSize (void) void MasterPagesSelector::UpdateLocks (const ItemList& rItemList) { ItemList aNewLockList; - + // In here we first lock the master pages in the given list and then // release the locks acquired in a previous call to this method. When // this were done the other way round the lock count of some master @@ -220,7 +220,7 @@ void MasterPagesSelector::UpdateLocks (const ItemList& rItemList) void MasterPagesSelector::Fill (void) { ::std::auto_ptr<ItemList> pItemList (new ItemList()); - + Fill(*pItemList); UpdateLocks(*pItemList); @@ -306,7 +306,7 @@ IMPL_LINK(MasterPagesSelector, ContextMenuCallback, CommandEvent*, pEvent) mpPageSet.get(), &aPosition); } - + return 0; } @@ -550,7 +550,7 @@ void MasterPagesSelector::Execute (SfxRequest& rRequest) break; case SID_TP_USE_FOR_NEW_PRESENTATIONS: - DBG_ASSERT (false, + DBG_ASSERT (false, "Using slides as default for new presentations" " is not yet implemented"); break; @@ -657,7 +657,7 @@ void MasterPagesSelector::SetItem ( mpPageSet->RemoveItem(nIndex); } } - + } @@ -721,7 +721,7 @@ void MasterPagesSelector::InvalidatePreview (const SdPage* pPage) void MasterPagesSelector::UpdateAllPreviews (void) { const ::osl::MutexGuard aGuard (maMutex); - + for (USHORT nIndex=1; nIndex<=mpPageSet->GetItemCount(); nIndex++) { UserData* pData = GetUserData(nIndex); @@ -827,13 +827,13 @@ void MasterPagesSelector::UpdateItemList (::std::auto_ptr<ItemList> pNewItemList SetItem(nIndex,*iNewItem); } } - + // Append new items. for ( ; iNewItem!=iNewEnd; ++iNewItem,++nIndex) { SetItem(nIndex,*iNewItem); } - + // Remove trailing items. for ( ; iCurrentItem!=iCurrentEnd; ++iCurrentItem,++nIndex) { @@ -841,7 +841,7 @@ void MasterPagesSelector::UpdateItemList (::std::auto_ptr<ItemList> pNewItemList } maCurrentItemList.swap(*pNewItemList); - + mpPageSet->Rearrange(); if (GetParentNode() != NULL) GetParentNode()->RequestResize(); diff --git a/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx b/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx index a2df51f2bd4b..0ca1207c36b4 100755 --- a/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx +++ b/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx @@ -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 @@ -45,7 +45,7 @@ class SdDrawDocument; class SdPage; class SfxModule; -namespace sd { +namespace sd { class DrawViewShell; class TemplateEntry; class TemplateDir; @@ -149,7 +149,7 @@ protected: sal_uInt16 mnDefaultClickAction; /** Pages with pointers in this queue have their previews updated eventually. Filled by InvalidatePreview() and operated upon by - UpdatePreviews(). + UpdatePreviews(). */ ::std::queue<USHORT> maPreviewUpdateQueue; @@ -218,7 +218,7 @@ private: DECL_LINK(RightClickHandler, MouseEvent*); DECL_LINK(ContextMenuCallback, CommandEvent*); DECL_LINK(ContainerChangeListener, MasterPageContainerChangeEvent*); - + void SetItem ( USHORT nIndex, MasterPageContainer::Token aToken); diff --git a/sd/source/ui/toolpanel/controls/PreviewValueSet.cxx b/sd/source/ui/toolpanel/controls/PreviewValueSet.cxx index a1f29dfee044..f1b4ba8d196b 100644 --- a/sd/source/ui/toolpanel/controls/PreviewValueSet.cxx +++ b/sd/source/ui/toolpanel/controls/PreviewValueSet.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 @@ -44,13 +44,13 @@ PreviewValueSet::PreviewValueSet (TreeNode* pParent) mnMaxColumnCount(-1) { SetStyle ( - GetStyle() + GetStyle() & ~(WB_ITEMBORDER)// | WB_MENUSTYLEVALUESET) // | WB_FLATVALUESET); ); SetColCount(2); - // SetLineCount(1); + // SetLineCount(1); SetExtraSpacing (2); } @@ -129,7 +129,7 @@ void PreviewValueSet::Command (const CommandEvent& rEvent) maContextMenuCallback.Call(&aNonConstEventCopy); } break; - + default: ValueSet::Command(rEvent); break; @@ -216,7 +216,7 @@ sal_Int32 PreviewValueSet::GetPreferredWidth (sal_Int32 nHeight) { int nColumnCount = (GetItemCount()+nRowCount-1) / nRowCount; if (nColumnCount > 0) - nPreferredWidth = (maPreviewSize.Width() + 2*mnBorderWidth) + nPreferredWidth = (maPreviewSize.Width() + 2*mnBorderWidth) * nColumnCount; } @@ -230,7 +230,7 @@ sal_Int32 PreviewValueSet::GetPreferredHeight (sal_Int32 nWidth) { int nRowCount (CalculateRowCount(CalculateColumnCount(nWidth))); int nItemHeight (maPreviewSize.Height()); - + return nRowCount * (nItemHeight + 2*mnBorderHeight); } diff --git a/sd/source/ui/toolpanel/controls/PreviewValueSet.hxx b/sd/source/ui/toolpanel/controls/PreviewValueSet.hxx index 69fa7e272330..b2cb6903e002 100644 --- a/sd/source/ui/toolpanel/controls/PreviewValueSet.hxx +++ b/sd/source/ui/toolpanel/controls/PreviewValueSet.hxx @@ -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 @@ -50,7 +50,7 @@ public: void SetRightMouseClickHandler (const Link& rLink); virtual void Paint (const Rectangle& rRect); virtual void Resize (void); - + /** When a request for the display of a context menu is made to this method then that request is forwarded via the ContextMenuCallback. This way the owning class can handle the context menu without having @@ -86,7 +86,7 @@ private: const int mnBorderWidth; const int mnBorderHeight; const int mnMaxColumnCount; - + USHORT CalculateColumnCount (int nWidth) const; USHORT CalculateRowCount (USHORT nColumnCount) const; }; diff --git a/sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.cxx index 2f2789216b8d..1a252baaf31a 100644 --- a/sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.cxx +++ b/sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.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 @@ -113,7 +113,7 @@ void RecentMasterPagesSelector::Fill (ItemList& rItemList) if (aToken != MasterPageContainer::NIL_TOKEN) { String sStyleName (mpContainer->GetStyleNameForToken(aToken)); - if (sStyleName.Len()==0 + if (sStyleName.Len()==0 || aCurrentNames.find(sStyleName) == aCurrentNames.end()) { rItemList.push_back(aToken); @@ -130,7 +130,7 @@ void RecentMasterPagesSelector::AssignMasterPageToPageList ( const ::boost::shared_ptr<std::vector<SdPage*> >& rpPageList) { USHORT nSelectedItemId = mpPageSet->GetSelectItemId(); - + MasterPagesSelector::AssignMasterPageToPageList(pMasterPage, rpPageList); // Restore the selection. diff --git a/sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.hxx b/sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.hxx index adac66187b71..5bc85209dc15 100644 --- a/sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.hxx +++ b/sd/source/ui/toolpanel/controls/RecentMasterPagesSelector.hxx @@ -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 @@ -40,7 +40,7 @@ class RecentMasterPagesSelector { public: RecentMasterPagesSelector ( - TreeNode* pParent, + TreeNode* pParent, SdDrawDocument& rDocument, ViewShellBase& rBase, const ::boost::shared_ptr<MasterPageContainer>& rpContainer); diff --git a/sd/source/ui/toolpanel/controls/RecentlyUsedMasterPages.cxx b/sd/source/ui/toolpanel/controls/RecentlyUsedMasterPages.cxx index 63d7f72e2903..a7e40021435a 100644 --- a/sd/source/ui/toolpanel/controls/RecentlyUsedMasterPages.cxx +++ b/sd/source/ui/toolpanel/controls/RecentlyUsedMasterPages.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 @@ -140,7 +140,7 @@ RecentlyUsedMasterPages& RecentlyUsedMasterPages::Instance (void) else { OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER(); } - + return *mpInstance; } @@ -162,7 +162,7 @@ RecentlyUsedMasterPages::~RecentlyUsedMasterPages (void) { Link aLink (LINK(this,RecentlyUsedMasterPages,MasterPageContainerChangeListener)); mpContainer->RemoveChangeListener(aLink); - + MasterPageObserver::Instance().RemoveEventListener( LINK(this,RecentlyUsedMasterPages,MasterPageChangeListener)); } @@ -174,7 +174,7 @@ void RecentlyUsedMasterPages::LateInit (void) { Link aLink (LINK(this,RecentlyUsedMasterPages,MasterPageContainerChangeListener)); mpContainer->AddChangeListener(aLink); - + LoadPersistentValues (); MasterPageObserver::Instance().AddEventListener( LINK(this,RecentlyUsedMasterPages,MasterPageChangeListener)); diff --git a/sd/source/ui/toolpanel/controls/RecentlyUsedMasterPages.hxx b/sd/source/ui/toolpanel/controls/RecentlyUsedMasterPages.hxx index 1f16d31b95d5..a786a8513ffc 100644 --- a/sd/source/ui/toolpanel/controls/RecentlyUsedMasterPages.hxx +++ b/sd/source/ui/toolpanel/controls/RecentlyUsedMasterPages.hxx @@ -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 @@ -60,7 +60,7 @@ public: void AddEventListener (const Link& rEventListener); void RemoveEventListener (const Link& rEventListener); - + int GetMasterPageCount (void) const; MasterPageContainer::Token GetTokenForIndex (sal_uInt32 nIndex) const; @@ -76,7 +76,7 @@ private: ::std::auto_ptr<MasterPageList> mpMasterPages; unsigned long int mnMaxListSize; ::boost::shared_ptr<MasterPageContainer> mpContainer; - + RecentlyUsedMasterPages (void); virtual ~RecentlyUsedMasterPages (void); diff --git a/sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx b/sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx index 4ad67b876983..7a58923b43b2 100755 --- a/sd/source/ui/toolpanel/controls/SlideTransitionPanel.cxx +++ b/sd/source/ui/toolpanel/controls/SlideTransitionPanel.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 diff --git a/sd/source/ui/toolpanel/controls/SlideTransitionPanel.hxx b/sd/source/ui/toolpanel/controls/SlideTransitionPanel.hxx index f62cb918806b..e2135c7da546 100755 --- a/sd/source/ui/toolpanel/controls/SlideTransitionPanel.hxx +++ b/sd/source/ui/toolpanel/controls/SlideTransitionPanel.hxx @@ -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 diff --git a/sd/source/ui/toolpanel/controls/TableDesignPanel.cxx b/sd/source/ui/toolpanel/controls/TableDesignPanel.cxx index d6507a25c11f..f199429c244e 100755 --- a/sd/source/ui/toolpanel/controls/TableDesignPanel.cxx +++ b/sd/source/ui/toolpanel/controls/TableDesignPanel.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 @@ -37,11 +37,11 @@ #include "sdresid.hxx" namespace sd -{ - +{ + class ViewShellBase; extern ::Window * createTableDesignPanel( ::Window* pParent, ViewShellBase& rBase ); - + namespace toolpanel { namespace controls { diff --git a/sd/source/ui/toolpanel/controls/TableDesignPanel.hxx b/sd/source/ui/toolpanel/controls/TableDesignPanel.hxx index a3620df2ef68..eef21450db3b 100755 --- a/sd/source/ui/toolpanel/controls/TableDesignPanel.hxx +++ b/sd/source/ui/toolpanel/controls/TableDesignPanel.hxx @@ -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 @@ -47,7 +47,7 @@ class TableDesignPanel { public: TableDesignPanel ( - ::Window& i_rParentWindow, + ::Window& i_rParentWindow, ToolPanelViewShell& i_rPanelViewShell); virtual ~TableDesignPanel (void); |