[Libreoffice-commits] .: 10 commits - comphelper/inc comphelper/source connectivity/source reportbuilder/java reportdesign/source sd/inc sd/source sfx2/source shell/source
Thorsten Behrens
thorsten at kemper.freedesktop.org
Tue Nov 29 08:58:02 PST 2011
comphelper/inc/comphelper/namedvaluecollection.hxx | 8
comphelper/source/misc/namedvaluecollection.cxx | 13
connectivity/source/commontools/FValue.cxx | 10
reportbuilder/java/com/sun/star/report/pentaho/StarFunctionCategory.java | 16
reportbuilder/java/com/sun/star/report/pentaho/StarFunctionDescription.java | 18
reportdesign/source/core/api/FixedLine.cxx | 5
reportdesign/source/core/api/FixedText.cxx | 5
reportdesign/source/core/api/FormattedField.cxx | 5
reportdesign/source/core/api/ImageControl.cxx | 5
reportdesign/source/core/api/ReportDefinition.cxx | 6
reportdesign/source/core/api/Shape.cxx | 5
sd/inc/Outliner.hxx | 17
sd/source/ui/slidesorter/controller/SlideSorterController.cxx | 20
sd/source/ui/slidesorter/controller/SlsClipboard.cxx | 38 +
sd/source/ui/slidesorter/controller/SlsListener.cxx | 10
sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx | 8
sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx | 1
sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx | 1
sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx | 2
sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx | 2
sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx | 29
sd/source/ui/slidesorter/view/SlsButtonBar.cxx | 13
sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx | 25
sd/source/ui/view/Outliner.cxx | 367 +++++-----
sd/source/ui/view/OutlinerIterator.cxx | 4
sfx2/source/notify/eventsupplier.cxx | 4
shell/source/win32/zipfile/zipfile.cxx | 3
27 files changed, 422 insertions(+), 218 deletions(-)
New commits:
commit 2e76553c7cfbcb08146e1b66129536192df4f2e1
Author: Thorsten Behrens <tbehrens at suse.com>
Date: Tue Nov 29 17:56:48 2011 +0100
Fix previous merges to build.
diff --git a/sd/source/ui/slidesorter/view/SlsButtonBar.cxx b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
index 5ecdad5..d2fa7c7 100644
--- a/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
+++ b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
@@ -1344,8 +1344,8 @@ void StartShowButton::ProcessClick (const model::SharedPageDescriptor& rpDescrip
// StartWithActualPage to make the slide show use the
// specified first page.
const DocumentType eType (mrSlideSorter.GetModel().GetDocument()->GetDocumentType());
- const BOOL bSavedState (SD_MOD()->GetSdOptions(eType)->IsStartWithActualPage());
- SD_MOD()->GetSdOptions(eType)->SetStartWithActualPage(FALSE);
+ const sal_Bool bSavedState (SD_MOD()->GetSdOptions(eType)->IsStartWithActualPage());
+ SD_MOD()->GetSdOptions(eType)->SetStartWithActualPage(sal_False);
xPresentation->startWithArguments(aProperties);
commit 6e26550c8262b416dfd38df082f9fbf340c57516
Author: mst <mst at openoffice.org>
Date: Sat Sep 17 22:43:38 2011 +0000
slidesorter1: #i116412# Temporarily turning off slide tracking to avoid unwanted repositioning of visible area.
* found as LGPLv3-only fix at svn rev 1172132 (http://svn.apache.org/viewvc?view=revision&revision=1172132)
diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
index 94caa8f..e07d77d 100644
--- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
@@ -46,6 +46,7 @@
#include "controller/SlsSelectionManager.hxx"
#include "controller/SlsTransferable.hxx"
#include "controller/SlsSelectionObserver.hxx"
+#include "controller/SlsVisibleAreaManager.hxx"
#include "cache/SlsPageCache.hxx"
#include "ViewShellBase.hxx"
@@ -84,6 +85,37 @@
namespace sd { namespace slidesorter { namespace controller {
+namespace {
+/** Temporarily deactivate slide tracking of the VisibleAreaManager.
+ This is used as a workaround to avoid unwanted repositioning of
+ the visible area when the selection of slides is copied to the
+ clipboard (cloning of slides leads to model change notifications
+ for the original model.)
+*/
+class TemporarySlideTrackingDeactivator
+{
+public:
+ TemporarySlideTrackingDeactivator (SlideSorterController& rController)
+ : mrController(rController),
+ mbIsCurrentSlideTrackingActive (
+ mrController.GetVisibleAreaManager().IsCurrentSlideTrackingActive())
+ {
+ if (mbIsCurrentSlideTrackingActive)
+ mrController.GetVisibleAreaManager().DeactivateCurrentSlideTracking();
+ }
+ ~TemporarySlideTrackingDeactivator (void)
+ {
+ if (mbIsCurrentSlideTrackingActive)
+ mrController.GetVisibleAreaManager().ActivateCurrentSlideTracking();
+ }
+
+private:
+ SlideSorterController& mrController;
+ const bool mbIsCurrentSlideTrackingActive;
+};
+} // end of anonymous namespace
+
+
class Clipboard::UndoContext
{
public:
@@ -466,7 +498,11 @@ void Clipboard::CreateSlideTransferable (
pTransferable->SetStartPos (pActionWindow->PixelToLogic(
pActionWindow->GetPointerPosPixel()));
pTransferable->SetObjectDescriptor (aObjDesc);
- pTransferable->SetPageBookmarks (aBookmarkList, !bDrag);
+
+ {
+ TemporarySlideTrackingDeactivator aDeactivator (mrController);
+ pTransferable->SetPageBookmarks (aBookmarkList, !bDrag);
+ }
for (void* p=aBookmarkList.First(); p!=NULL; p=aBookmarkList.Next())
delete static_cast<String*>(p);
diff --git a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
index 6f07413..5861232 100644
--- a/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsVisibleAreaManager.cxx
@@ -94,6 +94,14 @@ void VisibleAreaManager::DeactivateCurrentSlideTracking (void)
+bool VisibleAreaManager::IsCurrentSlideTrackingActive (void) const
+{
+ return mbIsCurrentSlideTrackingActive;
+}
+
+
+
+
void VisibleAreaManager::RequestVisible (
const model::SharedPageDescriptor& rpDescriptor,
const bool bForce)
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx
index 7108574..11049fb 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsVisibleAreaManager.hxx
@@ -48,6 +48,7 @@ public:
void ActivateCurrentSlideTracking (void);
void DeactivateCurrentSlideTracking (void);
+ bool IsCurrentSlideTrackingActive (void) const;
/** Request the current slide to be moved into the visible area.
This request is only obeyed when the current slide tracking is
commit bdfbbb33a491f3ce34375de14ba33436b047e88b
Author: mst <mst at openoffice.org>
Date: Sat Sep 17 22:43:23 2011 +0000
slidesorter1: #i116014# Outliner holds ViewShell as weak_ptr.
* found as LGPLv3-only fix at svn rev 1172131 (http://svn.apache.org/viewvc?view=revision&revision=1172131)
diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx
index aa75c76..805b1ef 100644
--- a/sd/inc/Outliner.hxx
+++ b/sd/inc/Outliner.hxx
@@ -36,6 +36,8 @@
#include <editeng/SpellPortions.hxx>
#include <memory>
#include <boost/shared_ptr.hpp>
+#include <boost/weak_ptr.hpp>
+#include <boost/noncopyable.hpp>
class Dialog;
class SdPage;
@@ -105,7 +107,8 @@ class Window;
</p>
*/
class Outliner
- : public SdrOutliner
+ : public SdrOutliner,
+ public ::boost::noncopyable
{
public:
friend class ::sd::outliner::OutlinerContainer;
@@ -194,8 +197,11 @@ private:
/// The view which displays the searched objects.
::sd::View* mpView;
- /// The view shell containing the view.
- ::boost::shared_ptr<ViewShell> mpViewShell;
+ /** The view shell containing the view. It is held as weak
+ pointer to avoid keeping it alive when the view is changed
+ during searching.
+ */
+ ::boost::weak_ptr<ViewShell> mpWeakViewShell;
/// This window contains the view.
::sd::Window* mpWindow;
/// The document on whose objects and pages this class operates.
@@ -347,11 +353,6 @@ private:
*/
bool mbPrepareSpellingPending;
- /** In this flag we store whether the view shell is valid and may be
- accessed.
- */
- bool mbViewShellValid;
-
/** Initialize the object iterator. Call this method after being
invoked from the search or spellcheck dialog. It creates a new
iterator pointing at the current object when this has not been done
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
index 40fed69..c376e45 100644
--- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
@@ -505,7 +505,6 @@ Bitmap PageObjectPainter::CreateBackgroundBitmap(
// Fill the background with the background color of the slide sorter.
const Color aBackgroundColor (mpTheme->GetColor(Theme::Color_Background));
- OSL_TRACE("filling background of page object bitmap with color %x", aBackgroundColor.GetColor());
aBitmapDevice.SetFillColor(aBackgroundColor);
aBitmapDevice.SetLineColor(aBackgroundColor);
aBitmapDevice.DrawRect(Rectangle(Point(0,0), aSize));
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index c06a7c0..137163b 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -148,7 +148,7 @@ Outliner::Outliner( SdDrawDocument* pDoc, sal_uInt16 nMode )
mpImpl(new Implementation()),
meMode(SEARCH),
mpView(NULL),
- mpViewShell(),
+ mpWeakViewShell(),
mpWindow(NULL),
mpDrawDocument(pDoc),
mnConversionLanguage(LANGUAGE_NONE),
@@ -182,8 +182,7 @@ Outliner::Outliner( SdDrawDocument* pDoc, sal_uInt16 nMode )
mbSelectionHasChanged(false),
mbExpectingSelectionChangeEvent(false),
mbWholeDocumentProcessed(false),
- mbPrepareSpellingPending(true),
- mbViewShellValid(true)
+ mbPrepareSpellingPending(true)
{
SetStyleSheetPool((SfxStyleSheetPool*) mpDrawDocument->GetStyleSheetPool());
SetEditTextObjectPool( &pDoc->GetItemPool() );
@@ -275,35 +274,33 @@ Outliner::~Outliner (void)
*/
void Outliner::PrepareSpelling (void)
{
- if (mbViewShellValid)
- {
- mbPrepareSpellingPending = false;
+ mbPrepareSpellingPending = false;
- ViewShellBase* pBase = PTR_CAST(ViewShellBase,SfxViewShell::Current());
- if (pBase != NULL)
- SetViewShell (pBase->GetMainViewShell());
- SetRefDevice( SD_MOD()->GetRefDevice( *mpDrawDocument->GetDocSh() ) );
+ ViewShellBase* pBase = PTR_CAST(ViewShellBase,SfxViewShell::Current());
+ if (pBase != NULL)
+ SetViewShell (pBase->GetMainViewShell());
+ SetRefDevice( SD_MOD()->GetRefDevice( *mpDrawDocument->GetDocSh() ) );
- if (mpViewShell.get() != NULL)
- {
- mbStringFound = sal_False;
+ ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
+ if (pViewShell)
+ {
+ mbStringFound = sal_False;
- mbWholeDocumentProcessed = false;
- // Supposed that we are not located at the very beginning/end of
- // the document then there may be a match in the document
- // prior/after the current position.
- mbMatchMayExist = sal_True;
+ mbWholeDocumentProcessed = false;
+ // Supposed that we are not located at the very beginning/end of
+ // the document then there may be a match in the document
+ // prior/after the current position.
+ mbMatchMayExist = sal_True;
- maObjectIterator = ::sd::outliner::Iterator();
- maSearchStartPosition = ::sd::outliner::Iterator();
- RememberStartPosition();
+ maObjectIterator = ::sd::outliner::Iterator();
+ maSearchStartPosition = ::sd::outliner::Iterator();
+ RememberStartPosition();
- mpImpl->ProvideOutlinerView(*this, mpViewShell, mpWindow);
+ mpImpl->ProvideOutlinerView(*this, pViewShell, mpWindow);
- HandleChangedSelection ();
- }
- ClearModifyFlag();
+ HandleChangedSelection ();
}
+ ClearModifyFlag();
}
@@ -328,64 +325,62 @@ void Outliner::StartSpelling(EditView& rView, unsigned char c)
*/
void Outliner::EndSpelling (void)
{
- if (mbViewShellValid)
- {
- // Keep old view shell alive until we release the outliner view.
- ::boost::shared_ptr<ViewShell> pOldViewShell (mpViewShell);
+ // Keep old view shell alive until we release the outliner view.
+ ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
+ ::boost::shared_ptr<ViewShell> pOldViewShell (pViewShell);
- ViewShellBase* pBase = PTR_CAST(ViewShellBase,SfxViewShell::Current());
- if (pBase != NULL)
- mpViewShell = pBase->GetMainViewShell();
- else
- mpViewShell.reset();
-
- // When in <member>PrepareSpelling()</member> a new outline view has
- // been created then delete it here.
- sal_Bool bViewIsDrawViewShell(mpViewShell.get()!=NULL
- && mpViewShell->ISA(DrawViewShell));
- if (bViewIsDrawViewShell)
- {
- SetStatusEventHdl(Link());
- mpView = mpViewShell->GetView();
- mpView->UnmarkAllObj (mpView->GetSdrPageView());
- mpView->SdrEndTextEdit();
- // Make FuSelection the current function.
- mpViewShell->GetDispatcher()->Execute(
- SID_OBJECT_SELECT,
- SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD);
-
- // Remove and, if previously created by us, delete the outline
- // view.
- OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
- if (pOutlinerView != NULL)
- {
- RemoveView(pOutlinerView);
- mpImpl->ReleaseOutlinerView();
- }
+ ViewShellBase* pBase = PTR_CAST(ViewShellBase,SfxViewShell::Current());
+ if (pBase != NULL)
+ pViewShell = pBase->GetMainViewShell();
+ else
+ pViewShell.reset();
+ mpWeakViewShell = pViewShell;
- SetUpdateMode(sal_True);
- }
+ // When in <member>PrepareSpelling()</member> a new outline view has
+ // been created then delete it here.
+ sal_Bool bViewIsDrawViewShell(pViewShell && pViewShell->ISA(DrawViewShell));
+ if (bViewIsDrawViewShell)
+ {
+ SetStatusEventHdl(Link());
+ mpView = pViewShell->GetView();
+ mpView->UnmarkAllObj (mpView->GetSdrPageView());
+ mpView->SdrEndTextEdit();
+ // Make FuSelection the current function.
+ pViewShell->GetDispatcher()->Execute(
+ SID_OBJECT_SELECT,
+ SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD);
- // Before clearing the modify flag use it as a hint that
- // changes were done at SpellCheck
- if(IsModified())
+ // Remove and, if previously created by us, delete the outline
+ // view.
+ OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
+ if (pOutlinerView != NULL)
{
- if(mpView && mpView->ISA(OutlineView))
- static_cast<OutlineView*>(mpView)->PrepareClose(sal_False);
- if(mpDrawDocument && !mpDrawDocument->IsChanged())
- mpDrawDocument->SetChanged(sal_True);
+ RemoveView(pOutlinerView);
+ mpImpl->ReleaseOutlinerView();
}
- // now clear the modify flag to have a specified state of
- // Outliner
- ClearModifyFlag();
+ SetUpdateMode(sal_True);
+ }
- // When spell checking then restore the start position.
- if (meMode==SPELL || meMode==TEXT_CONVERSION)
- RestoreStartPosition ();
+ // Before clearing the modify flag use it as a hint that
+ // changes were done at SpellCheck
+ if(IsModified())
+ {
+ if(mpView && mpView->ISA(OutlineView))
+ static_cast<OutlineView*>(mpView)->PrepareClose(sal_False);
+ if(mpDrawDocument && !mpDrawDocument->IsChanged())
+ mpDrawDocument->SetChanged(sal_True);
}
- mpViewShell.reset();
+ // Now clear the modify flag to have a specified state of
+ // Outliner
+ ClearModifyFlag();
+
+ // When spell checking then restore the start position.
+ if (meMode==SPELL || meMode==TEXT_CONVERSION)
+ RestoreStartPosition ();
+
+ mpWeakViewShell.reset();
mpView = NULL;
mpWindow = NULL;
}
@@ -395,7 +390,8 @@ void Outliner::EndSpelling (void)
sal_Bool Outliner::SpellNextDocument (void)
{
- if (mpViewShell->ISA(OutlineViewShell))
+ ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
+ if (pViewShell->ISA(OutlineViewShell))
{
// When doing a spell check in the outline view then there is
// only one document.
@@ -410,7 +406,7 @@ sal_Bool Outliner::SpellNextDocument (void)
Initialize (true);
- mpWindow = mpViewShell->GetActiveWindow();
+ mpWindow = pViewShell->GetActiveWindow();
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
if (pOutlinerView != NULL)
pOutlinerView->SetWindow(mpWindow);
@@ -482,63 +478,67 @@ bool Outliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem)
{
sal_Bool bEndOfSearch = sal_True;
- if (mbViewShellValid)
+ mpDrawDocument->GetDocSh()->SetWaitCursor( sal_True );
+ if (mbPrepareSpellingPending)
+ PrepareSpelling();
+ ViewShellBase* pBase = PTR_CAST(ViewShellBase,SfxViewShell::Current());
+ // Determine whether we have to abort the search. This is necessary
+ // when the main view shell does not support searching.
+ bool bAbort = false;
+ if (pBase != NULL)
{
- mpDrawDocument->GetDocSh()->SetWaitCursor( sal_True );
- if (mbPrepareSpellingPending)
- PrepareSpelling();
- ViewShellBase* pBase = PTR_CAST(ViewShellBase,SfxViewShell::Current());
- // Determine whether we have to abort the search. This is necessary
- // when the main view shell does not support searching.
- bool bAbort = false;
- if (pBase != NULL)
- {
- ::boost::shared_ptr<ViewShell> pShell (pBase->GetMainViewShell());
- SetViewShell(pShell);
- if (pShell.get() == NULL)
- bAbort = true;
- else
- switch (pShell->GetShellType())
- {
- case ViewShell::ST_DRAW:
- case ViewShell::ST_IMPRESS:
- case ViewShell::ST_NOTES:
- case ViewShell::ST_HANDOUT:
- case ViewShell::ST_OUTLINE:
- bAbort = false;
- break;
- default:
- bAbort = true;
- break;
- }
- }
+ ::boost::shared_ptr<ViewShell> pShell (pBase->GetMainViewShell());
+ SetViewShell(pShell);
+ if (pShell.get() == NULL)
+ bAbort = true;
+ else
+ switch (pShell->GetShellType())
+ {
+ case ViewShell::ST_DRAW:
+ case ViewShell::ST_IMPRESS:
+ case ViewShell::ST_NOTES:
+ case ViewShell::ST_HANDOUT:
+ case ViewShell::ST_OUTLINE:
+ bAbort = false;
+ break;
+ default:
+ bAbort = true;
+ break;
+ }
+ }
- if ( ! bAbort)
- {
- meMode = SEARCH;
- mpSearchItem = pSearchItem;
+ ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
+ if ( ! pViewShell)
+ {
+ OSL_ASSERT(pViewShell);
+ return true;
+ }
+
+ if ( ! bAbort)
+ {
+ meMode = SEARCH;
+ mpSearchItem = pSearchItem;
- mbFoundObject = sal_False;
+ mbFoundObject = sal_False;
- Initialize ( ! mpSearchItem->GetBackward());
+ Initialize ( ! mpSearchItem->GetBackward());
- sal_uInt16 nCommand = mpSearchItem->GetCommand();
- if (nCommand == SVX_SEARCHCMD_REPLACE_ALL)
- bEndOfSearch = SearchAndReplaceAll ();
+ sal_uInt16 nCommand = mpSearchItem->GetCommand();
+ if (nCommand == SVX_SEARCHCMD_REPLACE_ALL)
+ bEndOfSearch = SearchAndReplaceAll ();
+ else
+ {
+ RememberStartPosition ();
+ bEndOfSearch = SearchAndReplaceOnce ();
+ // restore start position if nothing was found
+ if(!mbStringFound)
+ RestoreStartPosition ();
else
- {
- RememberStartPosition ();
- bEndOfSearch = SearchAndReplaceOnce ();
- // restore start position if nothing was found
- if(!mbStringFound)
- RestoreStartPosition ();
- else
- mnStartPageIndex = (sal_uInt16)-1;
- }
+ mnStartPageIndex = (sal_uInt16)-1;
}
- else
- mpDrawDocument->GetDocSh()->SetWaitCursor( sal_False );
}
+ else
+ mpDrawDocument->GetDocSh()->SetWaitCursor( sal_False );
return bEndOfSearch;
}
@@ -558,9 +558,16 @@ void Outliner::Initialize (bool bDirectionIsForward)
maObjectIterator = ::sd::outliner::OutlinerContainer(this).current();
maCurrentPosition = *maObjectIterator;
+ ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
+ if ( ! pViewShell)
+ {
+ OSL_ASSERT(pViewShell);
+ return;
+ }
+
// In case we are searching in an outline view then first remove the
// current selection and place cursor at its start or end.
- if (mpViewShell->ISA(OutlineViewShell))
+ if (pViewShell->ISA(OutlineViewShell))
{
ESelection aSelection = mpImpl->GetOutlinerView()->GetSelection ();
if (mbDirectionIsForward)
@@ -615,7 +622,14 @@ bool Outliner::SearchAndReplaceAll (void)
// matches.
RememberStartPosition ();
- if (mpViewShell->ISA(OutlineViewShell))
+ ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
+ if ( ! pViewShell)
+ {
+ OSL_ASSERT(pViewShell);
+ return true;
+ }
+
+ if (pViewShell->ISA(OutlineViewShell))
{
// Put the cursor to the beginning/end of the outliner.
mpImpl->GetOutlinerView()->SetSelection (GetSearchStartPosition ());
@@ -623,7 +637,7 @@ bool Outliner::SearchAndReplaceAll (void)
// The outliner does all the work for us when we are in this mode.
SearchAndReplaceOnce();
}
- else if (mpViewShell->ISA(DrawViewShell))
+ else if (pViewShell->ISA(DrawViewShell))
{
// Go to beginning/end of document.
maObjectIterator = ::sd::outliner::OutlinerContainer(this).begin();
@@ -663,13 +677,14 @@ bool Outliner::SearchAndReplaceOnce (void)
if( NULL == pOutlinerView || !GetEditEngine().HasView( &pOutlinerView->GetEditView() ) )
return true;
- if (mpViewShell != NULL)
+ ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
+ if (pViewShell != NULL)
{
- mpView = mpViewShell->GetView();
- mpWindow = mpViewShell->GetActiveWindow();
+ mpView = pViewShell->GetView();
+ mpWindow = pViewShell->GetActiveWindow();
pOutlinerView->SetWindow(mpWindow);
- if (mpViewShell->ISA(DrawViewShell) )
+ if (pViewShell->ISA(DrawViewShell) )
{
// When replacing we first check if there is a selection
// indicating a match. If there is then replace it. The
@@ -714,7 +729,7 @@ bool Outliner::SearchAndReplaceOnce (void)
}
}
}
- else if (mpViewShell->ISA(OutlineViewShell))
+ else if (pViewShell->ISA(OutlineViewShell))
{
mpDrawDocument->GetDocSh()->SetWaitCursor (sal_False);
// The following loop is executed more then once only when a
@@ -752,8 +767,9 @@ void Outliner::DetectChange (void)
{
::sd::outliner::IteratorPosition aPosition (maCurrentPosition);
+ ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
::boost::shared_ptr<DrawViewShell> pDrawViewShell (
- ::boost::dynamic_pointer_cast<DrawViewShell>(mpViewShell));
+ ::boost::dynamic_pointer_cast<DrawViewShell>(pViewShell));
// Detect whether the view has been switched from the outside.
if (pDrawViewShell.get() != NULL
@@ -849,10 +865,17 @@ bool Outliner::DetectSelectionChange (void)
void Outliner::RememberStartPosition (void)
{
- if (mpViewShell->ISA(DrawViewShell))
+ ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
+ if ( ! pViewShell)
+ {
+ OSL_ASSERT(pViewShell);
+ return;
+ }
+
+ if (pViewShell->ISA(DrawViewShell))
{
::boost::shared_ptr<DrawViewShell> pDrawViewShell (
- ::boost::dynamic_pointer_cast<DrawViewShell>(mpViewShell));
+ ::boost::dynamic_pointer_cast<DrawViewShell>(pViewShell));
if (pDrawViewShell.get() != NULL)
{
meStartViewMode = pDrawViewShell->GetPageKind();
@@ -877,7 +900,7 @@ void Outliner::RememberStartPosition (void)
}
}
}
- else if (mpViewShell->ISA(OutlineViewShell))
+ else if (pViewShell->ISA(OutlineViewShell))
{
// Remember the current cursor position.
OutlinerView* pView = GetView(0);
@@ -900,18 +923,17 @@ void Outliner::RestoreStartPosition (void)
// start position is not requested.
if (mnStartPageIndex == (sal_uInt16)-1 )
bRestore = false;
- // Dont't resore when the view shell is not valid.
- if (mpViewShell == NULL)
- bRestore = false;
- if ( ! mbViewShellValid)
+ // Dont't restore when the view shell is not valid.
+ ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
+ if (pViewShell == NULL)
bRestore = false;
if (bRestore)
{
- if (mpViewShell->ISA(DrawViewShell))
+ if (pViewShell->ISA(DrawViewShell))
{
::boost::shared_ptr<DrawViewShell> pDrawViewShell (
- ::boost::dynamic_pointer_cast<DrawViewShell>(mpViewShell));
+ ::boost::dynamic_pointer_cast<DrawViewShell>(pViewShell));
SetViewMode (meStartViewMode);
if (pDrawViewShell.get() != NULL)
SetPage (meStartEditMode, mnStartPageIndex);
@@ -922,7 +944,7 @@ void Outliner::RestoreStartPosition (void)
// Turn on the text toolbar as it is done in FuText so that
// undo manager setting/restoring in
// sd::View::{Beg,End}TextEdit() works on the same view shell.
- mpViewShell->GetViewShellBase().GetToolBarManager()->SetToolBarShell(
+ pViewShell->GetViewShellBase().GetToolBarManager()->SetToolBarShell(
ToolBarManager::TBG_FUNCTION,
RID_DRAW_TEXT_TOOLBOX);
@@ -936,7 +958,7 @@ void Outliner::RestoreStartPosition (void)
}
}
}
- else if (mpViewShell->ISA(OutlineViewShell))
+ else if (pViewShell->ISA(OutlineViewShell))
{
// Set cursor to its old position.
OutlinerView* pView = GetView(0);
@@ -1000,7 +1022,8 @@ void Outliner::ProvideNextTextObject (void)
{
PutTextIntoOutliner ();
- if (mpViewShell != NULL)
+ ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
+ if (pViewShell != NULL)
switch (meMode)
{
case SEARCH:
@@ -1029,10 +1052,17 @@ void Outliner::ProvideNextTextObject (void)
void Outliner::EndOfSearch (void)
{
+ ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
+ if ( ! pViewShell)
+ {
+ OSL_ASSERT(pViewShell);
+ return;
+ }
+
// Before we display a dialog we first jump to where the last valid text
// object was found. All page and view mode switching since then was
// temporary and should not be visible to the user.
- if ( ! mpViewShell->ISA(OutlineViewShell))
+ if ( ! pViewShell->ISA(OutlineViewShell))
SetObject (maLastValidPosition);
if (mbRestrictSearchToSelection)
@@ -1052,7 +1082,7 @@ void Outliner::EndOfSearch (void)
mbMatchMayExist = false;
// Everything back to beginning (or end?) of the document.
maObjectIterator = ::sd::outliner::OutlinerContainer(this).begin();
- if (mpViewShell->ISA(OutlineViewShell))
+ if (pViewShell->ISA(OutlineViewShell))
{
// Set cursor to first character of the document.
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
@@ -1241,8 +1271,9 @@ void Outliner::PrepareSearchAndReplace (void)
void Outliner::SetViewMode (PageKind ePageKind)
{
+ ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
::boost::shared_ptr<DrawViewShell> pDrawViewShell(
- ::boost::dynamic_pointer_cast<DrawViewShell>(mpViewShell));
+ ::boost::dynamic_pointer_cast<DrawViewShell>(pViewShell));
if (pDrawViewShell.get()!=NULL && ePageKind != pDrawViewShell->GetPageKind())
{
// Restore old edit mode.
@@ -1268,7 +1299,7 @@ void Outliner::SetViewMode (PageKind ePageKind)
::sd::outliner::Iterator aIterator (maObjectIterator);
bool bMatchMayExist = mbMatchMayExist;
- ViewShellBase& rBase = mpViewShell->GetViewShellBase();
+ ViewShellBase& rBase = pViewShell->GetViewShellBase();
SetViewShell(::boost::shared_ptr<ViewShell>());
framework::FrameworkHelper::Instance(rBase)->RequestView(
sViewURL,
@@ -1295,7 +1326,7 @@ void Outliner::SetViewMode (PageKind ePageKind)
// Save edit mode so that it can be restored when switching the view
// shell again.
- pDrawViewShell = ::boost::dynamic_pointer_cast<DrawViewShell>(mpViewShell);
+ pDrawViewShell = ::boost::dynamic_pointer_cast<DrawViewShell>(pViewShell);
OSL_ASSERT(pDrawViewShell.get()!=NULL);
if (pDrawViewShell.get() != NULL)
mpImpl->meOriginalEditMode = pDrawViewShell->GetEditMode();
@@ -1309,8 +1340,9 @@ void Outliner::SetPage (EditMode eEditMode, sal_uInt16 nPageIndex)
{
if ( ! mbRestrictSearchToSelection)
{
+ ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
::boost::shared_ptr<DrawViewShell> pDrawViewShell(
- ::boost::dynamic_pointer_cast<DrawViewShell>(mpViewShell));
+ ::boost::dynamic_pointer_cast<DrawViewShell>(pViewShell));
OSL_ASSERT(pDrawViewShell.get()!=NULL);
if (pDrawViewShell.get() != NULL)
{
@@ -1326,7 +1358,7 @@ void Outliner::SetPage (EditMode eEditMode, sal_uInt16 nPageIndex)
void Outliner::EnterEditMode (sal_Bool bGrabFocus)
{
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
- if (mbViewShellValid && pOutlinerView != NULL)
+ if (pOutlinerView != NULL)
{
pOutlinerView->SetOutputArea( Rectangle( Point(), Size(1, 1)));
SetPaperSize( mpTextObj->GetLogicRect().GetSize() );
@@ -1334,7 +1366,8 @@ void Outliner::EnterEditMode (sal_Bool bGrabFocus)
// Make FuText the current function.
SfxUInt16Item aItem (SID_TEXTEDIT, 1);
- mpViewShell->GetDispatcher()->
+ ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
+ pViewShell->GetDispatcher()->
Execute(SID_TEXTEDIT, SFX_CALLMODE_SYNCHRON |
SFX_CALLMODE_RECORD, &aItem, 0L);
@@ -1466,20 +1499,21 @@ SdrObject* Outliner::SetObject (
void Outliner::SetViewShell (const ::boost::shared_ptr<ViewShell>& rpViewShell)
{
- if (mpViewShell != rpViewShell)
+ ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
+ if (pViewShell != rpViewShell)
{
// Set the new view shell.
- mpViewShell = rpViewShell;
+ mpWeakViewShell = rpViewShell;
// When the outline view is not owned by us then we have to clear
// that pointer so that the current one for the new view shell will
// be used (in ProvideOutlinerView).
- if (mpViewShell.get() != NULL)
+ if (rpViewShell)
{
- mpView = mpViewShell->GetView();
+ mpView = rpViewShell->GetView();
- mpWindow = mpViewShell->GetActiveWindow();
+ mpWindow = rpViewShell->GetActiveWindow();
- mpImpl->ProvideOutlinerView(*this, mpViewShell, mpWindow);
+ mpImpl->ProvideOutlinerView(*this, rpViewShell, mpWindow);
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
if (pOutlinerView != NULL)
pOutlinerView->SetWindow(mpWindow);
@@ -1524,7 +1558,8 @@ void Outliner::HandleChangedSelection (void)
void Outliner::StartConversion( sal_Int16 nSourceLanguage, sal_Int16 nTargetLanguage,
const Font *pTargetFont, sal_Int32 nOptions, sal_Bool bIsInteractive )
{
- sal_Bool bMultiDoc = mpViewShell->ISA(DrawViewShell);
+ ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
+ sal_Bool bMultiDoc = pViewShell->ISA(DrawViewShell);
meMode = TEXT_CONVERSION;
mbDirectionIsForward = true;
@@ -1586,7 +1621,8 @@ void Outliner::BeginConversion (void)
if (pBase != NULL)
SetViewShell (pBase->GetMainViewShell());
- if (mpViewShell != NULL)
+ ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
+ if (pViewShell)
{
mbStringFound = sal_False;
@@ -1599,7 +1635,7 @@ void Outliner::BeginConversion (void)
maSearchStartPosition = ::sd::outliner::Iterator();
RememberStartPosition();
- mpImpl->ProvideOutlinerView(*this, mpViewShell, mpWindow);
+ mpImpl->ProvideOutlinerView(*this, pViewShell, mpWindow);
HandleChangedSelection ();
}
@@ -1619,7 +1655,8 @@ void Outliner::EndConversion()
sal_Bool Outliner::ConvertNextDocument()
{
- if( mpViewShell && mpViewShell->ISA(OutlineViewShell) )
+ ::boost::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
+ if (pViewShell && pViewShell->ISA(OutlineViewShell) )
return false;
mpDrawDocument->GetDocSh()->SetWaitCursor( sal_True );
@@ -1629,7 +1666,7 @@ sal_Bool Outliner::ConvertNextDocument()
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
if (pOutlinerView != NULL)
{
- mpWindow = mpViewShell->GetActiveWindow();
+ mpWindow = pViewShell->GetActiveWindow();
pOutlinerView->SetWindow(mpWindow);
}
ProvideNextTextObject ();
diff --git a/sd/source/ui/view/OutlinerIterator.cxx b/sd/source/ui/view/OutlinerIterator.cxx
index 1e24dd3..be50a50 100644
--- a/sd/source/ui/view/OutlinerIterator.cxx
+++ b/sd/source/ui/view/OutlinerIterator.cxx
@@ -199,14 +199,14 @@ Iterator OutlinerContainer::CreateIterator (IteratorLocation aLocation)
return CreateSelectionIterator (
mpOutliner->maMarkListCopy,
mpOutliner->mpDrawDocument,
- mpOutliner->mpViewShell,
+ mpOutliner->mpWeakViewShell.lock(),
mpOutliner->mbDirectionIsForward,
aLocation);
else
// Search in the whole document.
return CreateDocumentIterator (
mpOutliner->mpDrawDocument,
- mpOutliner->mpViewShell,
+ mpOutliner->mpWeakViewShell.lock(),
mpOutliner->mbDirectionIsForward,
aLocation);
}
commit d00e10d0d5b1fb0eacd44f1599ea718a7bccf584
Author: mst <mst at openoffice.org>
Date: Sat Sep 17 22:43:09 2011 +0000
slidesorter1: #i114252# Fixed selection in slidesorter.
# HG changeset patch
# User Andre Fischer<andre.f.fischer at oracle.com>
# Date 1298997222 -3600
# Node ID bca8ed5c98e5c645a6c69c7fb90cd3da84627212
# Parent 5d52cdcf6d9357e7a6dcc1aa80ba27840042a6de
* found as LGPLv3-only fix at svn rev 1172130 (http://svn.apache.org/viewvc?view=revision&revision=1172130)
diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx b/sd/source/ui/slidesorter/controller/SlsListener.cxx
index af2bf1d..df67a53 100644
--- a/sd/source/ui/slidesorter/controller/SlsListener.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx
@@ -505,7 +505,6 @@ void SAL_CALL Listener::propertyChange (
String(RTL_CONSTASCII_USTRINGPARAM("Number")));
sal_Int32 nCurrentPage = 0;
aPageNumber >>= nCurrentPage;
- mrController.GetPageSelector().GetCoreSelection();
// The selection is already set but we call SelectPage()
// nevertheless in order to make the new current page the
// last recently selected page of the PageSelector. This is
commit 86e093007b4f87caa785455abae043d6427c7070
Author: mst <mst at openoffice.org>
Date: Sat Sep 17 22:42:12 2011 +0000
slidesorter1: #i114107# Temporarily reset StartWithActualPaget to make startWithArguments use FirstPage property.
# HG changeset patch
# User Andre Fischer<andre.f.fischer at oracle.com>
# Date 1283353420 -7200
# Node ID 770385ae0c265c62134bf57eeca8283f7fe80b48
# Parent 2ebd15d9e8a637b5c563f1ae49768668412e2baa
* found as LGPLv3-only fix at svn rev 1172126 (http://svn.apache.org/viewvc?view=revision&revision=1172126)
diff --git a/sd/source/ui/slidesorter/view/SlsButtonBar.cxx b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
index ba08383..5ecdad5 100644
--- a/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
+++ b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
@@ -43,6 +43,8 @@
#include "controller/SlsAnimationFunction.hxx"
#include "app.hrc"
#include "drawdoc.hxx"
+#include "sddll.hxx"
+#include "optsitem.hxx"
#include <svx/svxids.hrc>
#include <sfx2/dispatch.hxx>
#include <vcl/bmpacc.hxx>
@@ -1337,7 +1339,18 @@ void StartShowButton::ProcessClick (const model::SharedPageDescriptor& rpDescrip
aProperties[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FirstPage"));
const ::rtl::OUString sName (rpDescriptor->GetPage()->GetName());
aProperties[0].Value = Any(sName);
+
+ // We have to temporarily change the options value
+ // StartWithActualPage to make the slide show use the
+ // specified first page.
+ const DocumentType eType (mrSlideSorter.GetModel().GetDocument()->GetDocumentType());
+ const BOOL bSavedState (SD_MOD()->GetSdOptions(eType)->IsStartWithActualPage());
+ SD_MOD()->GetSdOptions(eType)->SetStartWithActualPage(FALSE);
+
xPresentation->startWithArguments(aProperties);
+
+ // Restore previous StartWithActualPage value.
+ SD_MOD()->GetSdOptions(eType)->SetStartWithActualPage(bSavedState);
}
}
commit f215333002882872129066828228d3343a903331
Author: mst <mst at openoffice.org>
Date: Sat Sep 17 22:42:57 2011 +0000
slidesorter1: #117012# Update preview when text editing ends.
* found as LGPLv3-only fix at svn rev 1172129 (http://svn.apache.org/viewvc?view=revision&revision=1172129)
diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index ab04931..0d9f576 100644
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -1090,6 +1090,26 @@ void SlideSorterController::CheckForMasterPageAssignment (void)
+void SlideSorterController::CheckForSlideTransitionAssignment (void)
+{
+ if (mrModel.GetPageCount()%2==0)
+ return;
+ PageEnumeration aAllPages (PageEnumerationProvider::CreateAllPagesEnumeration(mrModel));
+ while (aAllPages.HasMoreElements())
+ {
+ SharedPageDescriptor pDescriptor (aAllPages.GetNextElement());
+ if (pDescriptor->UpdateTransitionFlag())
+ {
+ mrView.GetPreviewCache()->InvalidatePreviewBitmap (
+ pDescriptor->GetPage(),
+ true);
+ }
+ }
+}
+
+
+
+
//===== SlideSorterController::ModelChangeLock ================================
SlideSorterController::ModelChangeLock::ModelChangeLock (
diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx b/sd/source/ui/slidesorter/controller/SlsListener.cxx
index ff3ec3c..af2bf1d 100644
--- a/sd/source/ui/slidesorter/controller/SlsListener.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx
@@ -363,6 +363,7 @@ void Listener::Notify (
{
case SFX_HINT_DOCCHANGED:
mrController.CheckForMasterPageAssignment();
+ mrController.CheckForSlideTransitionAssignment();
break;
}
}
@@ -423,6 +424,14 @@ IMPL_LINK(Listener, EventMultiplexerCallback, ::sd::tools::EventMultiplexerEvent
HandleShapeModification(static_cast<const SdrPage*>(pEvent->mpUserData));
break;
+ case tools::EventMultiplexerEvent::EID_END_TEXT_EDIT:
+ if (pEvent->mpUserData != NULL)
+ {
+ const SdrObject* pObject = static_cast<const SdrObject*>(pEvent->mpUserData);
+ HandleShapeModification(pObject->GetPage());
+ }
+ break;
+
default:
break;
}
diff --git a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
index 6ea8d8b..e962623 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlideSorterController.hxx
@@ -236,6 +236,7 @@ public:
VisibleAreaManager& GetVisibleAreaManager (void) const;
void CheckForMasterPageAssignment (void);
+ void CheckForSlideTransitionAssignment (void);
private:
SlideSorter& mrSlideSorter;
diff --git a/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx b/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx
index ab699d7..7f3bd43 100644
--- a/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx
+++ b/sd/source/ui/slidesorter/inc/model/SlsPageDescriptor.hxx
@@ -100,6 +100,7 @@ public:
void SetPageIndex (const sal_Int32 nIndex);
bool UpdateMasterPage (void);
+ bool UpdateTransitionFlag (void);
enum State { ST_Visible, ST_Selected, ST_WasSelected,
ST_Focused, ST_MouseOver, ST_Current, ST_Excluded };
@@ -149,6 +150,7 @@ private:
bool mbIsFocused : 1;
bool mbIsCurrent : 1;
bool mbIsMouseOver : 1;
+ bool mbHasTransition : 1;
// Do not use the copy constructor operator. It is not implemented.
diff --git a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx
index 0f25579..51c7157 100644
--- a/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlsPageObjectPainter.hxx
@@ -98,6 +98,7 @@ private:
Bitmap maMouseOverSelectedAndFocusedBackground;
::rtl::OUString msUnhideString;
ButtonBar& mrButtonBar;
+ Size maSize;
void PaintBackground (
OutputDevice& rDevice,
@@ -132,6 +133,7 @@ private:
const Bitmap& rPreview,
const BitmapEx& rOverlay,
const OutputDevice* pReferenceDevice) const;
+ void InvalidateBitmaps (void);
};
} } } // end of namespace sd::slidesorter::view
diff --git a/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx b/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx
index 6c7d7fd..8d6d407 100644
--- a/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx
+++ b/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx
@@ -58,12 +58,18 @@ PageDescriptor::PageDescriptor (
mbIsVisible(false),
mbIsFocused(false),
mbIsCurrent(false),
- mbIsMouseOver(false)
+ mbIsMouseOver(false),
+ mbHasTransition(false)
{
OSL_ASSERT(mpPage);
OSL_ASSERT(mpPage == SdPage::getImplementation(rxPage));
- if (mpPage!=NULL && mpPage->TRG_HasMasterPage())
- mpMasterPage = &mpPage->TRG_GetMasterPage();
+ if (mpPage != NULL)
+ {
+ if (mpPage->TRG_HasMasterPage())
+ mpMasterPage = &mpPage->TRG_GetMasterPage();
+ if (mpPage->getTransitionType() > 0)
+ mbHasTransition = true;
+ }
}
@@ -126,6 +132,23 @@ bool PageDescriptor::UpdateMasterPage (void)
+bool PageDescriptor::UpdateTransitionFlag (void)
+{
+ bool bHasSlideTransition (false);
+ if (mpPage != NULL)
+ bHasSlideTransition = mpPage->getTransitionType() > 0;
+ if (bHasSlideTransition != mbHasTransition)
+ {
+ mbHasTransition = bHasSlideTransition;
+ return true;
+ }
+ else
+ return false;
+}
+
+
+
+
bool PageDescriptor::HasState (const State eState) const
{
switch (eState)
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
index 80f34e5..40fed69 100644
--- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
@@ -113,7 +113,8 @@ PageObjectPainter::PageObjectPainter (
maMouseOverBackground(),
maMouseOverFocusedBackground(),
msUnhideString(mpTheme->GetString(Theme::String_Unhide)),
- mrButtonBar(rSlideSorter.GetView().GetButtonBar())
+ mrButtonBar(rSlideSorter.GetView().GetButtonBar()),
+ maSize()
{
// Replace the color (not the alpha values) in the focus border with a
// color derived from the current selection color.
@@ -166,7 +167,26 @@ void PageObjectPainter::PaintPageObject (
void PageObjectPainter::NotifyResize (const bool bForce)
{
- (void)bForce;
+ if (bForce || ! mpPageObjectLayouter)
+ InvalidateBitmaps();
+ else
+ {
+ const Size aSize (mpPageObjectLayouter->GetSize(
+ PageObjectLayouter::FocusIndicator,
+ PageObjectLayouter::WindowCoordinateSystem));
+ if ( maSize!=aSize)
+ {
+ maSize = aSize;
+ InvalidateBitmaps();
+ }
+ }
+}
+
+
+
+
+void PageObjectPainter::InvalidateBitmaps (void)
+{
maNormalBackground.SetEmpty();
maSelectionBackground.SetEmpty();
maFocusedSelectionBackground.SetEmpty();
commit 5b6487aa8ce1406efb8e29de28a9ecd1c3d06cf2
Author: mst <mst at openoffice.org>
Date: Sat Sep 17 22:41:59 2011 +0000
fs34c: #i117666# check first if value is null
* found as LGPLv3-only fix at svn rev 1172125 (http://svn.apache.org/viewvc?view=revision&revision=1172125)
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index e467b55..bfa3b12 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -786,6 +786,12 @@ sal_Bool operator==(const DateTime& _rLH,const DateTime& _rRH)
bool ORowSetValue::operator==(const ORowSetValue& _rRH) const
{
+ if ( m_bNull != _rRH.isNull() )
+ return false;
+
+ if(m_bNull && _rRH.isNull())
+ return true;
+
if ( m_eTypeKind != _rRH.m_eTypeKind )
{
switch(m_eTypeKind)
@@ -808,10 +814,6 @@ bool ORowSetValue::operator==(const ORowSetValue& _rRH) const
}
return false;
}
- if ( m_bNull != _rRH.isNull() )
- return false;
- if(m_bNull && _rRH.isNull())
- return true;
bool bRet = false;
OSL_ENSURE(!m_bNull,"SHould not be null!");
commit e2ba9814858156af6a2b39f885b3a6387ca29da2
Author: mst <mst at openoffice.org>
Date: Sat Sep 17 22:41:49 2011 +0000
fs34c: check if description can be read and return ccorrect name for shapetype
* found as LGPLv3-only fix at svn rev 1172124 (http://svn.apache.org/viewvc?view=revision&revision=1172124)
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionCategory.java b/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionCategory.java
index 7825a2b..ec4c101 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionCategory.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionCategory.java
@@ -69,6 +69,13 @@ public final class StarFunctionCategory extends WeakBase
catch (MissingResourceException e)
{
locale = Locale.ENGLISH;
+ try
+ {
+ category.getDisplayName(locale);
+ }
+ catch (MissingResourceException e2)
+ {
+ }
}
this.defaultLocale = locale;
@@ -147,7 +154,14 @@ public final class StarFunctionCategory extends WeakBase
public String getName()
{
- return category.getDisplayName(defaultLocale);
+ try
+ {
+ return category.getDisplayName(defaultLocale);
+ }
+ catch(Exception ex)
+ {
+ }
+ return "Missing category for number " + m_Number;
}
public com.sun.star.report.meta.XFunctionDescription getFunction(int position) throws com.sun.star.lang.IndexOutOfBoundsException, com.sun.star.lang.WrappedTargetException
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionDescription.java b/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionDescription.java
index f0debc6..cd05de5 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionDescription.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionDescription.java
@@ -120,12 +120,26 @@ public final class StarFunctionDescription extends WeakBase
public String getName()
{
- return functionDescription.getDisplayName(defaultLocale);
+ try
+ {
+ return functionDescription.getDisplayName(defaultLocale);
+ }
+ catch (Exception ex)
+ {
+ }
+ return "Missing function name for " + this.getClass().getName();
}
public String getDescription()
{
- return functionDescription.getDescription(defaultLocale);
+ try
+ {
+ return functionDescription.getDescription(defaultLocale);
+ }
+ catch (Exception ex)
+ {
+ }
+ return "Missing function description for " + this.getClass().getName();
}
public String getSignature()
diff --git a/reportdesign/source/core/api/FixedLine.cxx b/reportdesign/source/core/api/FixedLine.cxx
index 6db7450..f1d6798 100644
--- a/reportdesign/source/core/api/FixedLine.cxx
+++ b/reportdesign/source/core/api/FixedLine.cxx
@@ -532,10 +532,7 @@ void SAL_CALL OFixedLine::setSize( const awt::Size& aSize ) throw (beans::Proper
// XShapeDescriptor
::rtl::OUString SAL_CALL OFixedLine::getShapeType( ) throw (uno::RuntimeException)
{
- ::osl::MutexGuard aGuard(m_aMutex);
- if ( m_aProps.aComponent.m_xShape.is() )
- return m_aProps.aComponent.m_xShape->getShapeType();
- return ::rtl::OUString();
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape"));
}
// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL OFixedLine::getHyperLinkURL() throw (uno::RuntimeException, beans::UnknownPropertyException)
diff --git a/reportdesign/source/core/api/FixedText.cxx b/reportdesign/source/core/api/FixedText.cxx
index 7225803..8327c5e 100644
--- a/reportdesign/source/core/api/FixedText.cxx
+++ b/reportdesign/source/core/api/FixedText.cxx
@@ -329,10 +329,7 @@ void SAL_CALL OFixedText::setSize( const awt::Size& aSize ) throw (beans::Proper
// XShapeDescriptor
::rtl::OUString SAL_CALL OFixedText::getShapeType( ) throw (uno::RuntimeException)
{
- ::osl::MutexGuard aGuard(m_aMutex);
- if ( m_aProps.aComponent.m_xShape.is() )
- return m_aProps.aComponent.m_xShape->getShapeType();
- return ::rtl::OUString();
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape"));
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/core/api/FormattedField.cxx b/reportdesign/source/core/api/FormattedField.cxx
index 2378225..d9b9c98 100644
--- a/reportdesign/source/core/api/FormattedField.cxx
+++ b/reportdesign/source/core/api/FormattedField.cxx
@@ -372,10 +372,7 @@ void SAL_CALL OFormattedField::setSize( const awt::Size& aSize ) throw (beans::P
// XShapeDescriptor
::rtl::OUString SAL_CALL OFormattedField::getShapeType( ) throw (uno::RuntimeException)
{
- ::osl::MutexGuard aGuard(m_aMutex);
- if ( m_aProps.aComponent.m_xShape.is() )
- return m_aProps.aComponent.m_xShape->getShapeType();
- return ::rtl::OUString();
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape"));
}
// -----------------------------------------------------------------------------
// =============================================================================
diff --git a/reportdesign/source/core/api/ImageControl.cxx b/reportdesign/source/core/api/ImageControl.cxx
index f1b1897..6b9bf51 100644
--- a/reportdesign/source/core/api/ImageControl.cxx
+++ b/reportdesign/source/core/api/ImageControl.cxx
@@ -466,10 +466,7 @@ void SAL_CALL OImageControl::setSize( const awt::Size& aSize ) throw (beans::Pro
// XShapeDescriptor
::rtl::OUString SAL_CALL OImageControl::getShapeType( ) throw (uno::RuntimeException)
{
- ::osl::MutexGuard aGuard(m_aMutex);
- if ( m_aProps.aComponent.m_xShape.is() )
- return m_aProps.aComponent.m_xShape->getShapeType();
- return ::rtl::OUString();
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape"));
}
// -----------------------------------------------------------------------------
::sal_Int16 SAL_CALL OImageControl::getScaleMode() throw (uno::RuntimeException)
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index c01bab7..536efe3 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -2453,11 +2453,7 @@ void SAL_CALL OReportDefinition::setSize( const awt::Size& aSize ) throw (beans:
// XShapeDescriptor
::rtl::OUString SAL_CALL OReportDefinition::getShapeType( ) throw (uno::RuntimeException)
{
- ::osl::MutexGuard aGuard(m_aMutex);
- ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
- if ( m_aProps->m_xShape.is() )
- return m_aProps->m_xShape->getShapeType();
- return ::rtl::OUString();
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OLE2Shape"));
}
// -----------------------------------------------------------------------------
typedef ::cppu::WeakImplHelper2< container::XNameContainer,
diff --git a/reportdesign/source/core/api/Shape.cxx b/reportdesign/source/core/api/Shape.cxx
index 2fa28cd..04742bb 100644
--- a/reportdesign/source/core/api/Shape.cxx
+++ b/reportdesign/source/core/api/Shape.cxx
@@ -424,10 +424,7 @@ void SAL_CALL OShape::setSize( const awt::Size& aSize ) throw (beans::PropertyVe
// XShapeDescriptor
::rtl::OUString SAL_CALL OShape::getShapeType( ) throw (uno::RuntimeException)
{
- ::osl::MutexGuard aGuard(m_aMutex);
- if ( m_aProps.aComponent.m_xShape.is() )
- return m_aProps.aComponent.m_xShape->getShapeType();
- return ::rtl::OUString();
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CustomShape"));
}
// -----------------------------------------------------------------------------
::sal_Int32 SAL_CALL OShape::getZOrder() throw (uno::RuntimeException)
commit 1b056c65f6d612a00eefe8824c854e4577e4f4be
Author: mst <mst at openoffice.org>
Date: Sat Sep 17 22:41:28 2011 +0000
fs34c: #i117625# when assigning events, only throw if there is an invalid type given, *not* if the type is correct, but the sequence is merely empty
* found as LGPLv3-only fix at svn rev 1172123 (http://svn.apache.org/viewvc?view=revision&revision=1172123)
diff --git a/comphelper/inc/comphelper/namedvaluecollection.hxx b/comphelper/inc/comphelper/namedvaluecollection.hxx
index 6ec12a6..bfaa1a0 100644
--- a/comphelper/inc/comphelper/namedvaluecollection.hxx
+++ b/comphelper/inc/comphelper/namedvaluecollection.hxx
@@ -118,6 +118,14 @@ namespace comphelper
impl_assign( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >() );
}
+ /** determines whether or not named values can be extracted from the given value
+
+ @return
+ <TRUE/> if and only if the given <code>Any</code> contains a <code>NamedValue</code>, a
+ <code>PropertyValue</code>, or a sequence thereof.
+ */
+ static bool canExtractFrom( ::com::sun::star::uno::Any const & i_value );
+
/// returns the number of elements in the collection
size_t size() const;
diff --git a/comphelper/source/misc/namedvaluecollection.cxx b/comphelper/source/misc/namedvaluecollection.cxx
index a9eaccb..85c2883 100644
--- a/comphelper/source/misc/namedvaluecollection.cxx
+++ b/comphelper/source/misc/namedvaluecollection.cxx
@@ -127,6 +127,19 @@ namespace comphelper
}
//--------------------------------------------------------------------
+ bool NamedValueCollection::canExtractFrom( ::com::sun::star::uno::Any const & i_value )
+ {
+ Type const & aValueType = i_value.getValueType();
+ if ( aValueType.equals( ::cppu::UnoType< PropertyValue >::get() )
+ || aValueType.equals( ::cppu::UnoType< NamedValue >::get() )
+ || aValueType.equals( ::cppu::UnoType< Sequence< PropertyValue > >::get() )
+ || aValueType.equals( ::cppu::UnoType< Sequence< NamedValue > >::get() )
+ )
+ return true;
+ return false;
+ }
+
+ //--------------------------------------------------------------------
NamedValueCollection& NamedValueCollection::merge( const NamedValueCollection& _rAdditionalValues, bool _bOverwriteExisting )
{
for ( NamedValueRepository::const_iterator namedValue = _rAdditionalValues.m_pImpl->aValues.begin();
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index ad1ed19..6c7e279 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -84,10 +84,10 @@ void SAL_CALL SfxEvents_Impl::replaceByName( const OUSTRING & aName, const ANY &
{
if ( maEventNames[i] == aName )
{
- const ::comphelper::NamedValueCollection aEventDescriptor( rElement );
// check for correct type of the element
- if ( rElement.hasValue() && aEventDescriptor.empty() )
+ if ( !::comphelper::NamedValueCollection::canExtractFrom( rElement ) )
throw ILLEGALARGUMENTEXCEPTION();
+ ::comphelper::NamedValueCollection const aEventDescriptor( rElement );
// create Configuration at first, creation might call this method also and that would overwrite everything
// we might have stored before!
commit c9e1a120fff37a9d87c4e193cec804d2ac909f90
Author: mst <mst at openoffice.org>
Date: Sat Sep 17 22:37:36 2011 +0000
tkr41: #117828# office crash fixed . (null pointer) + add unit test
* found as LGPLv3-only fix at svn rev 1172105 (http://svn.apache.org/viewvc?view=revision&revision=1172105)
diff --git a/shell/source/win32/zipfile/zipfile.cxx b/shell/source/win32/zipfile/zipfile.cxx
index a7c03d4..30c46b0 100644
--- a/shell/source/win32/zipfile/zipfile.cxx
+++ b/shell/source/win32/zipfile/zipfile.cxx
@@ -189,8 +189,9 @@ ZipFile::DirectoryPtr_t ZipFile::GetDirectory() const
while (UNZ_OK == rc && UNZ_END_OF_LIST_OF_FILE != rc)
{
+ unz_file_info finfo;
unzGetCurrentFileInfo(
- m_uzFile, 0, szFileName, lmax, 0, 0, 0, 0);
+ m_uzFile, &finfo, szFileName, lmax, 0, 0, 0, 0);
dir->push_back(szFileName);
More information about the Libreoffice-commits
mailing list