summaryrefslogtreecommitdiff
path: root/sd/source/ui/toolpanel/controls
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/toolpanel/controls')
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/AnimationSchemesPanel.cxx86
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx70
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageContainer.cxx148
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageContainer.hxx10
-rwxr-xr-xsd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx40
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx15
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx22
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx5
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPageObserver.cxx9
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx30
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx6
-rwxr-xr-x[-rw-r--r--]sd/source/ui/toolpanel/controls/makefile.mk3
12 files changed, 157 insertions, 287 deletions
diff --git a/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.cxx b/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.cxx
index c4fc41e97744..730fc74795f2 100644..100755
--- a/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.cxx
+++ b/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.cxx
@@ -24,7 +24,93 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+/*************************************************************************
+ *
+ * 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
+ *
+ * $RCSfile: AnimationSchemesPanel.cxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sd.hxx"
+#include "AnimationSchemesPanel.hxx"
+
+#include "strings.hrc"
+#include "sdresid.hxx"
+#include <com/sun/star/frame/XModel.hpp>
+
+namespace sd
+{
+
+ class ViewShellBase;
+ extern ::Window * createAnimationSchemesPanel( ::Window* pParent, ViewShellBase& rBase );
+
+namespace toolpanel { namespace controls {
+
+AnimationSchemesPanel::AnimationSchemesPanel(TreeNode* pParent, ViewShellBase& rBase)
+ : SubToolPanel (pParent),
+ maPreferredSize( 100, 200 )
+{
+ mpWrappedControl = createAnimationSchemesPanel( pParent->GetWindow(), rBase );
+ mpWrappedControl->Show();
+}
+
+AnimationSchemesPanel::~AnimationSchemesPanel()
+{
+ delete mpWrappedControl;
+}
+
+Size AnimationSchemesPanel::GetPreferredSize()
+{
+ return maPreferredSize;
+}
+sal_Int32 AnimationSchemesPanel::GetPreferredWidth(sal_Int32 )
+{
+ return maPreferredSize.Width();
+}
+sal_Int32 AnimationSchemesPanel::GetPreferredHeight(sal_Int32 )
+{
+ return maPreferredSize.Height();
+}
+::Window* AnimationSchemesPanel::GetWindow()
+{
+ return mpWrappedControl;
+}
+bool AnimationSchemesPanel::IsResizable()
+{
+ return true;
+}
+bool AnimationSchemesPanel::IsExpandable() const
+{
+ return true;
+}
+
+
+} } } // end of namespace ::sd::toolpanel::controls
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
#include "AnimationSchemesPanel.hxx"
diff --git a/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx b/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx
index 4cee546dae0d..dd3388fb0342 100644..100755
--- a/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx
+++ b/sd/source/ui/toolpanel/controls/AnimationSchemesPanel.hxx
@@ -24,6 +24,35 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
+/*************************************************************************
+ *
+ * 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
+ *
+ * $RCSfile: AnimationSchemesPanel.hxx,v $
+ * $Revision: 1.6 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
#ifndef SD_TASKPANE_CONTROLS_ANIMATION_SCHEMES_PANEL_HXX
#define SD_TASKPANE_CONTROLS_ANIMATION_SCHEMES_PANEL_HXX
@@ -66,3 +95,44 @@ private:
} } } // end of namespace ::sd::toolpanel::controls
#endif
+#ifndef SD_TASKPANE_CONTROLS_ANIMATION_SCHEMES_PANEL_HXX
+#define SD_TASKPANE_CONTROLS_ANIMATION_SCHEMES_PANEL_HXX
+
+#include "taskpane/SubToolPanel.hxx"
+
+namespace sd {
+class ViewShellBase;
+}
+
+namespace sd { namespace toolpanel {
+class TreeNode;
+} }
+
+namespace sd { namespace toolpanel { namespace controls {
+
+class AnimationSchemesPanel
+ : public SubToolPanel
+{
+public:
+ AnimationSchemesPanel (
+ TreeNode* pParent,
+ ViewShellBase& rBase);
+ virtual ~AnimationSchemesPanel (void);
+
+ virtual Size GetPreferredSize (void);
+ virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeigh);
+ virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
+ virtual ::Window* GetWindow (void);
+ virtual bool IsResizable (void);
+ virtual bool IsExpandable (void) const;
+
+ using Window::GetWindow;
+
+private:
+ Size maPreferredSize;
+ ::Window* mpWrappedControl;
+};
+
+} } } // end of namespace ::sd::toolpanel::controls
+
+#endif
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx
index 444ecd6dacb4..80a094ec1a66 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx
@@ -73,24 +73,6 @@ namespace {
typedef ::std::vector<SharedMasterPageDescriptor> MasterPageContainerType;
-
-class PreviewCreationRequest
-{
-public:
- PreviewCreationRequest (MasterPageContainer::Token aToken, int nPriority);
- MasterPageContainer::Token maToken;
- int mnPriority;
- class Compare {public:
- bool operator() (const PreviewCreationRequest& r1,const PreviewCreationRequest& r2);
- };
- class CompareToken {public:
- MasterPageContainer::Token maToken;
- CompareToken(MasterPageContainer::Token aToken);
- bool operator() (const PreviewCreationRequest& rRequest);
- };
-};
-
-
} // end of anonymous namespace
@@ -423,28 +405,6 @@ MasterPageContainer::Token MasterPageContainer::GetTokenForURL (
-MasterPageContainer::Token MasterPageContainer::GetTokenForPageName (
- const String& sPageName)
-{
- const ::osl::MutexGuard aGuard (mpImpl->maMutex);
-
- Token aResult (NIL_TOKEN);
- if (sPageName.Len() > 0)
- {
- MasterPageContainerType::iterator iEntry (
- ::std::find_if (
- mpImpl->maContainer.begin(),
- mpImpl->maContainer.end(),
- MasterPageDescriptor::PageNameComparator(sPageName)));
- if (iEntry != mpImpl->maContainer.end())
- aResult = (*iEntry)->maToken;
- }
- return aResult;
-}
-
-
-
-
MasterPageContainer::Token MasterPageContainer::GetTokenForStyleName (const String& sStyleName)
{
const ::osl::MutexGuard aGuard (mpImpl->maMutex);
@@ -589,46 +549,6 @@ sal_Int32 MasterPageContainer::GetTemplateIndexForToken (Token aToken)
-void MasterPageContainer::SetPreviewProviderForToken (
- Token aToken,
- const ::boost::shared_ptr<PreviewProvider>& rpPreviewProvider)
-{
- const ::osl::MutexGuard aGuard (mpImpl->maMutex);
-
- SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken);
- if (pDescriptor.get()!=NULL)
- {
- pDescriptor->mpPreviewProvider = rpPreviewProvider;
- mpImpl->InvalidatePreview(aToken);
- }
-}
-
-
-
-
-SdPage* MasterPageContainer::GetSlideForToken (
- MasterPageContainer::Token aToken,
- bool bLoad)
-{
- const ::osl::MutexGuard aGuard (mpImpl->maMutex);
-
- SdPage* pSlide = NULL;
- SharedMasterPageDescriptor pDescriptor = mpImpl->GetDescriptor(aToken);
- if (pDescriptor.get() != NULL)
- {
- pSlide = pDescriptor->mpSlide;
- if (pSlide==NULL && bLoad)
- {
- GetPageObjectForToken(aToken, bLoad);
- pSlide = pDescriptor->mpSlide;
- }
- }
- return pSlide;
-}
-
-
-
-
SharedMasterPageDescriptor MasterPageContainer::GetDescriptorForToken (
MasterPageContainer::Token aToken)
{
@@ -639,19 +559,6 @@ SharedMasterPageDescriptor MasterPageContainer::GetDescriptorForToken (
-
-bool MasterPageContainer::UpdateDescriptor (
- const SharedMasterPageDescriptor& rpDescriptor,
- bool bForcePageObject,
- bool bForcePreview,
- bool bSendEvents)
-{
- return mpImpl->UpdateDescriptor(rpDescriptor, bForcePageObject, bForcePreview, bSendEvents);
-}
-
-
-
-
void MasterPageContainer::InvalidatePreview (MasterPageContainer::Token aToken)
{
mpImpl->InvalidatePreview(aToken);
@@ -1311,58 +1218,3 @@ void MasterPageContainer::Implementation::FillingDone (void)
} } } // end of namespace ::sd::toolpanel::controls
-
-
-
-
-namespace {
-
-//===== PreviewCreationRequest ================================================
-
-PreviewCreationRequest::PreviewCreationRequest (
- MasterPageContainer::Token aToken,
- int nPriority)
- : maToken(aToken),
- mnPriority(nPriority)
-{
-}
-
-
-
-
-bool PreviewCreationRequest::Compare::operator() (
- const PreviewCreationRequest& aRequest1,
- const PreviewCreationRequest& aRequest2)
-{
- if (aRequest1.mnPriority != aRequest2.mnPriority)
- {
- // Prefer requests with higher priority.
- return aRequest1.mnPriority > aRequest2.mnPriority;
- }
- else
- {
- // Prefer tokens that have been earlier created (those with lower
- // value).
- return aRequest1.maToken < aRequest2.maToken;
- }
-}
-
-
-
-
-PreviewCreationRequest::CompareToken::CompareToken (MasterPageContainer::Token aToken)
- : maToken(aToken)
-{
-}
-
-
-
-
-bool PreviewCreationRequest::CompareToken::operator() (const PreviewCreationRequest& aRequest)
-{
- return maToken==aRequest.maToken;
-}
-
-
-
-} // end of anonymous namespace
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainer.hxx b/sd/source/ui/toolpanel/controls/MasterPageContainer.hxx
index d922c089ffb4..60f760f63e34 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageContainer.hxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainer.hxx
@@ -143,26 +143,16 @@ public:
Token GetTokenForIndex (int nIndex);
Token GetTokenForURL (const String& sURL);
- Token GetTokenForPageName (const String& sPageName);
Token GetTokenForStyleName (const String& sStyleName);
Token GetTokenForPageObject (const SdPage* pPage);
String GetURLForToken (Token aToken);
String GetPageNameForToken (Token aToken);
String GetStyleNameForToken (Token aToken);
- SdPage* GetSlideForToken (Token aToken, bool bLoad=true);
SdPage* GetPageObjectForToken (Token aToken, bool bLoad=true);
Origin GetOriginForToken (Token aToken);
sal_Int32 GetTemplateIndexForToken (Token aToken);
::boost::shared_ptr<MasterPageDescriptor> GetDescriptorForToken (Token aToken);
- bool UpdateDescriptor (
- const ::boost::shared_ptr<MasterPageDescriptor>& rpDescriptor,
- bool bForcePageObject,
- bool bForcePreview,
- bool bSendEvents);
-
- void SetPreviewProviderForToken (Token aToken,
- const ::boost::shared_ptr<PreviewProvider>& rpPreviewProvider);
void InvalidatePreview (Token aToken);
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx
index 9a5eefb6d925..61483f278a4f 100755
--- a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx
@@ -387,46 +387,6 @@ bool DefaultPageObjectProvider::operator== (const PageObjectProvider& rProvider)
-//===== DefaultPagePreviewProvider ============================================
-
-DefaultPagePreviewProvider::DefaultPagePreviewProvider (void)
-{
-}
-
-
-
-Image DefaultPagePreviewProvider::operator() (
- int nWidth,
- SdPage* pPage,
- ::sd::PreviewRenderer& rRenderer)
-{
- // Unused parameters.
- (void)nWidth;
- (void)pPage;
- (void)rRenderer;
-
- return Image();
-}
-
-
-
-
-int DefaultPagePreviewProvider::GetCostIndex (void)
-{
- return 0;
-}
-
-
-
-
-bool DefaultPagePreviewProvider::NeedsPageObject (void)
-{
- return false;
-}
-
-
-
-
//===== ExistingPageProvider ==================================================
ExistingPageProvider::ExistingPageProvider (SdPage* pPage)
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx
index 7cde148b3e3d..071b23cdbb16 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.hxx
@@ -170,21 +170,6 @@ public:
-
-/** Used temporarily to avoid the (expensive) creation of the default page
- too early.
-*/
-class DefaultPagePreviewProvider : public PreviewProvider
-{
-public:
- DefaultPagePreviewProvider (void);
- virtual Image operator() (int nWidth, SdPage* pPage, ::sd::PreviewRenderer& rRenderer);
- virtual int GetCostIndex (void);
- virtual bool NeedsPageObject (void);
-};
-
-
-
/** This implementation of the PageObjectProvider simply returns an already
existing master page object.
*/
diff --git a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx
index 49ae6dff264d..6871883d65f5 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx
@@ -337,28 +337,6 @@ bool MasterPageDescriptor::URLComparator::operator() (
-//===== PageNameComparator ====================================================
-
-MasterPageDescriptor::PageNameComparator::PageNameComparator (const ::rtl::OUString& sPageName)
- : msPageName(sPageName)
-{
-}
-
-
-
-
-bool MasterPageDescriptor::PageNameComparator::operator() (
- const SharedMasterPageDescriptor& rDescriptor)
-{
- if (rDescriptor.get() == NULL)
- return false;
- else
- return rDescriptor->msPageName.equals(msPageName);
-}
-
-
-
-
// ===== StyleNameComparator ==================================================
MasterPageDescriptor::StyleNameComparator::StyleNameComparator (const ::rtl::OUString& sStyleName)
diff --git a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx
index 1eea46bd1802..0303989e3379 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.hxx
@@ -214,11 +214,6 @@ public:
URLComparator (const ::rtl::OUString& sURL);
bool operator() (const SharedMasterPageDescriptor& rDescriptor);
};
- class PageNameComparator { public:
- ::rtl::OUString msPageName;
- PageNameComparator (const ::rtl::OUString& sPageName);
- bool operator() (const SharedMasterPageDescriptor& rDescriptor);
- };
class StyleNameComparator { public:
::rtl::OUString msStyleName;
StyleNameComparator (const ::rtl::OUString& sStyleName);
diff --git a/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx b/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx
index 0f485174009d..2ba0cc678403 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageObserver.cxx
@@ -187,15 +187,6 @@ MasterPageObserver::~MasterPageObserver (void)
-MasterPageObserver::MasterPageNameSet MasterPageObserver::GetMasterPageNames (
- SdDrawDocument& rDocument)
-{
- return mpImpl->GetMasterPageNames (rDocument);
-}
-
-
-
-
//===== MasterPageObserver::Implementation ====================================
void MasterPageObserver::Implementation::RegisterDocument (
diff --git a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
index 4571d4278140..b321dbf8dd14 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
@@ -41,7 +41,6 @@
#include "app.hrc"
#include "res_bmp.hrc"
#include "strings.hrc"
-#include "showview.hxx"
#include "DrawViewShell.hxx"
#include "DrawController.hxx"
#include "SlideSorterViewShell.hxx"
@@ -699,21 +698,6 @@ void MasterPagesSelector::RemoveTokenToIndexEntry (
-void MasterPagesSelector::InvalidatePreview (MasterPageContainer::Token aToken)
-{
- const ::osl::MutexGuard aGuard (maMutex);
-
- int nIndex (GetIndexForToken(aToken));
- if (nIndex > 0)
- {
- mpContainer->InvalidatePreview(aToken);
- mpContainer->RequestPreview(aToken);
- }
-}
-
-
-
-
void MasterPagesSelector::InvalidatePreview (const SdPage* pPage)
{
const ::osl::MutexGuard aGuard (maMutex);
@@ -734,20 +718,6 @@ void MasterPagesSelector::InvalidatePreview (const SdPage* pPage)
}
}
-
-
-
-void MasterPagesSelector::InvalidateAllPreviews (void)
-{
- const ::osl::MutexGuard aGuard (maMutex);
-
- for (USHORT nIndex=1; nIndex<=mpPageSet->GetItemCount(); nIndex++)
- InvalidatePreview(nIndex);
-}
-
-
-
-
void MasterPagesSelector::UpdateAllPreviews (void)
{
const ::osl::MutexGuard aGuard (maMutex);
diff --git a/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx b/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx
index a480729aa9c8..a2df51f2bd4b 100644..100755
--- a/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx
+++ b/sd/source/ui/toolpanel/controls/MasterPagesSelector.hxx
@@ -131,14 +131,8 @@ public:
Index into the value set control that is used for displaying the
previews.
*/
- void InvalidatePreview (MasterPageContainer::Token aToken);
void InvalidatePreview (const SdPage* pPage);
- /** Mark all previews as no being up-to-date anymore. This method is
- typically called when the size of the previews has changed.
- */
- void InvalidateAllPreviews (void);
-
void UpdateAllPreviews (void);
protected:
diff --git a/sd/source/ui/toolpanel/controls/makefile.mk b/sd/source/ui/toolpanel/controls/makefile.mk
index 33871a415a7e..b2218e55008c 100644..100755
--- a/sd/source/ui/toolpanel/controls/makefile.mk
+++ b/sd/source/ui/toolpanel/controls/makefile.mk
@@ -59,8 +59,7 @@ SLOFILES = \
$(SLO)$/RecentMasterPagesSelector.obj \
$(SLO)$/CustomAnimationPanel.obj \
$(SLO)$/SlideTransitionPanel.obj \
- $(SLO)$/TableDesignPanel.obj \
- $(SLO)$/AnimationSchemesPanel.obj
+ $(SLO)$/TableDesignPanel.obj
# --- Tagets -------------------------------------------------------