[ooo-build-commit] Branch 'ooo/OOO320' - sd/source
Jan Holesovsky
kendy at kemper.freedesktop.org
Tue Oct 27 21:02:03 PDT 2009
sd/source/filter/eppt/eppt.cxx | 119 -----------------
sd/source/filter/eppt/eppt.hxx | 1
sd/source/filter/eppt/epptso.cxx | 47 +++---
sd/source/ui/app/sdmod.cxx | 12 +
sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx | 24 ---
sd/source/ui/slidesorter/controller/SlsSlotManager.cxx | 8 +
sd/source/ui/table/TableDesignPane.cxx | 4
sd/source/ui/toolpanel/LayoutMenu.cxx | 9 +
8 files changed, 60 insertions(+), 164 deletions(-)
New commits:
commit b3ecac25fa5d622fa432d428885e364bacf01177
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date: Tue Oct 27 14:01:25 2009 +0000
CWS-TOOLING: integrate CWS impress178
2009-10-16 19:54:41 +0200 sj r276995 : removed warning
2009-10-16 17:46:12 +0200 sj r276993 : #i103757# applied patch (fixed crash if model changes)
2009-10-16 16:06:07 +0200 sj r276985 : CWS-TOOLING: rebase CWS impress178 to branches/OOO320 at 276942 (milestone: OOO320:m2)
2009-10-08 13:51:23 +0200 sj r276790 : #i105654# fixed closing of line geometry
2009-10-07 17:26:56 +0200 sj r276762 : #i105606# fixed object shadow
2009-10-07 17:25:39 +0200 sj r276761 : minor improvements
2009-10-07 11:48:26 +0200 af r276745 : #i103047# Prevent context menu of LayoutMenu from being shown when user clicks on background.
2009-10-07 11:33:59 +0200 af r276743 : #i99866# Set position of the design control manually.
2009-10-06 17:18:23 +0200 sj r276721 : minor improvements
2009-10-05 18:34:23 +0200 sj r276692 : #105606# fixed fontsize problem
2009-10-05 17:26:21 +0200 af r276691 : #i105354# Never process more than one request in a row.
2009-10-02 13:24:25 +0200 af r276639 : #i94242# Taking insertion position of slide sorter correctly into account.
2009-10-01 13:46:47 +0200 aw r276602 : #i102224# some Polygon/PolyPolygon usages in SVMConverter ignored the possible curve status of tools::Polygon; added at least an AdaptiveSubdivide
2009-10-01 12:33:56 +0200 aw r276588 : #i102224# ImplWritePolyPolygon killed the curve information at the PolyPolygon by NOT copying the flags
2009-09-30 17:48:56 +0200 aw r276567 : #i102224# removed GetSimple() from Polygon and PolyPolygon, replaced completely with AdaptiveSubdivide
2009-09-30 15:45:46 +0200 aw r276559 : #i102048# secured primitive creation for dimension lines with linestyle none
2009-09-30 14:56:41 +0200 af r276556 : #i105471# Reordered statements in ~SdModule.
2009-09-30 14:47:12 +0200 aw r276555 : #i105373# corrected curve ignoring places in MetaFile export
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index 4f29f50..1327395 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -222,8 +222,6 @@ PPTWriter::PPTWriter( SvStorageRef& rSvStorage,
}
if ( !ImplCreateMainNotes() )
return;
- maTextRuleList.First(); // rewind list, so we can get the current or next entry without
- // searching, all entrys are sorted#
for ( i = 0; i < mnPages; i++ )
{
if ( !ImplCreateSlide( i ) )
@@ -274,8 +272,6 @@ PPTWriter::~PPTWriter()
while( aStyleSheetIter < maStyleSheetList.end() )
delete *aStyleSheetIter++;
- for ( pPtr = maTextRuleList.First(); pPtr; pPtr = maTextRuleList.Next() )
- delete (TextRuleEntry*)pPtr;
for ( pPtr = maSlideNameList.First(); pPtr; pPtr = maSlideNameList.Next() )
delete (::rtl::OUString*)pPtr;
for ( pPtr = maHyperlink.First(); pPtr; pPtr = maHyperlink.Next() )
@@ -560,22 +556,12 @@ sal_Bool PPTWriter::ImplCreateDocument()
mpPptEscherEx->OpenContainer( EPP_SlideListWithText ); // Animation info fuer die Slides
- sal_uInt32 nShapes;
- sal_Bool bOtherThanPlaceHolders;
-
for ( i = 0; i < mnPages; i++ )
{
- sal_uInt32 nPOffset, nPObjects;
- sal_Bool bOutliner, bTitle;
-
- bOtherThanPlaceHolders = bOutliner = bTitle = FALSE;
- nPObjects = 0;
-
mpPptEscherEx->AddAtom( 20, EPP_SlidePersistAtom );
mpPptEscherEx->InsertPersistOffset( EPP_MAINSLIDE_PERSIST_KEY | i, mpStrm->Tell() );
- *mpStrm << (sal_uInt32)0; // psrReference - logical reference to the slide persist object ( EPP_MAINSLIDE_PERSIST_KEY )
- nPOffset = mpStrm->Tell();
- *mpStrm << (sal_uInt32)0 // flags - only bit 3 used, if set then slide contains shapes other than placeholders
+ *mpStrm << (sal_uInt32)0 // psrReference - logical reference to the slide persist object ( EPP_MAINSLIDE_PERSIST_KEY )
+ << (sal_uInt32)4 // flags - only bit 3 used, if set then slide contains shapes other than placeholders
<< (INT32)0 // numberTexts - number of placeholder texts stored with the persist object. Allows to display outline view without loading the slide persist objects
<< (INT32)i + 0x100 // slideId - Unique slide identifier, used for OLE link monikers for example
<< (sal_uInt32)0; // reserved, usualy 0
@@ -584,8 +570,6 @@ sal_Bool PPTWriter::ImplCreateDocument()
return FALSE;
ImplSetCurrentStyleSheet( ImplGetMasterIndex( NORMAL ) );
- const PHLayout& rLayout = ImplGetLayout( mXPagePropSet );
-
::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed >
aXName( mXDrawPage, ::com::sun::star::uno::UNO_QUERY );
@@ -597,113 +581,16 @@ sal_Bool PPTWriter::ImplCreateDocument()
}
else
maSlideNameList.Insert( new ::rtl::OUString(), LIST_APPEND );
-
- nShapes = mXShapes->getCount();
-
- sal_Bool bSecOutl = FALSE;
- if ( nShapes && ( rLayout.bTitlePossible || rLayout.bOutlinerPossible ) )
- {
- for ( sal_uInt32 nIndex = 0; nIndex < nShapes; nIndex++ )
- {
- if ( !ImplGetShapeByIndex( nIndex ) )
- continue;
-
- if ( mbPresObj && ( ( mType == "presentation.Outliner" ) || ( mType == "presentation.Subtitle" ) ) )
- {
- if ( bOutliner == FALSE )
- {
- bOutliner = TRUE;
- mnTextStyle = EPP_TEXTSTYLE_BODY;
- sal_uInt32 nTextType = EPP_TEXTTYPE_Body;
- if ( bSecOutl )
- nTextType = EPP_TEXTTYPE_HalfBody;
- else if ( mType == "presentation.Subtitle" )
- nTextType = EPP_TEXTTYPE_CenterBody;
-
- TextRuleEntry* pRule = new TextRuleEntry( i );
- SvMemoryStream aExtBu( 0x200, 0x200 );
- if ( !mbEmptyPresObj )
- ImplGetText();
- ImplWriteTextStyleAtom( *mpStrm, nTextType, nPObjects, pRule, aExtBu, NULL );
- ImplWriteExtParaHeader( aExtBu, nPObjects++, nTextType, i + 0x100 );
- maTextRuleList.Insert( (void*)pRule, LIST_APPEND );
- if ( rLayout.bSecOutlinerPossible )
- {
- if ( ( nIndex + 1 ) < nShapes )
- {
- if ( ImplGetShapeByIndex( nIndex + 1 ) && mType == "presentation.Outliner" )
- {
- bSecOutl = TRUE;
- TextRuleEntry* pTempRule = new TextRuleEntry( i );
- SvMemoryStream aTmpStrm( 0x200, 0x200 );
- if ( !mbEmptyPresObj )
- ImplGetText();
- ImplWriteTextStyleAtom( *mpStrm, nTextType, nPObjects, pTempRule, aTmpStrm, NULL );
- ImplWriteExtParaHeader( aTmpStrm, nPObjects++, nTextType, i + 0x100 );
- maTextRuleList.Insert( (void*)pTempRule, LIST_APPEND );
- }
- }
- }
- }
- }
- else if ( rLayout.bTitlePossible && ( mType == "presentation.TitleText" ) )
- {
- if ( bTitle == FALSE )
- {
- bTitle = TRUE;
- mnTextStyle = EPP_TEXTSTYLE_TITLE;
- TextRuleEntry* pRule = new TextRuleEntry( i );
- SvMemoryStream aExtBu( 0x200, 0x200 );
- if ( !mbEmptyPresObj )
- ImplGetText();
- ImplWriteTextStyleAtom( *mpStrm, EPP_TEXTTYPE_Title, nPObjects, pRule, aExtBu, NULL );
- ImplWriteExtParaHeader( aExtBu, nPObjects++, EPP_TEXTTYPE_Title, i + 0x100 );
- maTextRuleList.Insert( (void*)pRule, LIST_APPEND );
- }
- }
- else
- {
- if ( mbEmptyPresObj )
- nPObjects++;
- else
- bOtherThanPlaceHolders = TRUE; // muss noch auf background und leeren Title/outliner geprueft werden !!!
- }
- if ( bOutliner && bTitle && bOtherThanPlaceHolders )
- break;
- }
- }
- if ( nPObjects )
- {
- sal_uInt32 nOldPos = mpStrm->Tell();
- mpStrm->Seek( nPOffset );
- *mpStrm << (sal_uInt32)( ( bOtherThanPlaceHolders ) ? 4 : 0 );
- *mpStrm << nPObjects;
- mpStrm->Seek( nOldPos );
- }
}
mpPptEscherEx->CloseContainer(); // EPP_SlideListWithText
mpPptEscherEx->OpenContainer( EPP_SlideListWithText, 2 ); // Animation info fuer die notes
for( i = 0; i < mnPages; i++ )
{
- if ( !ImplGetPageByIndex( i, NOTICE ) )
- return FALSE;
-
- nShapes = mXShapes->getCount();
-
- bOtherThanPlaceHolders = FALSE;
- if ( nShapes )
- {
- for ( sal_uInt32 nIndex = 0; ( nIndex < nShapes ) && ( bOtherThanPlaceHolders == FALSE ); nIndex++ )
- {
- if ( ImplGetShapeByIndex( nIndex ) && ( mType != "drawing.Page" ) )
- bOtherThanPlaceHolders = TRUE;
- }
- }
mpPptEscherEx->AddAtom( 20, EPP_SlidePersistAtom );
mpPptEscherEx->InsertPersistOffset( EPP_MAINNOTES_PERSIST_KEY | i, mpStrm->Tell() );
*mpStrm << (sal_uInt32)0
- << (sal_uInt32)( ( bOtherThanPlaceHolders ) ? 4 : 0 )
+ << (sal_uInt32)4
<< (INT32)0
<< (INT32)i + 0x100
<< (sal_uInt32)0;
diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx
index ed84604..9693394 100644
--- a/sd/source/filter/eppt/eppt.hxx
+++ b/sd/source/filter/eppt/eppt.hxx
@@ -756,7 +756,6 @@ class PPTWriter : public GroupTable, public PropValue, public PPTExBulletProvide
sal_uInt32 mnShapeMasterTitle;
sal_uInt32 mnShapeMasterBody;
- List maTextRuleList; // TextRuleEntry's
List maHyperlink;
FontCollection maFontCollection;
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 3c4cf03..25e9671 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -4239,6 +4239,9 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
sal_Bool bAdditionalText = FALSE;
+ sal_Bool bSecOutl = FALSE;
+ sal_uInt32 nPObjects = 0;
+
SvMemoryStream* pClientTextBox = NULL;
SvMemoryStream* pClientData = NULL;
@@ -5341,32 +5344,32 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
if ( !pClientTextBox )
pClientTextBox = new SvMemoryStream( 0x200, 0x200 );
- *pClientTextBox << (sal_uInt32)( EPP_OutlineTextRefAtom << 16 ) << (sal_uInt32)4
- << nPlacementID;
-
if ( mbEmptyPresObj == FALSE )
{
if ( ( ePageType == NORMAL ) && ( bMasterPage == FALSE ) )
- { // try to allocate the textruleratom
- TextRuleEntry* pTextRule = (TextRuleEntry*)maTextRuleList.GetCurObject();
- while ( pTextRule )
+ {
+ sal_uInt32 nTextType = EPP_TEXTTYPE_Body;
+ if ( mnTextStyle == EPP_TEXTSTYLE_BODY )
+ {
+ if ( bSecOutl )
+ nTextType = EPP_TEXTTYPE_HalfBody;
+ else if ( mType == "presentation.Subtitle" )
+ nTextType = EPP_TEXTTYPE_CenterBody;
+ bSecOutl = sal_True;
+ }
+ else
+ nTextType = EPP_TEXTTYPE_Title;
+
+ TextRuleEntry aTextRule( nPageNumber );
+ SvMemoryStream aExtBu( 0x200, 0x200 );
+ ImplGetText();
+ ImplWriteTextStyleAtom( *pClientTextBox, nTextType, nPObjects, &aTextRule, aExtBu, NULL );
+ ImplWriteExtParaHeader( aExtBu, nPObjects++, nTextType, nPageNumber + 0x100 );
+ SvMemoryStream* pOut = aTextRule.pOut;
+ if ( pOut )
{
- int nRulePage = pTextRule->nPageNumber;
- if ( nRulePage > nPageNumber )
- break;
- else if ( nRulePage < nPageNumber )
- pTextRule = (TextRuleEntry*)maTextRuleList.Next();
- else
- {
- SvMemoryStream* pOut = pTextRule->pOut;
- if ( pOut )
- {
- pClientTextBox->Write( pOut->GetData(), pOut->Tell() );
- delete pOut, pTextRule->pOut = NULL;
- }
- maTextRuleList.Next();
- break;
- }
+ pClientTextBox->Write( pOut->GetData(), pOut->Tell() );
+ delete pOut, aTextRule.pOut = NULL;
}
}
}
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index a51c1c9..ac8bf1e 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/slidesorter/cache/SlsQueueProcessor.cxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
index 8a53809..1c478af 100644
--- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
@@ -160,12 +160,13 @@ IMPL_LINK(QueueProcessor, ProcessRequestHdl, Timer*, EMPTYARG)
void QueueProcessor::ProcessRequests (void)
{
OSL_ASSERT(mpCacheContext.get()!=NULL);
-
- while ( ! mrQueue.IsEmpty() && ! mbIsPaused)
- {
- if ( ! mpCacheContext->IsIdle())
- break;
+ // 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())
+ {
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 a55e8a5..51b59de 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 0b6cb9a..c8d7c6c 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 7b479e1..9a5dbe4 100644
--- a/sd/source/ui/toolpanel/LayoutMenu.cxx
+++ b/sd/source/ui/toolpanel/LayoutMenu.cxx
@@ -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
More information about the ooo-build-commit
mailing list