summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/svmain.cxx4
-rw-r--r--vcl/source/control/lstbox.cxx9
-rw-r--r--vcl/source/gdi/pdfextoutdevdata.cxx53
-rw-r--r--vcl/source/gdi/pdfwriter.cxx4
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx7
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx4
-rw-r--r--vcl/source/window/winproc.cxx8
7 files changed, 82 insertions, 7 deletions
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index c075e1b108f3..115d0afbb24d 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -370,7 +370,9 @@ void DeInitVCL()
aBuf.append( rtl::OUStringToOString( pWin->GetText(), osl_getThreadTextEncoding() ) );
aBuf.append( "\" type = \"" );
aBuf.append( typeid(*pWin).name() );
- aBuf.append( "\"\n" );
+ aBuf.append( "\", ptr = 0x" );
+ aBuf.append( sal_Int64( pWin ), 16 );
+ aBuf.append( "\n" );
}
}
DBG_ASSERT( nBadTopWindows==0, aBuf.getStr() );
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index 594b76684a1a..49b949bdefdc 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -290,8 +290,15 @@ IMPL_LINK( ListBox, ImplSelectionChangedHdl, void*, n )
Image aImage = mpImplLB->GetEntryList()->GetEntryImage( nChanged );
mpImplWin->SetImage( aImage );
}
- mpImplWin->Invalidate();
}
+ else
+ {
+ mpImplWin->SetItemPos( LISTBOX_ENTRY_NOTFOUND );
+ mpImplWin->SetString( ImplGetSVEmptyStr() );
+ Image aImage;
+ mpImplWin->SetImage( aImage );
+ }
+ mpImplWin->Invalidate();
}
return 1;
}
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index 77458d2b26fd..c47b034e1011 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -31,22 +31,25 @@
#include "vcl/graph.hxx"
#include "vcl/outdev.hxx"
#include "vcl/gfxlink.hxx"
+#include "vcl/dllapi.h"
#include "basegfx/polygon/b2dpolygon.hxx"
#include "basegfx/polygon/b2dpolygontools.hxx"
#include <boost/shared_ptr.hpp>
#include <set>
+#include <map>
namespace vcl
{
-struct PDFExtOutDevDataSync
+struct SAL_DLLPRIVATE PDFExtOutDevDataSync
{
enum Action{ CreateNamedDest,
CreateDest,
CreateLink,
SetLinkDest,
SetLinkURL,
+ RegisterDest,
CreateOutlineItem,
SetOutlineItemParent,
SetOutlineItemText,
@@ -73,7 +76,15 @@ struct PDFExtOutDevDataSync
Action eAct;
};
-struct GlobalSyncData
+struct SAL_DLLPRIVATE PDFLinkDestination
+{
+ Rectangle mRect;
+ MapMode mMapMode;
+ sal_Int32 mPageNr;
+ PDFWriter::DestAreaType mAreaType;
+};
+
+struct SAL_DLLPRIVATE GlobalSyncData
{
std::deque< PDFExtOutDevDataSync::Action > mActions;
std::deque< MapMode > mParaMapModes;
@@ -84,6 +95,7 @@ struct GlobalSyncData
std::deque< PDFWriter::DestAreaType > mParaDestAreaTypes;
std::deque< PDFNote > mParaPDFNotes;
std::deque< PDFWriter::PageTransition > mParaPageTransitions;
+ ::std::map< sal_Int32, PDFLinkDestination > mFutureDestinations;
sal_Int32 GetMappedId();
sal_Int32 GetMappedStructId( sal_Int32 );
@@ -145,7 +157,7 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
{
switch( *aIter )
{
- case PDFExtOutDevDataSync::CreateNamedDest : //i56629
+ case PDFExtOutDevDataSync::CreateNamedDest : //i56629
{
rWriter.Push( PUSH_MAPMODE );
rWriter.SetMapMode( mParaMapModes.front() );
@@ -197,6 +209,21 @@ void GlobalSyncData::PlayGlobalActions( PDFWriter& rWriter )
mParaOUStrings.pop_front();
}
break;
+ case PDFExtOutDevDataSync::RegisterDest :
+ {
+ const sal_Int32 nDestId = mParaInts.front();
+ mParaInts.pop_front();
+ OSL_ENSURE( mFutureDestinations.find( nDestId ) != mFutureDestinations.end(),
+ "GlobalSyncData::PlayGlobalActions: DescribeRegisteredRequest has not been called for that destination!" );
+
+ PDFLinkDestination& rDest = mFutureDestinations[ nDestId ];
+
+ rWriter.Push( PUSH_MAPMODE );
+ rWriter.SetMapMode( rDest.mMapMode );
+ mParaIds.push_back( rWriter.RegisterDestReference( nDestId, rDest.mRect, rDest.mPageNr, rDest.mAreaType ) );
+ rWriter.Pop();
+ }
+ break;
case PDFExtOutDevDataSync::CreateOutlineItem :
{
sal_Int32 nParent = GetMappedId();
@@ -459,6 +486,7 @@ sal_Bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIM
case PDFExtOutDevDataSync::CreateLink:
case PDFExtOutDevDataSync::SetLinkDest:
case PDFExtOutDevDataSync::SetLinkURL:
+ case PDFExtOutDevDataSync::RegisterDest:
case PDFExtOutDevDataSync::CreateOutlineItem:
case PDFExtOutDevDataSync::SetOutlineItemParent:
case PDFExtOutDevDataSync::SetOutlineItemText:
@@ -617,9 +645,28 @@ sal_Int32 PDFExtOutDevData::CreateNamedDest(const String& sDestName, const Rect
mpGlobalSyncData->mParaMapModes.push_back( mrOutDev.GetMapMode() );
mpGlobalSyncData->mParaInts.push_back( nPageNr == -1 ? mnPage : nPageNr );
mpGlobalSyncData->mParaDestAreaTypes.push_back( eType );
+
return mpGlobalSyncData->mCurId++;
}
//<---i56629
+sal_Int32 PDFExtOutDevData::RegisterDest()
+{
+ const sal_Int32 nLinkDestID = mpGlobalSyncData->mCurId++;
+ mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::RegisterDest );
+ mpGlobalSyncData->mParaInts.push_back( nLinkDestID );
+
+ return nLinkDestID;
+}
+void PDFExtOutDevData::DescribeRegisteredDest( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
+{
+ OSL_PRECOND( nDestId != -1, "PDFExtOutDevData::DescribeRegisteredDest: invalid destination Id!" );
+ PDFLinkDestination aLinkDestination;
+ aLinkDestination.mRect = rRect;
+ aLinkDestination.mMapMode = mrOutDev.GetMapMode();
+ aLinkDestination.mPageNr = nPageNr == -1 ? mnPage : nPageNr;
+ aLinkDestination.mAreaType = eType;
+ mpGlobalSyncData->mFutureDestinations[ nDestId ] = aLinkDestination;
+}
sal_Int32 PDFExtOutDevData::CreateDest( const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
{
mpGlobalSyncData->mActions.push_back( PDFExtOutDevDataSync::CreateDest );
diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index 445365e83dd4..d6c5aed6b52a 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -420,6 +420,10 @@ sal_Int32 PDFWriter::CreateLink( const Rectangle& rRect, sal_Int32 nPageNr )
{
return ((PDFWriterImpl*)pImplementation)->createLink( rRect, nPageNr );
}
+sal_Int32 PDFWriter::RegisterDestReference( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr, DestAreaType eType )
+{
+ return ((PDFWriterImpl*)pImplementation)->registerDestReference( nDestId, rRect, nPageNr, eType );
+}
//--->i56629
sal_Int32 PDFWriter::CreateNamedDest( const rtl::OUString& sDestName, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
{
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 4a37d3a5d601..f8a2bbc051a0 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -5613,7 +5613,7 @@ bool PDFWriterImpl::emitWidgetAnnotations()
if(!m_bIsPDF_A1)
{
OStringBuffer aDest;
- if( rWidget.m_nDest != -1 && appendDest( rWidget.m_nDest, aDest ) )
+ if( rWidget.m_nDest != -1 && appendDest( m_aDestinationIdTranslation[ rWidget.m_nDest ], aDest ) )
{
aLine.append( "/AA<</D<</Type/Action/S/GoTo/D " );
aLine.append( aDest.makeStringAndClear() );
@@ -10839,6 +10839,11 @@ sal_Int32 PDFWriterImpl::createDest( const Rectangle& rRect, sal_Int32 nPageNr,
return nRet;
}
+sal_Int32 PDFWriterImpl::registerDestReference( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr, PDFWriter::DestAreaType eType )
+{
+ return m_aDestinationIdTranslation[ nDestId ] = createDest( rRect, nPageNr, eType );
+}
+
sal_Int32 PDFWriterImpl::setLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId )
{
if( nLinkId < 0 || nLinkId >= (sal_Int32)m_aLinks.size() )
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index c73be7c037e5..5cfe1be8d0f1 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -613,6 +613,9 @@ private:
dest id is always the dest's position in this vector
*/
std::vector<PDFDest> m_aDests;
+ /** contains destinations accessible via a public Id, instead of being linked to by an ordinary link
+ */
+ ::std::map< sal_Int32, sal_Int32 > m_aDestinationIdTranslation;
/* contains all links ever set during PDF creation,
link id is always the link's position in this vector
*/
@@ -1279,6 +1282,7 @@ public:
// links
sal_Int32 createLink( const Rectangle& rRect, sal_Int32 nPageNr = -1 );
sal_Int32 createDest( const Rectangle& rRect, sal_Int32 nPageNr = -1, PDFWriter::DestAreaType eType = PDFWriter::XYZ );
+ sal_Int32 registerDestReference( sal_Int32 nDestId, const Rectangle& rRect, sal_Int32 nPageNr = -1, PDFWriter::DestAreaType eType = PDFWriter::XYZ );
sal_Int32 setLinkDest( sal_Int32 nLinkId, sal_Int32 nDestId );
sal_Int32 setLinkURL( sal_Int32 nLinkId, const rtl::OUString& rURL );
void setLinkPropertyId( sal_Int32 nLinkId, sal_Int32 nPropertyId );
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 9cb38756e770..795bea17a3b9 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -1646,7 +1646,13 @@ void ImplHandleResize( Window* pWindow, long nNewWidth, long nNewHeight )
// #i42750# presentation wants to be informed about resize
// as early as possible
WorkWindow* pWorkWindow = dynamic_cast<WorkWindow*>(pWindow->ImplGetWindowImpl()->mpClientWindow);
- if( pWorkWindow && pWorkWindow->IsPresentationMode() )
+ if( ! pWorkWindow || pWorkWindow->IsPresentationMode() )
+ bStartTimer = false;
+ }
+ else
+ {
+ WorkWindow* pWorkWindow = dynamic_cast<WorkWindow*>(pWindow);
+ if( ! pWorkWindow || pWorkWindow->IsPresentationMode() )
bStartTimer = false;
}
}