summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/notemark.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2009-03-02 14:19:13 +0000
committerOliver Bolte <obo@openoffice.org>2009-03-02 14:19:13 +0000
commit07b0c01857137de7e4bd02375e7c892d622d270e (patch)
treeca4599cb8c96535139e3e0ee07acb37bcb5ad636 /sc/source/ui/view/notemark.cxx
parent74e4b152bbe46cf55cec4da21b9365363ec2fa8d (diff)
CWS-TOOLING: integrate CWS dr66
2009-01-22 15:51:40 +0100 dr r266730 : #i98028# moved to CWS dr66 2009-01-22 15:50:28 +0100 dr r266729 : #i98028# moved to CWS dr66 2009-01-20 16:25:49 +0100 dr r266595 : #i98282# resolve palette colors while loading chart gradients (convert back to unx lineends...) 2009-01-20 16:23:19 +0100 dr r266594 : #i98282# resolve palette colors while loading chart gradients 2009-01-19 15:43:57 +0100 dr r266507 : #i97900# move fix to CWS dr66 2009-01-19 15:40:28 +0100 dr r266506 : #i97900# move fix to CWS dr66 2009-01-19 15:20:14 +0100 dr r266505 : #i98141# correctly update note position while switching LTR/RTL mode of sheet 2009-01-06 10:28:02 +0100 dr r265899 : CWS-TOOLING: rebase CWS dr66 to trunk@265758 (milestone: DEV300:m38) 2008-11-13 13:59:02 +0100 dr r263644 : #i10000# merge problems 2008-11-13 13:25:15 +0100 dr r263639 : #i10000# merge problems 2008-11-13 13:22:58 +0100 dr r263638 : #i10000# merge problems 2008-11-13 13:22:25 +0100 dr r263637 : #i10000# merge problems 2008-11-12 13:40:46 +0100 dr r263595 : #i10000# merge problem 2008-11-12 11:34:51 +0100 dr r263583 : CWS-TOOLING: rebase CWS dr66 to trunk@263288 (milestone: DEV300:m35) 2008-11-11 16:58:11 +0100 dr r263568 : CWS-TOOLING: rebase CWS dr66 to trunk@262087 (milestone: DEV300:m33) 2008-10-27 14:38:34 +0100 dr r262675 : migrate CWS dr66 to SVN
Diffstat (limited to 'sc/source/ui/view/notemark.cxx')
-rw-r--r--sc/source/ui/view/notemark.cxx45
1 files changed, 20 insertions, 25 deletions
diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx
index ac94459500d7..2c50a8eb0a81 100644
--- a/sc/source/ui/view/notemark.cxx
+++ b/sc/source/ui/view/notemark.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: notemark.cxx,v $
- * $Revision: 1.13 $
+ * $Revision: 1.12.126.5 $
*
* This file is part of OpenOffice.org.
*
@@ -31,13 +31,10 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sc.hxx"
-
-
-// INCLUDE ---------------------------------------------------------------
-
#include <svx/svdoutl.hxx>
#include <svx/svdmodel.hxx>
-#include <svx/svdobj.hxx>
+#include <svx/svdpage.hxx>
+#include <svx/svdocapt.hxx>
#include <sfx2/printer.hxx>
#include <svtools/pathoptions.hxx>
#include <svtools/itempool.hxx>
@@ -45,13 +42,11 @@
#include "notemark.hxx"
#include "document.hxx"
-#include "detfunc.hxx"
+#include "postit.hxx"
#define SC_NOTEMARK_TIME 800
#define SC_NOTEMARK_SHORT 70
-// STATIC DATA -----------------------------------------------------------
-
// -----------------------------------------------------------------------
ScNoteMarker::ScNoteMarker( Window* pWin, Window* pRight, Window* pBottom, Window* pDiagonal,
@@ -71,6 +66,14 @@ ScNoteMarker::ScNoteMarker( Window* pWin, Window* pRight, Window* pBottom, Windo
pObject( NULL ),
bVisible( FALSE )
{
+ Size aSizePixel = pWindow->GetOutputSizePixel();
+ if( pRightWin )
+ aSizePixel.Width() += pRightWin->GetOutputSizePixel().Width();
+ if( pBottomWin )
+ aSizePixel.Height() += pBottomWin->GetOutputSizePixel().Height();
+ Rectangle aVisPixel( Point( 0, 0 ), aSizePixel );
+ aVisRect = pWindow->PixelToLogic( aVisPixel, aMapMode );
+
aTimer.SetTimeoutHdl( LINK( this, ScNoteMarker, TimeHdl ) );
aTimer.SetTimeout( bForce ? SC_NOTEMARK_SHORT : SC_NOTEMARK_TIME );
aTimer.Start();
@@ -104,24 +107,16 @@ IMPL_LINK( ScNoteMarker, TimeHdl, Timer*, EMPTYARG )
rOutliner.SetRefDevice(pPrinter);
}
- SdrPage* pPage = pModel->AllocPage(FALSE);
-
- Size aSizePixel = pWindow->GetOutputSizePixel();
- Rectangle aVisPixel( Point(0,0), aSizePixel );
- Rectangle aVisible = pWindow->PixelToLogic( aVisPixel, aMapMode );
-
- SCCOL nCol = aDocPos.Col();
- SCROW nRow = aDocPos.Row();
- SCTAB nTab = aDocPos.Tab();
- pObject = ScDetectiveFunc( pDoc,nTab ).
- ShowCommentUser( nCol, nRow, aUserText, aVisible, bLeft, FALSE, pPage );
-
- if (pObject)
- aRect = pObject->GetCurrentBoundRect();
+ if( SdrPage* pPage = pModel->AllocPage( FALSE ) )
+ {
+ pObject = ScNoteUtil::CreateTempCaption( *pDoc, aDocPos, *pPage, aUserText, aVisRect, bLeft );
+ if( pObject )
+ aRect = pObject->GetCurrentBoundRect();
- // #39351# Page einfuegen damit das Model sie kennt und auch deleted
- pModel->InsertPage( pPage );
+ // #39351# Page einfuegen damit das Model sie kennt und auch deleted
+ pModel->InsertPage( pPage );
+ }
bVisible = TRUE;
}