summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/app/sdmod.cxx12
-rw-r--r--sd/source/ui/app/tbxww.cxx2
-rw-r--r--sd/source/ui/dlg/PaneDockingWindow.cxx2
-rw-r--r--sd/source/ui/dlg/animobjs.cxx4
-rw-r--r--sd/source/ui/dlg/ins_paste.cxx4
-rw-r--r--sd/source/ui/dlg/navigatr.cxx2
-rw-r--r--sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx22
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSlotManager.cxx8
-rw-r--r--sd/source/ui/table/TableDesignPane.cxx4
-rw-r--r--sd/source/ui/toolpanel/LayoutMenu.cxx13
-rw-r--r--sd/source/ui/toolpanel/TitleToolBox.cxx2
-rw-r--r--sd/source/ui/unoidl/unopage.cxx2
-rw-r--r--sd/source/ui/view/Outliner.cxx3
13 files changed, 47 insertions, 33 deletions
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index f7e74a481740..957b1aa0475b 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -131,11 +131,6 @@ SdModule::SdModule(SfxObjectFactory* pFact1, SfxObjectFactory* pFact2 )
SdModule::~SdModule()
{
- // Mark the module in the global AppData structure as deleted.
- SdModule** ppShellPointer = (SdModule**)GetAppData(SHL_DRAW);
- if (ppShellPointer != NULL)
- (*ppShellPointer) = NULL;
-
delete pSearchItem;
if( pNumberFormatter )
@@ -152,6 +147,13 @@ SdModule::~SdModule()
}
}
+ mpResourceContainer.reset();
+
+ // Mark the module in the global AppData structure as deleted.
+ SdModule** ppShellPointer = (SdModule**)GetAppData(SHL_DRAW);
+ if (ppShellPointer != NULL)
+ (*ppShellPointer) = NULL;
+
delete mpErrorHdl;
delete static_cast< VirtualDevice* >( mpVirtualRefDevice );
}
diff --git a/sd/source/ui/app/tbxww.cxx b/sd/source/ui/app/tbxww.cxx
index e94fe501d73b..4318f8f9b4ac 100644
--- a/sd/source/ui/app/tbxww.cxx
+++ b/sd/source/ui/app/tbxww.cxx
@@ -311,7 +311,7 @@ void SdTbxControl::StateChanged( USHORT nSId,
Image aImage = GetImage( m_xFrame,
aSlotURL,
hasBigImages(),
- GetToolBox().GetDisplayBackground().GetColor().IsDark() );
+ GetToolBox().GetSettings().GetStyleSettings().GetHighContrastMode() );
// !-Operator prueft, ob Image nicht vorhanden ist
if( !!aImage )
diff --git a/sd/source/ui/dlg/PaneDockingWindow.cxx b/sd/source/ui/dlg/PaneDockingWindow.cxx
index 9ae95a079bd6..2aa6039cfb76 100644
--- a/sd/source/ui/dlg/PaneDockingWindow.cxx
+++ b/sd/source/ui/dlg/PaneDockingWindow.cxx
@@ -263,7 +263,7 @@ void PaneDockingWindow::InitializeTitleToolBox (void)
Image aImage = Image (aBitmap, Color (COL_LIGHTMAGENTA));
Image aImageHC = Image (aBitmapHC, Color (BMP_COLOR_HIGHCONTRAST));
mpTitleToolBox->InsertItem (1,
- GetSettings().GetStyleSettings().GetMenuBarColor().IsDark()
+ GetSettings().GetStyleSettings().GetHighContrastMode()
? aImageHC
: aImage);
mpTitleToolBox->ShowItem (1);
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 0c05c58312b8..84d030867abb 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -138,7 +138,7 @@ void SdDisplay::DataChanged( const DataChangedEvent& rDCEvt )
{
const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
SetBackground( Wallpaper( Color( rStyles.GetFieldColor() ) ) );
- SetDrawMode( GetDisplayBackground().GetColor().IsDark()
+ SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode()
? ViewShell::OUTPUT_DRAWMODE_CONTRAST
: ViewShell::OUTPUT_DRAWMODE_COLOR );
}
@@ -601,7 +601,7 @@ void AnimationWindow::UpdateControl( ULONG nListPos, BOOL bDisableCtrls )
aVD.SetOutputSize( aObjSize );
const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
aVD.SetBackground( Wallpaper( rStyles.GetFieldColor() ) );
- aVD.SetDrawMode( GetDisplayBackground().GetColor().IsDark()
+ aVD.SetDrawMode( rStyles.GetHighContrastMode()
? ViewShell::OUTPUT_DRAWMODE_CONTRAST
: ViewShell::OUTPUT_DRAWMODE_COLOR );
aVD.Erase();
diff --git a/sd/source/ui/dlg/ins_paste.cxx b/sd/source/ui/dlg/ins_paste.cxx
index 9f2c3bf0b6b6..422acbec4a73 100644
--- a/sd/source/ui/dlg/ins_paste.cxx
+++ b/sd/source/ui/dlg/ins_paste.cxx
@@ -31,6 +31,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
+#ifdef SD_DLLIMPLEMENTATION
+#undef SD_DLLIMPLEMENTATION
+#endif
+
#include "ins_paste.hrc"
#include "ins_paste.hxx"
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index fa31c7fbb209..f251f6964263 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -863,7 +863,7 @@ void SdNavigatorWin::SetDragImage()
void SdNavigatorWin::ApplyImageList()
{
- const bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ const bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
maToolbox.SetImageList( bHighContrast ? maImageListH : maImageList );
diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
index f634d437ba4b..09c633424c6d 100644
--- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
@@ -161,11 +161,12 @@ void QueueProcessor::ProcessRequests (void)
{
OSL_ASSERT(mpCacheContext.get()!=NULL);
- while ( ! mrQueue.IsEmpty() && ! mbIsPaused)
+ // Never process more than one request at a time in order to prevent the
+ // lock up of the edit view.
+ if ( ! mrQueue.IsEmpty()
+ && ! mbIsPaused
+ && mpCacheContext->IsIdle())
{
- if ( ! mpCacheContext->IsIdle())
- break;
-
CacheKey aKey = NULL;
RequestPriorityClass ePriorityClass (NOT_VISIBLE);
{
@@ -182,25 +183,12 @@ void QueueProcessor::ProcessRequests (void)
if (aKey != NULL)
ProcessOneRequest(aKey, ePriorityClass);
-
- // Requests of lower priority are processed one at a time.
- {
- ::osl::MutexGuard aGuard (mrQueue.GetMutex());
- if ( ! mrQueue.IsEmpty())
- if (mrQueue.GetFrontPriorityClass() > 0)
- break;
- }
}
// Schedule the processing of the next element(s).
{
::osl::MutexGuard aGuard (mrQueue.GetMutex());
if ( ! mrQueue.IsEmpty())
- /*
- if (bIsShowingFullScreenShow)
- Start(mnTimeBetweenRequestsWhenNotIdle);
- else
- */
Start(mrQueue.GetFrontPriorityClass());
}
}
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index ba8dbb278ca4..4b48aa60678d 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -1085,6 +1085,14 @@ void SlotManager::InsertSlide (SfxRequest& rRequest)
rSelector.SelectPage (nInsertionIndex);
}
+ // Is there a stored insertion position?
+ else if (mrSlideSorter.GetController().GetSelectionManager()->GetInsertionPosition() >= 0)
+ {
+ nInsertionIndex
+ = mrSlideSorter.GetController().GetSelectionManager()->GetInsertionPosition() - 1;
+ rSelector.SelectPage(nInsertionIndex);
+ }
+
// Select the last page when there is at least one page.
else if (rSelector.GetPageCount() > 0)
{
diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx
index 11cfdbb65ef0..098d71d1f06a 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -457,6 +457,10 @@ void TableDesignPane::updateLayout()
Point aPos( pValueSet->GetPosPixel() );
+ // The following line may look like a no-op but without it the
+ // control is placed off-screen when RTL is active.
+ pValueSet->SetPosPixel(pValueSet->GetPosPixel());
+
// shift show options section down
const long nOptionsPos = aPos.Y() + aValueSetSize.Height();
for( sal_Int32 nId = FL_STYLE_OPTIONS; nId <= CB_BANDED_COLUMNS; ++nId )
diff --git a/sd/source/ui/toolpanel/LayoutMenu.cxx b/sd/source/ui/toolpanel/LayoutMenu.cxx
index 7a39f1c42f15..d2faeb06eb00 100644
--- a/sd/source/ui/toolpanel/LayoutMenu.cxx
+++ b/sd/source/ui/toolpanel/LayoutMenu.cxx
@@ -63,7 +63,7 @@
#include <vcl/image.hxx>
#include <svtools/languageoptions.hxx>
#include <sfx2/app.hxx>
-#include "taskpane/TitledControl.hxx"
+#include "taskpane/TitledControl.hxx"
#include <sfx2/dispatch.hxx>
#include <sfx2/request.hxx>
#include <comphelper/processfactory.hxx>
@@ -808,7 +808,7 @@ SfxRequest LayoutMenu::CreateRequest (
void LayoutMenu::Fill (void)
{
- const bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ const bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
SvtLanguageOptions aLanguageOptions;
sal_Bool bVertical = aLanguageOptions.IsVerticalTextEnabled();
SdDrawDocument* pDocument = mrBase.GetDocument();
@@ -917,8 +917,13 @@ void LayoutMenu::Command (const CommandEvent& rEvent)
if (GetShellManager() != NULL)
GetShellManager()->MoveToTop(this);
if (rEvent.IsMouseEvent())
- mrBase.GetViewFrame()->GetDispatcher()->ExecutePopup(
- SdResId(RID_TASKPANE_LAYOUTMENU_POPUP));
+ {
+ // Do not show the context menu when the mouse was not
+ // pressed over an item.
+ if (GetItemId(rEvent.GetMousePosPixel()) > 0)
+ mrBase.GetViewFrame()->GetDispatcher()->ExecutePopup(
+ SdResId(RID_TASKPANE_LAYOUTMENU_POPUP));
+ }
else
{
// When the command event was not caused by a mouse
diff --git a/sd/source/ui/toolpanel/TitleToolBox.cxx b/sd/source/ui/toolpanel/TitleToolBox.cxx
index b06ab615cbf2..d108724f03d4 100644
--- a/sd/source/ui/toolpanel/TitleToolBox.cxx
+++ b/sd/source/ui/toolpanel/TitleToolBox.cxx
@@ -77,7 +77,7 @@ void TitleToolBox::AddItem (ToolBoxId aId)
case TBID_DOCUMENT_CLOSE:
InsertItem (TBID_DOCUMENT_CLOSE,
- GetSettings().GetStyleSettings().GetMenuBarColor().IsDark()
+ GetSettings().GetStyleSettings().GetHighContrastMode()
? maImageHC : maImage, 0 );
break;
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index a252e2302b59..15b3b2224b4b 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -1014,7 +1014,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
}
case WID_PAGE_LDBITMAP:
{
- BOOL bHC = Application::GetSettings().GetStyleSettings().GetWindowColor().IsDark();
+ BOOL bHC = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
Reference< awt::XBitmap > xBitmap(
VCLUnoHelper::CreateBitmap( BitmapEx( SdResId( bHC ? BMP_PAGE_H : BMP_PAGE ) ) ) );
aAny <<= xBitmap;
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 233976585e58..ba5836e8f1db 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -334,6 +334,9 @@ void Outliner::EndSpelling (void)
{
if (mbViewShellValid)
{
+ // Keep old view shell alive until we release the outliner view.
+ ::boost::shared_ptr<ViewShell> pOldViewShell (mpViewShell);
+
ViewShellBase* pBase = PTR_CAST(ViewShellBase,SfxViewShell::Current());
if (pBase != NULL)
mpViewShell = pBase->GetMainViewShell();