Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index



From a7826d3e91a76bd99b248b67e88825b88c909324 Mon Sep 17 00:00:00 2001
From: Rafael Dominguez <venccsralph@gmail.com>
Date: Sun, 18 Dec 2011 18:43:08 -0430
Subject: [PATCH 22/36] Replace IsA call for dynamic_cast.

---
 sd/source/ui/view/ViewShellBase.cxx |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index a3e7f61..500e607 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -472,9 +472,11 @@ void ViewShellBase::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
 {
     SfxViewShell::Notify(rBC, rHint);
 
-    if (rHint.IsA(TYPE(SfxEventHint)))
+    const SfxEventHint *pEventHint = dynamic_cast<const SfxEventHint*>(&rHint);
+
+    if (pEventHint)
     {
-        switch (static_cast<const SfxEventHint&>(rHint).GetEventId())
+        switch (pEventHint->GetEventId())
         {
             case SFX_EVENT_OPENDOC:
                 if( GetDocument() && GetDocument()->IsStartWithPresentation() )
-- 
1.7.3.4

From 4ae7f22e1b33f5a9697077f9667b6fc4f0fc18f5 Mon Sep 17 00:00:00 2001
From: Rafael Dominguez <venccsralph@gmail.com>
Date: Sun, 18 Dec 2011 18:43:30 -0430
Subject: [PATCH 23/36] Replace IsA call for dynamic_cast.

---
 sd/source/ui/tools/PreviewRenderer.cxx |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx
index 6481d85..57fe260 100644
--- a/sd/source/ui/tools/PreviewRenderer.cxx
+++ b/sd/source/ui/tools/PreviewRenderer.cxx
@@ -532,12 +532,11 @@ Image PreviewRenderer::ScaleBitmap (
 
 void PreviewRenderer::Notify(SfxBroadcaster&, const SfxHint& rHint)
 {
-    if (rHint.IsA(TYPE(SfxSimpleHint))
-        && mpDocShellOfView != NULL)
+    const SfxSimpleHint *pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
+
+    if (pSimpleHint && mpDocShellOfView != NULL)
     {
-        const SfxSimpleHint* pSimpleHint = PTR_CAST(SfxSimpleHint, &rHint);
-        if (pSimpleHint != NULL
-            && pSimpleHint->GetId() == SFX_HINT_DYING)
+        if (pSimpleHint->GetId() == SFX_HINT_DYING)
         {
             // The doc shell is dying.  Our view uses its item pool and
             // has to be destroyed as well.  The next call to
-- 
1.7.3.4

From e9a0e3c096c4a941bd91ee97d583892b37287698 Mon Sep 17 00:00:00 2001
From: Rafael Dominguez <venccsralph@gmail.com>
Date: Sun, 18 Dec 2011 18:53:03 -0430
Subject: [PATCH 24/36] Remove usage of tools/rtti.hxx from SdUndoAction class hierarchy.

---
 sd/inc/sdundo.hxx                      |    1 -
 sd/source/ui/func/sdundo.cxx           |    1 -
 sd/source/ui/func/sdundogr.cxx         |    1 -
 sd/source/ui/func/undoback.cxx         |    1 -
 sd/source/ui/func/undoheaderfooter.cxx |    1 -
 sd/source/ui/func/undolayer.cxx        |    1 -
 sd/source/ui/func/undopage.cxx         |    5 -----
 sd/source/ui/func/unoaprms.cxx         |    2 --
 sd/source/ui/func/unprlout.cxx         |    3 ---
 sd/source/ui/inc/sdundogr.hxx          |    1 -
 sd/source/ui/inc/undoback.hxx          |    1 -
 sd/source/ui/inc/undoheaderfooter.hxx  |    1 -
 sd/source/ui/inc/undolayer.hxx         |    1 -
 sd/source/ui/inc/undopage.hxx          |    3 ---
 sd/source/ui/inc/unoaprms.hxx          |    1 -
 sd/source/ui/inc/unprlout.hxx          |    1 -
 16 files changed, 0 insertions(+), 25 deletions(-)

diff --git a/sd/inc/sdundo.hxx b/sd/inc/sdundo.hxx
index bbf39e2..0d5a058 100644
--- a/sd/inc/sdundo.hxx
+++ b/sd/inc/sdundo.hxx
@@ -37,7 +37,6 @@ class SdDrawDocument;
 class SD_DLLPUBLIC SdUndoAction : public SfxUndoAction
 {
 public:
-    TYPEINFO();
                             SdUndoAction(SdDrawDocument* pSdDrawDocument)
                                 : mpDoc(pSdDrawDocument)  {}
     virtual                 ~SdUndoAction() {}
diff --git a/sd/source/ui/func/sdundo.cxx b/sd/source/ui/func/sdundo.cxx
index 4f05f61..e614b41 100644
--- a/sd/source/ui/func/sdundo.cxx
+++ b/sd/source/ui/func/sdundo.cxx
@@ -31,6 +31,5 @@
 #include "sdundo.hxx"
 #include <tools/debug.hxx>
 
-TYPEINIT1(SdUndoAction, SfxUndoAction);
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/func/sdundogr.cxx b/sd/source/ui/func/sdundogr.cxx
index 684987d..b2d883a 100644
--- a/sd/source/ui/func/sdundogr.cxx
+++ b/sd/source/ui/func/sdundogr.cxx
@@ -31,7 +31,6 @@
 #include "sdundogr.hxx"
 
 
-TYPEINIT1(SdUndoGroup, SdUndoAction);
 
 /*************************************************************************
 |*
diff --git a/sd/source/ui/func/undoback.cxx b/sd/source/ui/func/undoback.cxx
index 4f3def1..98db07d 100644
--- a/sd/source/ui/func/undoback.cxx
+++ b/sd/source/ui/func/undoback.cxx
@@ -37,7 +37,6 @@
 // - BackgroundObjUndoAction -
 // ---------------------------
 
-TYPEINIT1( SdBackgroundObjUndoAction, SdUndoAction );
 
 // -----------------------------------------------------------------------------
 
diff --git a/sd/source/ui/func/undoheaderfooter.cxx b/sd/source/ui/func/undoheaderfooter.cxx
index cb17df5..928265c 100644
--- a/sd/source/ui/func/undoheaderfooter.cxx
+++ b/sd/source/ui/func/undoheaderfooter.cxx
@@ -36,7 +36,6 @@
 #include "drawview.hxx"
 #include "undoheaderfooter.hxx"
 
-TYPEINIT1(SdHeaderFooterUndoAction, SdUndoAction);
 
 SdHeaderFooterUndoAction::SdHeaderFooterUndoAction( SdDrawDocument* pDoc, SdPage* pPage, const 
sd::HeaderFooterSettings& rNewSettings )
 :   SdUndoAction(pDoc),
diff --git a/sd/source/ui/func/undolayer.cxx b/sd/source/ui/func/undolayer.cxx
index cf220fb..02484ae 100644
--- a/sd/source/ui/func/undolayer.cxx
+++ b/sd/source/ui/func/undolayer.cxx
@@ -35,7 +35,6 @@
 #include "strings.hrc"
 #include "sdresid.hxx"
 
-TYPEINIT1(SdLayerModifyUndoAction, SdUndoAction);
 
 SdLayerModifyUndoAction::SdLayerModifyUndoAction(
     SdDrawDocument* _pDoc, SdrLayer* pLayer,
diff --git a/sd/source/ui/func/undopage.cxx b/sd/source/ui/func/undopage.cxx
index 47d96e2..480c8b2 100644
--- a/sd/source/ui/func/undopage.cxx
+++ b/sd/source/ui/func/undopage.cxx
@@ -42,11 +42,6 @@
 
 
 
-TYPEINIT1(SdPageFormatUndoAction, SdUndoAction);
-TYPEINIT1(SdPageLRUndoAction, SdUndoAction);
-TYPEINIT1(SdPageULUndoAction, SdUndoAction);
-
-
 /*************************************************************************
 |*
 |* Destruktor
diff --git a/sd/source/ui/func/unoaprms.cxx b/sd/source/ui/func/unoaprms.cxx
index b688dd0..9a86a42 100644
--- a/sd/source/ui/func/unoaprms.cxx
+++ b/sd/source/ui/func/unoaprms.cxx
@@ -33,8 +33,6 @@
 #include "anminfo.hxx"
 
 
-TYPEINIT1(SdAnimationPrmsUndoAction, SdUndoAction);
-
 
 /*************************************************************************
 |*
diff --git a/sd/source/ui/func/unprlout.cxx b/sd/source/ui/func/unprlout.cxx
index 60ff3a4..1f66603 100644
--- a/sd/source/ui/func/unprlout.cxx
+++ b/sd/source/ui/func/unprlout.cxx
@@ -36,9 +36,6 @@
 #include "sdresid.hxx"
 
 
-TYPEINIT1(SdPresentationLayoutUndoAction, SdUndoAction);
-
-
 
 /*************************************************************************
 |*
diff --git a/sd/source/ui/inc/sdundogr.hxx b/sd/source/ui/inc/sdundogr.hxx
index 2af43c4..c463944 100644
--- a/sd/source/ui/inc/sdundogr.hxx
+++ b/sd/source/ui/inc/sdundogr.hxx
@@ -37,7 +37,6 @@ class SD_DLLPUBLIC SdUndoGroup : public SdUndoAction
 {
     Container      aCtn;
 public:
-    TYPEINFO();
                    SdUndoGroup(SdDrawDocument* pSdDrawDocument)
                               : SdUndoAction(pSdDrawDocument),
                                 aCtn(16, 16, 16) {}
diff --git a/sd/source/ui/inc/undoback.hxx b/sd/source/ui/inc/undoback.hxx
index 11ca547..ebcc2ab 100644
--- a/sd/source/ui/inc/undoback.hxx
+++ b/sd/source/ui/inc/undoback.hxx
@@ -50,7 +50,6 @@ private:
 
 public:
 
-                            TYPEINFO();
 
                             SdBackgroundObjUndoAction(
                                 SdDrawDocument& rDoc,
diff --git a/sd/source/ui/inc/undoheaderfooter.hxx b/sd/source/ui/inc/undoheaderfooter.hxx
index 90f5d77..2f4e2f2 100644
--- a/sd/source/ui/inc/undoheaderfooter.hxx
+++ b/sd/source/ui/inc/undoheaderfooter.hxx
@@ -46,7 +46,6 @@ class SD_DLLPUBLIC SdHeaderFooterUndoAction : public SdUndoAction
     const sd::HeaderFooterSettings  maNewSettings;
 
 public:
-    TYPEINFO();
     SdHeaderFooterUndoAction( SdDrawDocument* pDoc, SdPage* pPage, const sd::HeaderFooterSettings& 
rNewSettings );
     virtual ~SdHeaderFooterUndoAction();
 
diff --git a/sd/source/ui/inc/undolayer.hxx b/sd/source/ui/inc/undolayer.hxx
index f076d43..1de010e 100644
--- a/sd/source/ui/inc/undolayer.hxx
+++ b/sd/source/ui/inc/undolayer.hxx
@@ -40,7 +40,6 @@ class SdLayerModifyUndoAction : public SdUndoAction
 {
 
 public:
-    TYPEINFO();
     SdLayerModifyUndoAction( SdDrawDocument* _pDoc, SdrLayer* pLayer,
     const String& rOldLayerName, const String& rOldLayerTitle, const String& rOldLayerDesc, bool 
bOldIsVisible, bool bOldIsLocked, bool bOldIsPrintable,
     const String& rNewLayerName, const String& rNewLayerTitle, const String& rNewLayerDesc, bool 
bNewIsVisible, bool bNewIsLocked, bool bNewIsPrintable );
diff --git a/sd/source/ui/inc/undopage.hxx b/sd/source/ui/inc/undopage.hxx
index 8e6ba7a..8d51c7a 100644
--- a/sd/source/ui/inc/undopage.hxx
+++ b/sd/source/ui/inc/undopage.hxx
@@ -64,7 +64,6 @@ class SdPageFormatUndoAction : public SdUndoAction
     sal_Bool        mbNewFullSize;
 
 public:
-    TYPEINFO();
     SdPageFormatUndoAction( SdDrawDocument* pDoc,
                             SdPage*         pThePage,
                             const Size&     rOldSz,
@@ -129,7 +128,6 @@ class SdPageLRUndoAction : public SdUndoAction
     sal_Int32   mnNewRight;
 
 public:
-    TYPEINFO();
     SdPageLRUndoAction( SdDrawDocument* pDoc, SdPage* pThePage,
                         sal_Int32 nOldLft, sal_Int32 nOldRgt,
                         sal_Int32 nNewLft, sal_Int32 nNewRgt ) :
@@ -158,7 +156,6 @@ class SdPageULUndoAction : public SdUndoAction
     sal_Int32   mnNewLower;
 
 public:
-    TYPEINFO();
     SdPageULUndoAction( SdDrawDocument* pDoc, SdPage* pThePage,
                         sal_Int32 nOldUpr, sal_Int32 nOldLwr,
                         sal_Int32 nNewUpr, sal_Int32 nNewLwr ) :
diff --git a/sd/source/ui/inc/unoaprms.hxx b/sd/source/ui/inc/unoaprms.hxx
index 2ce6296..471bdc7 100644
--- a/sd/source/ui/inc/unoaprms.hxx
+++ b/sd/source/ui/inc/unoaprms.hxx
@@ -90,7 +90,6 @@ class SdAnimationPrmsUndoAction : public SdUndoAction
     sal_Bool            bInfoCreated;
 
 public:
-    TYPEINFO();
         SdAnimationPrmsUndoAction(SdDrawDocument* pTheDoc, SdrObject* pObj,
                                   sal_Bool bCreated):
         SdUndoAction    (pTheDoc),
diff --git a/sd/source/ui/inc/unprlout.hxx b/sd/source/ui/inc/unprlout.hxx
index c9130e6..ac297b8 100644
--- a/sd/source/ui/inc/unprlout.hxx
+++ b/sd/source/ui/inc/unprlout.hxx
@@ -46,7 +46,6 @@ class SdPresentationLayoutUndoAction : public SdUndoAction
     String          aComment;
 
 public:
-    TYPEINFO();
     SdPresentationLayoutUndoAction(SdDrawDocument* pTheDoc,
                          String          aTheOldLayoutName,
                          String          aTheNewLayoutName,
-- 
1.7.3.4

From d2afe18172ecf92ea639131638d1abc19b78574b Mon Sep 17 00:00:00 2001
From: Rafael Dominguez <venccsralph@gmail.com>
Date: Sun, 18 Dec 2011 18:58:47 -0430
Subject: [PATCH 25/36] Replace deprecated PTR_CAST macro for dynamic_cast.

---
 sd/source/ui/func/fubullet.cxx |    2 +-
 sd/source/ui/func/fuhhconv.cxx |    2 +-
 sd/source/ui/func/fuinsert.cxx |    2 +-
 sd/source/ui/func/fusearch.cxx |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx
index 386cd8a..4fca9ea 100644
--- a/sd/source/ui/func/fubullet.cxx
+++ b/sd/source/ui/func/fubullet.cxx
@@ -176,7 +176,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq )
         aChars = ((const SfxStringItem*)pItem)->GetValue();
         const SfxPoolItem* pFtItem = NULL;
         pArgs->GetItemState( mpDoc->GetPool().GetWhich(SID_ATTR_SPECIALCHAR), sal_False, &pFtItem);
-        const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
+        const SfxStringItem* pFontItem = dynamic_cast<const SfxStringItem*>(pFtItem);
         if ( pFontItem )
         {
             aFontName = pFontItem->GetValue();
diff --git a/sd/source/ui/func/fuhhconv.cxx b/sd/source/ui/func/fuhhconv.cxx
index 905c055..9a95db3 100644
--- a/sd/source/ui/func/fuhhconv.cxx
+++ b/sd/source/ui/func/fuhhconv.cxx
@@ -129,7 +129,7 @@ void FuHangulHanjaConversion::StartConversion( sal_Int16 nSourceLanguage, sal_In
     String aString( SdResId(STR_UNDO_HANGULHANJACONVERSION) );
     mpView->BegUndo( aString );
 
-    ViewShellBase* pBase = PTR_CAST(ViewShellBase, SfxViewShell::Current());
+    ViewShellBase* pBase = dynamic_cast<ViewShellBase*>(SfxViewShell::Current());
     if (pBase != NULL)
         mpViewShell = pBase->GetMainViewShell().get();
 
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index f58e35d..319232e 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -714,7 +714,7 @@ void FuInsertAVMedia::DoExecute( SfxRequest& rReq )
 
     if( pReqArgs )
     {
-        const SfxStringItem* pStringItem = PTR_CAST( SfxStringItem, &pReqArgs->Get( rReq.GetSlot() 
) );
+        const SfxStringItem* pStringItem = dynamic_cast<const SfxStringItem*>(&pReqArgs->Get( 
rReq.GetSlot() ) );
 
         if( pStringItem )
         {
diff --git a/sd/source/ui/func/fusearch.cxx b/sd/source/ui/func/fusearch.cxx
index eac7115..a3b34dd 100644
--- a/sd/source/ui/func/fusearch.cxx
+++ b/sd/source/ui/func/fusearch.cxx
@@ -130,7 +130,7 @@ FuSearch::~FuSearch()
 
 void FuSearch::SearchAndReplace( const SvxSearchItem* pSearchItem )
 {
-    ViewShellBase* pBase = PTR_CAST(ViewShellBase, SfxViewShell::Current());
+    ViewShellBase* pBase = dynamic_cast<ViewShellBase*>(SfxViewShell::Current());
     ViewShell* pViewShell = NULL;
     if (pBase != NULL)
         pViewShell = pBase->GetMainViewShell().get();
-- 
1.7.3.4

From 5f7cbe01d95b72262befeebdfce47b8d474861b3 Mon Sep 17 00:00:00 2001
From: Rafael Dominguez <venccsralph@gmail.com>
Date: Sun, 18 Dec 2011 19:09:49 -0430
Subject: [PATCH 26/36] Replace deprecated PTR_CAST macro for dynamic_cast.

---
 sd/source/ui/app/sdmod.cxx   |    6 +++---
 sd/source/ui/app/sdmod1.cxx  |   32 +++++++++++++++-----------------
 sd/source/ui/app/sdmod2.cxx  |    8 ++++----
 sd/source/ui/app/sdpopup.cxx |    3 +--
 sd/source/ui/app/tbxww.cxx   |    2 +-
 5 files changed, 24 insertions(+), 27 deletions(-)

diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index e93177f..767b419 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -130,7 +130,7 @@ SdModule::~SdModule()
     if( pNumberFormatter )
     delete pNumberFormatter;
 
-    ::sd::DrawDocShell* pDocShell = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current());
+    ::sd::DrawDocShell* pDocShell = dynamic_cast<sd::DrawDocShell*>(SfxObjectShell::Current());
     if( pDocShell )
     {
         ::sd::ViewShell* pViewShell = pDocShell->GetViewShell();
@@ -198,7 +198,7 @@ SdOptions* SdModule::GetSdOptions(DocumentType eDocType)
     {
         sal_uInt16 nMetric = pOptions->GetMetric();
 
-        ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current() );
+        ::sd::DrawDocShell* pDocSh = dynamic_cast<sd::DrawDocShell*>(SfxObjectShell::Current() );
         SdDrawDocument* pDoc = NULL;
         if (pDocSh)
             pDoc = pDocSh->GetDoc();
@@ -221,7 +221,7 @@ SdOptions* SdModule::GetSdOptions(DocumentType eDocType)
 SvStorageStreamRef SdModule::GetOptionStream( const String& rOptionName,
                                               SdOptionStreamMode eMode )
 {
-    ::sd::DrawDocShell*     pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current() );
+    ::sd::DrawDocShell*     pDocSh = dynamic_cast<sd::DrawDocShell*>(SfxObjectShell::Current() );
     SvStorageStreamRef  xStm;
 
     if( pDocSh )
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 026ef86..be7835e 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -134,7 +134,7 @@ void SdModule::Execute(SfxRequest& rReq)
             {
                 sal_Bool bOnlineSpelling = ( (const SfxBoolItem*) pItem )->GetValue();
                 // am Dokument sichern:
-                ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, 
SfxObjectShell::Current());
+                ::sd::DrawDocShell* pDocSh = 
dynamic_cast<sd::DrawDocShell*>(SfxObjectShell::Current());
                 if( pDocSh )
                 {
                     SdDrawDocument* pDoc = pDocSh->GetDoc();
@@ -158,7 +158,7 @@ void SdModule::Execute(SfxRequest& rReq)
                     case FUNIT_PICA:
                     case FUNIT_POINT:
                         {
-                            ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, 
SfxObjectShell::Current() );
+                            ::sd::DrawDocShell* pDocSh = 
dynamic_cast<sd::DrawDocShell*>(SfxObjectShell::Current() );
                             if(pDocSh)
                             {
                                 DocumentType eDocType = pDocSh->GetDoc()->GetDocumentType();
@@ -193,7 +193,7 @@ void SdModule::Execute(SfxRequest& rReq)
               )
             {
                 // am Dokument sichern:
-                ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, 
SfxObjectShell::Current());
+                ::sd::DrawDocShell* pDocSh = 
dynamic_cast<sd::DrawDocShell*>(SfxObjectShell::Current());
                 if ( pDocSh )
                 {
                     LanguageType eLanguage = ( (SvxLanguageItem*)pItem )->GetValue();
@@ -231,7 +231,7 @@ void SdModule::Execute(SfxRequest& rReq)
         case SID_OPENDOC:
         {
             sal_Bool bIntercept = sal_False;
-            ::sd::DrawDocShell* pDocShell = PTR_CAST(::sd::DrawDocShell, 
SfxObjectShell::Current());
+            ::sd::DrawDocShell* pDocShell = 
dynamic_cast<sd::DrawDocShell*>(SfxObjectShell::Current());
             if (pDocShell)
             {
                 ::sd::ViewShell* pViewShell = pDocShell->GetViewShell();
@@ -362,7 +362,7 @@ void SdModule::GetState(SfxItemSet& rItemSet)
         }
         else
         {
-            ::sd::DrawDocShell* pDocShell = PTR_CAST(::sd::DrawDocShell, 
SfxObjectShell::Current());
+            ::sd::DrawDocShell* pDocShell = 
dynamic_cast<sd::DrawDocShell*>(SfxObjectShell::Current());
             if (pDocShell)
             {
                 ::sd::ViewShell* pViewShell = pDocShell->GetViewShell();
@@ -379,7 +379,7 @@ void SdModule::GetState(SfxItemSet& rItemSet)
 
     if( SFX_ITEM_AVAILABLE == rItemSet.GetItemState( SID_ATTR_METRIC ) )
     {
-        ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current() );
+        ::sd::DrawDocShell* pDocSh = dynamic_cast<sd::DrawDocShell*>(SfxObjectShell::Current() );
         if(pDocSh)
         {
             DocumentType eDocType = pDocSh->GetDoc()->GetDocumentType();
@@ -407,8 +407,7 @@ void SdModule::GetState(SfxItemSet& rItemSet)
 
     if( SFX_ITEM_AVAILABLE == rItemSet.GetItemState( SID_AUTOSPELL_CHECK ) )
     {
-        ::sd::DrawDocShell* pDocSh =
-              PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current());
+        ::sd::DrawDocShell* pDocSh = dynamic_cast<sd::DrawDocShell*>(SfxObjectShell::Current());
         if( pDocSh )
         {
             SdDrawDocument* pDoc = pDocSh->GetDoc();
@@ -418,28 +417,28 @@ void SdModule::GetState(SfxItemSet& rItemSet)
 
     if( SFX_ITEM_AVAILABLE == rItemSet.GetItemState( SID_ATTR_LANGUAGE ) )
     {
-        ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current());
+        ::sd::DrawDocShell* pDocSh = dynamic_cast<sd::DrawDocShell*>(SfxObjectShell::Current());
         if( pDocSh )
             rItemSet.Put( SvxLanguageItem( pDocSh->GetDoc()->GetLanguage( EE_CHAR_LANGUAGE ), 
SID_ATTR_LANGUAGE ) );
     }
 
     if( SFX_ITEM_AVAILABLE == rItemSet.GetItemState( SID_ATTR_CHAR_CJK_LANGUAGE ) )
     {
-        ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current());
+        ::sd::DrawDocShell* pDocSh = dynamic_cast<sd::DrawDocShell*>(SfxObjectShell::Current());
         if( pDocSh )
             rItemSet.Put( SvxLanguageItem( pDocSh->GetDoc()->GetLanguage( EE_CHAR_LANGUAGE_CJK ), 
SID_ATTR_CHAR_CJK_LANGUAGE ) );
     }
 
     if( SFX_ITEM_AVAILABLE == rItemSet.GetItemState( SID_ATTR_CHAR_CTL_LANGUAGE ) )
     {
-        ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current());
+        ::sd::DrawDocShell* pDocSh = dynamic_cast<sd::DrawDocShell*>(SfxObjectShell::Current());
         if( pDocSh )
             rItemSet.Put( SvxLanguageItem( pDocSh->GetDoc()->GetLanguage( EE_CHAR_LANGUAGE_CTL ), 
SID_ATTR_CHAR_CTL_LANGUAGE ) );
     }
 
     if ( !bOnce )
     {
-        ::sd::DrawDocShell* pDocShell = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current());
+        ::sd::DrawDocShell* pDocShell = dynamic_cast<sd::DrawDocShell*>(SfxObjectShell::Current());
         if( pDocShell ) // Impress or Draw ?
         {
             ::sd::ViewShell* pViewShell = pDocShell->GetViewShell();
@@ -466,7 +465,7 @@ IMPL_LINK( SdModule, EventListenerHdl, VclSimpleEvent*, pEvent )
             {
                 case MEDIA_COMMAND_PLAY:
                 {
-                    ::sd::DrawDocShell* pDocShell = PTR_CAST(::sd::DrawDocShell, 
SfxObjectShell::Current());
+                    ::sd::DrawDocShell* pDocShell = 
dynamic_cast<sd::DrawDocShell*>(SfxObjectShell::Current());
                     if( pDocShell )  // Impress or Draw ?
                     {
                         ::sd::ViewShell* pViewShell = pDocShell->GetViewShell();
@@ -632,7 +631,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq )
                                 aSet.Put( aPassword );
 
                             const SfxPoolItem* pRet = SfxFrame::OpenDocumentSynchron( aSet, 
xTargetFrame );
-                            const SfxViewFrameItem* pFrameItem = PTR_CAST( SfxViewFrameItem, pRet 
);
+                            const SfxViewFrameItem* pFrameItem = dynamic_cast<const 
SfxViewFrameItem*>(pRet);
                             if ( pFrameItem && pFrameItem->GetFrame() )
                                 pFrame = &pFrameItem->GetFrame()->GetFrame();
                         }
@@ -651,7 +650,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq )
                             try
                             {
                                 const SfxPoolItem* pRet = SFX_APP()->ExecuteSlot (aRequest);
-                                const SfxViewFrameItem* pFrameItem = PTR_CAST( SfxViewFrameItem, 
pRet );
+                                const SfxViewFrameItem* pFrameItem = dynamic_cast<const 
SfxViewFrameItem*>(pRet);
                                 if ( pFrameItem )
                                     pFrame = &pFrameItem->GetFrame()->GetFrame();
                             }
@@ -690,8 +689,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq )
 
                         if( pShell && pViewFrame )
                         {
-                            ::sd::DrawDocShell* pDocShell =
-                                  PTR_CAST(::sd::DrawDocShell,pShell);
+                            ::sd::DrawDocShell* pDocShell = 
dynamic_cast<sd::DrawDocShell*>(pShell);
                             SdDrawDocument* pDoc = pDocShell->GetDoc();
 
                             ::sd::ViewShellBase* pBase =
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index bfc8999..c3c4278 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -236,7 +236,7 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo)
             ::sd::ViewShell* pViewSh = pDocShell ? pDocShell->GetViewShell() : NULL;
             if(pViewSh == NULL)
             {
-                ::sd::ViewShellBase* pBase = PTR_CAST(::sd::ViewShellBase, 
SfxViewShell::Current());
+                ::sd::ViewShellBase* pBase = 
dynamic_cast<sd::ViewShellBase*>(SfxViewShell::Current());
                 if(pBase)
                     pViewSh = pBase->GetMainViewShell().get();
             }
@@ -276,7 +276,7 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo)
             ::sd::ViewShell* pViewSh = pDocShell ? pDocShell->GetViewShell() : NULL;
             if(pViewSh == NULL)
             {
-                ::sd::ViewShellBase* pBase = PTR_CAST(::sd::ViewShellBase, 
SfxViewShell::Current());
+                ::sd::ViewShellBase* pBase = 
dynamic_cast<sd::ViewShellBase*>(SfxViewShell::Current());
                 if(pBase)
                     pViewSh = pBase->GetMainViewShell().get();
             }
@@ -421,7 +421,7 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo)
 SfxItemSet*  SdModule::CreateItemSet( sal_uInt16 nSlot )
 {
     ::sd::FrameView* pFrameView = NULL;
-    ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current() );
+    ::sd::DrawDocShell* pDocSh = dynamic_cast<sd::DrawDocShell*>(SfxObjectShell::Current());
     SdDrawDocument* pDoc = NULL;
 
     // Hier wird der DocType vom Optionsdialog gesetzt (nicht Dokument!)
@@ -552,7 +552,7 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet )
     sal_Bool bNewPrintOptions = sal_False;
     sal_Bool bMiscOptions = sal_False;
 
-    ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current() );
+    ::sd::DrawDocShell* pDocSh = dynamic_cast<sd::DrawDocShell*>(SfxObjectShell::Current());
     SdDrawDocument* pDoc = NULL;
     // Hier wird der DocType vom Optionsdialog gesetzt (nicht Dokument!)
     DocumentType eDocType = DOCUMENT_TYPE_IMPRESS;
diff --git a/sd/source/ui/app/sdpopup.cxx b/sd/source/ui/app/sdpopup.cxx
index 7acbe5e..ae646b2 100644
--- a/sd/source/ui/app/sdpopup.cxx
+++ b/sd/source/ui/app/sdpopup.cxx
@@ -284,8 +284,7 @@ SvxFieldData* SdFieldPopup::GetField()
         if( pFileField->GetFormat() != eFormat ||
             pFileField->GetType() != eType )
         {
-            ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell,
-                SfxObjectShell::Current() );
+            ::sd::DrawDocShell* pDocSh = dynamic_cast<sd::DrawDocShell*>(SfxObjectShell::Current() 
);
 
             if( pDocSh )
             {
diff --git a/sd/source/ui/app/tbxww.cxx b/sd/source/ui/app/tbxww.cxx
index ef67cd8..e765225 100644
--- a/sd/source/ui/app/tbxww.cxx
+++ b/sd/source/ui/app/tbxww.cxx
@@ -151,7 +151,7 @@ void SdTbxControl::StateChanged( sal_uInt16 nSId,
 
     if( eState == SFX_ITEM_AVAILABLE )
     {
-        TbxImageItem* pItem = PTR_CAST( TbxImageItem, pState );
+        const TbxImageItem* pItem = dynamic_cast<const TbxImageItem*>(pState );
         // Im StarDesktop kann jetzt auch ein anderes Item ankommen,
         // das nicht ausgewertet werden darf
         if( pItem )
-- 
1.7.3.4

From c1e1b597174d1de46e7ad447c6ea296f901826d7 Mon Sep 17 00:00:00 2001
From: Rafael Dominguez <venccsralph@gmail.com>
Date: Sun, 18 Dec 2011 19:16:29 -0430
Subject: [PATCH 27/36] Replace deprecated PTR_CAST macro for dynamic_cast.

---
 sd/source/ui/dlg/LayerTabBar.cxx            |    2 +-
 sd/source/ui/dlg/SpellDialogChildWindow.cxx |    2 +-
 sd/source/ui/dlg/animobjs.cxx               |    2 +-
 sd/source/ui/dlg/dlgass.cxx                 |   14 +++++++-------
 sd/source/ui/dlg/dlgfield.cxx               |    4 ++--
 sd/source/ui/dlg/docprev.cxx                |    2 +-
 sd/source/ui/dlg/navigatr.cxx               |    8 ++++----
 7 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/sd/source/ui/dlg/LayerTabBar.cxx b/sd/source/ui/dlg/LayerTabBar.cxx
index 0828437..03cdb13 100644
--- a/sd/source/ui/dlg/LayerTabBar.cxx
+++ b/sd/source/ui/dlg/LayerTabBar.cxx
@@ -274,7 +274,7 @@ void LayerTabBar::EndRenaming()
     if( !IsEditModeCanceled() )
     {
         ::sd::View* pView = pDrViewSh->GetView();
-        DrawView* pDrView = PTR_CAST( DrawView, pView );
+        DrawView* pDrView = dynamic_cast<DrawView*>(pView);
 
         SdDrawDocument* pDoc = pView->GetDoc();
         String aLayerName = pView->GetActiveLayer();
diff --git a/sd/source/ui/dlg/SpellDialogChildWindow.cxx 
b/sd/source/ui/dlg/SpellDialogChildWindow.cxx
index b9c4193..e680e4c 100644
--- a/sd/source/ui/dlg/SpellDialogChildWindow.cxx
+++ b/sd/source/ui/dlg/SpellDialogChildWindow.cxx
@@ -160,7 +160,7 @@ void SpellDialogChildWindow::LoseFocus()
 
 void SpellDialogChildWindow::ProvideOutliner (void)
 {
-    ViewShellBase* pViewShellBase = PTR_CAST (ViewShellBase, SfxViewShell::Current());
+    ViewShellBase* pViewShellBase = dynamic_cast<ViewShellBase*>(SfxViewShell::Current());
 
     if (pViewShellBase != NULL)
     {
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 5943f12..60b491d 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -1286,7 +1286,7 @@ void AnimationControllerItem::StateChanged( sal_uInt16 nSId,
 {
     if( eState >= SFX_ITEM_AVAILABLE && nSId == SID_ANIMATOR_STATE )
     {
-        const SfxUInt16Item* pStateItem = PTR_CAST( SfxUInt16Item, pItem );
+        const SfxUInt16Item* pStateItem = dynamic_cast<const SfxUInt16Item*>(pItem);
         DBG_ASSERT( pStateItem, "SfxUInt16Item erwartet");
         sal_uInt16 nState = pStateItem->GetValue();
 
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index 3c0c3e3..79a47c6 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -1043,7 +1043,7 @@ SfxObjectShellLock AssistentDlgImpl::GetDocument()
     UpdatePageList();
 
     SfxObjectShell* pShell = xDocShell;
-    ::sd::DrawDocShell* pDocShell = PTR_CAST(::sd::DrawDocShell,pShell);
+    ::sd::DrawDocShell* pDocShell = dynamic_cast<sd::DrawDocShell*>(pShell);
     SdDrawDocument* pDoc = pDocShell?pDocShell->GetDoc():NULL;
 
     if(pDoc)
@@ -1425,7 +1425,7 @@ void AssistentDlgImpl::UpdateUserData()
     String aInfo  = mpPage4AskInfoEDT->GetText();
 
     SfxObjectShell* pShell = xDocShell;
-    DrawDocShell* pDocShell = PTR_CAST(DrawDocShell,pShell);
+    DrawDocShell* pDocShell = dynamic_cast<DrawDocShell*>(pShell);
     SdDrawDocument* pDoc = pDocShell?pDocShell->GetDoc():NULL;
     SdPage* pPage = pDoc?pDoc->GetSdPage(0, PK_STANDARD):NULL;
 
@@ -1489,7 +1489,7 @@ void AssistentDlgImpl::UpdatePageList()
     maPageListFile = maDocFile;
 
     SfxObjectShell* pShell = xDocShell;
-    DrawDocShell* pDocShell = PTR_CAST(DrawDocShell,pShell);
+    DrawDocShell* pDocShell = dynamic_cast<DrawDocShell*>(pShell);
     SdDrawDocument* pDoc = pDocShell?pDocShell->GetDoc():NULL;
 
     mpPage5PageListCT->Clear();
@@ -1549,7 +1549,7 @@ void AssistentDlgImpl::UpdatePreview( sal_Bool bDocPreview )
         if( aLayoutFile != maLayoutFile )
         {
             SfxObjectShell* pShell = xDocShell;
-            DrawDocShell* pDocShell = PTR_CAST(DrawDocShell,pShell);
+            DrawDocShell* pDocShell = dynamic_cast<DrawDocShell*>(pShell);
             ::svl::IUndoManager* pUndoMgr = pDocShell?pDocShell->GetUndoManager():NULL;
             if(pUndoMgr)
                 pUndoMgr->Undo();
@@ -1590,7 +1590,7 @@ void AssistentDlgImpl::UpdatePreview( sal_Bool bDocPreview )
             aReq.AppendItem( SfxBoolItem( SID_HIDDEN, sal_True ) );
             aReq.AppendItem( SfxBoolItem( SID_PREVIEW, bDocPreview ) );
 
-            const SfxViewFrameItem* pRet = PTR_CAST( SfxViewFrameItem, SFX_APP()->ExecuteSlot( 
aReq ) );
+            const SfxViewFrameItem* pRet = dynamic_cast<const 
SfxViewFrameItem*>(SFX_APP()->ExecuteSlot( aReq ));
 
             if ( pRet && pRet->GetFrame() && pRet->GetFrame()->GetObjectShell() )
                 xDocShell = pRet->GetFrame()->GetObjectShell();
@@ -1630,11 +1630,11 @@ void AssistentDlgImpl::UpdatePreview( sal_Bool bDocPreview )
 
         // die Implementierung ermitteln
         SfxObjectShell* pShell = xDocShell;
-        DrawDocShell* pDocShell = PTR_CAST(DrawDocShell,pShell);
+        DrawDocShell* pDocShell = dynamic_cast<DrawDocShell*>(pShell);
         SdDrawDocument* pDoc = pDocShell?pDocShell->GetDoc():NULL;
 
         pShell = xLayoutDocShell;
-        pDocShell = PTR_CAST(DrawDocShell,pShell);
+        pDocShell = dynamic_cast<DrawDocShell*>(pShell);
         SdDrawDocument* pLayoutDoc = pDocShell?pDocShell->GetDoc():NULL;
 
         if( pDoc && pLayoutDoc )
diff --git a/sd/source/ui/dlg/dlgfield.cxx b/sd/source/ui/dlg/dlgfield.cxx
index 2a8167e..770399d 100644
--- a/sd/source/ui/dlg/dlgfield.cxx
+++ b/sd/source/ui/dlg/dlgfield.cxx
@@ -142,8 +142,8 @@ SvxFieldData* SdModifyFieldDlg::GetField()
 
             eFormat = (SvxFileFormat) ( aLbFormat.GetSelectEntryPos() );
 
-            ::sd::DrawDocShell* pDocSh = PTR_CAST( ::sd::DrawDocShell,
-                                               SfxObjectShell::Current() );
+            ::sd::DrawDocShell* pDocSh =
+                dynamic_cast<sd::DrawDocShell*>(SfxObjectShell::Current());
 
             if( pDocSh )
             {
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx
index 6bb610c..8ac3191 100644
--- a/sd/source/ui/dlg/docprev.cxx
+++ b/sd/source/ui/dlg/docprev.cxx
@@ -201,7 +201,7 @@ long SdDocPreviewWin::Notify( NotifyEvent& rNEvt )
 
 void SdDocPreviewWin::updateViewSettings()
 {
-    ::sd::DrawDocShell* pDocShell = PTR_CAST(::sd::DrawDocShell,mpObj);
+    ::sd::DrawDocShell* pDocShell = dynamic_cast<sd::DrawDocShell*>(mpObj);
     SdDrawDocument* pDoc = pDocShell?pDocShell->GetDoc():NULL;
 
     SvtAccessibilityOptions aAccOptions;
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 84d2237..95e36cd 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -692,11 +692,11 @@ void SdNavigatorWin::RefreshDocumentLB( const String* pDocName )
             maLbDocs.InsertEntry( aStr, 0 );
 
         ::sd::DrawDocShell* pCurrentDocShell =
-              PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current() );
+              dynamic_cast<sd::DrawDocShell*>(SfxObjectShell::Current());
         SfxObjectShell* pSfxDocShell = SfxObjectShell::GetFirst(0, sal_False);
         while( pSfxDocShell )
         {
-            ::sd::DrawDocShell* pDocShell = PTR_CAST(::sd::DrawDocShell, pSfxDocShell );
+            ::sd::DrawDocShell* pDocShell = dynamic_cast<sd::DrawDocShell*>(pSfxDocShell);
             if( pDocShell  && !pDocShell->IsInDestruction() && ( pDocShell->GetCreateMode() != 
SFX_CREATE_MODE_EMBEDDED ) )
             {
                 NavDocInfo aInfo ;
@@ -886,7 +886,7 @@ void SdNavigatorControllerItem::StateChanged( sal_uInt16 nSId,
 {
     if( eState >= SFX_ITEM_AVAILABLE && nSId == SID_NAVIGATOR_STATE )
     {
-        const SfxUInt32Item* pStateItem = PTR_CAST( SfxUInt32Item, pItem );
+        const SfxUInt32Item* pStateItem = dynamic_cast<const SfxUInt32Item*>(pItem);
         DBG_ASSERT( pStateItem, "SfxUInt16Item erwartet");
         sal_uInt32 nState = pStateItem->GetValue();
 
@@ -976,7 +976,7 @@ void SdPageNameControllerItem::StateChanged( sal_uInt16 nSId,
         NavDocInfo* pInfo = pNavigatorWin->GetDocInfo();
         if( pInfo && pInfo->IsActive() )
         {
-            const SfxStringItem* pStateItem = PTR_CAST( SfxStringItem, pItem );
+            const SfxStringItem* pStateItem = dynamic_cast<const SfxStringItem*>(pItem);
             DBG_ASSERT( pStateItem, "SfxStringItem erwartet");
             String aPageName = pStateItem->GetValue();
 
-- 
1.7.3.4

From 01364d7d17c13c0e430a126e23b9cd041f9df093 Mon Sep 17 00:00:00 2001
From: Rafael Dominguez <venccsralph@gmail.com>
Date: Sun, 18 Dec 2011 19:18:20 -0430
Subject: [PATCH 28/36] Replace deprecated PTR_CAST macro for dynamic_cast.

---
 sd/source/ui/docshell/docshell.cxx |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index b9ca044..89debf6 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -358,7 +358,7 @@ void DrawDocShell::InPlaceActivate( sal_Bool bActive )
         {
             // Anzahl FrameViews ermitteln
             pSfxViewSh = pSfxViewFrame->GetViewShell();
-            pViewSh = PTR_CAST( ViewShell, pSfxViewSh );
+            pViewSh = dynamic_cast<ViewShell*>(pSfxViewSh);
 
             if ( pViewSh && pViewSh->GetFrameView() )
             {
@@ -378,7 +378,7 @@ void DrawDocShell::InPlaceActivate( sal_Bool bActive )
         {
             // Anzahl FrameViews ermitteln
             pSfxViewSh = pSfxViewFrame->GetViewShell();
-            pViewSh = PTR_CAST( ViewShell, pSfxViewSh );
+            pViewSh = dynamic_cast<ViewShell*>(pSfxViewSh);
 
             if ( pViewSh )
             {
-- 
1.7.3.4

From cd20a0693544b145bdbcfb0ac10f1e5be443ad33 Mon Sep 17 00:00:00 2001
From: Rafael Dominguez <venccsralph@gmail.com>
Date: Sun, 18 Dec 2011 19:20:24 -0430
Subject: [PATCH 29/36] Replace deprecated PTR_CAST macro for dynamic_cast.

---
 sd/source/core/stlsheet.cxx |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 5a92351..d5c1298 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -561,7 +561,7 @@ void SdStyleSheet::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
     // wenn der Stellvertreter ein Notify bezueglich geaenderter Attribute
     // bekommt, sorgt er dafuer, dass das eigentlich gemeinte StyleSheet
     // broadcastet
-    SfxSimpleHint* pSimple = PTR_CAST(SfxSimpleHint, &rHint);
+    const SfxSimpleHint* pSimple = dynamic_cast<const SfxSimpleHint*>(&rHint);
     sal_uLong nId = pSimple == NULL ? 0 : pSimple->GetId();
     if (nId == SFX_HINT_DATACHANGED && nFamily == SD_STYLE_FAMILY_PSEUDO)
     {
-- 
1.7.3.4

From af7778fd3f0d2f822f14078f950bf272ec05e8d2 Mon Sep 17 00:00:00 2001
From: Rafael Dominguez <venccsralph@gmail.com>
Date: Sun, 18 Dec 2011 19:25:01 -0430
Subject: [PATCH 30/36] Replace deprecated PTR_CAST macro for dynamic_cast.

---
 .../controls/MasterPageContainerProviders.cxx      |    2 +-
 sd/source/ui/unoidl/unolayer.cxx                   |    2 +-
 sd/source/ui/unoidl/unomodel.cxx                   |    8 ++++----
 sd/source/ui/unoidl/unoobj.cxx                     |   14 +++++++-------
 sd/source/ui/unoidl/unopback.cxx                   |    2 +-
 5 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx 
b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx
index 42f2869..2c6300a 100644
--- a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx
@@ -312,7 +312,7 @@ SdPage* TemplatePageObjectProvider::operator() (SdDrawDocument* pContainerDocume
         mxDocumentShell = NULL;
     }
     SfxObjectShell* pShell = mxDocumentShell;
-    return PTR_CAST(::sd::DrawDocShell,pShell);
+    return dynamic_cast<sd::DrawDocShell*>(pShell);
 }
 
 
diff --git a/sd/source/ui/unoidl/unolayer.cxx b/sd/source/ui/unoidl/unolayer.cxx
index 0555c43..7a1275b 100644
--- a/sd/source/ui/unoidl/unolayer.cxx
+++ b/sd/source/ui/unoidl/unolayer.cxx
@@ -736,7 +736,7 @@ void SdLayerManager::UpdateLayerView( sal_Bool modify ) const throw()
     if(mpModel->mpDocShell)
     {
         ::sd::DrawViewShell* pDrViewSh =
-            PTR_CAST(::sd::DrawViewShell, mpModel->mpDocShell->GetViewShell());
+            dynamic_cast<sd::DrawViewShell*>(mpModel->mpDocShell->GetViewShell());
 
         if(pDrViewSh)
         {
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 98763dd..4816dd7 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -159,7 +159,7 @@ SdUnoForbiddenCharsTable::~SdUnoForbiddenCharsTable()
 
 void SdUnoForbiddenCharsTable::Notify( SfxBroadcaster&, const SfxHint& rHint ) throw()
 {
-    const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint );
+    const SdrHint* pSdrHint = dynamic_cast<const SdrHint*>(&rHint);
 
     if( pSdrHint )
     {
@@ -402,7 +402,7 @@ void SdXImpressDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
 {
     if( mpDoc )
     {
-        const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint );
+        const SdrHint* pSdrHint = dynamic_cast<const SdrHint*>(&rHint);
 
         if( pSdrHint )
         {
@@ -423,7 +423,7 @@ void SdXImpressDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
         }
         else
         {
-            const SfxSimpleHint* pSfxHint = PTR_CAST(SfxSimpleHint, &rHint );
+            const SfxSimpleHint* pSfxHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
 
             // ist unser SdDrawDocument gerade gestorben?
             if(pSfxHint && pSfxHint->GetId() == SFX_HINT_DYING)
@@ -1822,7 +1822,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const 
uno::Any& r
 
             if( pOut )
             {
-                vcl::PDFExtOutDevData* pPDFExtOutDevData = PTR_CAST( vcl::PDFExtOutDevData, 
pOut->GetExtOutDevData() );
+                vcl::PDFExtOutDevData* pPDFExtOutDevData = 
dynamic_cast<vcl::PDFExtOutDevData*>(pOut->GetExtOutDevData());
 
                 ::sd::ClientView* pView = new ::sd::ClientView( mpDocShell, pOut, NULL );
                 Rectangle               aVisArea = Rectangle( Point(), mpDoc->GetSdPage( 
(sal_uInt16)nPageNumber - 1, ePageKind )->GetSize() );
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 6bfa698..5022485 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -905,7 +905,7 @@ sal_Bool SdXShape::IsPresObj() const throw()
     SdrObject* pObj = mpShape->GetSdrObject();
     if(pObj)
     {
-        SdPage* pPage = PTR_CAST(SdPage,pObj->GetPage());
+        SdPage* pPage = dynamic_cast<SdPage*>(pObj->GetPage());
         if(pPage)
             return pPage->GetPresObjKind(pObj) != PRESOBJ_NONE;
     }
@@ -948,7 +948,7 @@ OUString SdXShape::GetPlaceholderText() const
     if( pObj == NULL )
         return OUString();
 
-    SdPage* pPage = PTR_CAST(SdPage,pObj->GetPage());
+    SdPage* pPage = dynamic_cast<SdPage*>(pObj->GetPage());
     DBG_ASSERT( pPage, "no page?" );
     if( pPage == NULL )
         return OUString();
@@ -977,10 +977,10 @@ void SdXShape::SetEmptyPresObj( sal_Bool bEmpty ) throw()
 
             // really delete SdrOutlinerObj at pObj
             pObj->NbcSetOutlinerParaObject(0L);
-            if( bVertical && PTR_CAST( SdrTextObj, pObj ) )
+            if( bVertical && dynamic_cast<SdrTextObj*>(pObj) )
                 ((SdrTextObj*)pObj)->SetVerticalWriting( sal_True );
 
-            SdrGrafObj* pGraphicObj = PTR_CAST( SdrGrafObj, pObj );
+            SdrGrafObj* pGraphicObj = dynamic_cast<SdrGrafObj*>(pObj);
             if( pGraphicObj )
             {
                 Graphic aEmpty;
@@ -988,7 +988,7 @@ void SdXShape::SetEmptyPresObj( sal_Bool bEmpty ) throw()
             }
             else
             {
-                SdrOle2Obj* pOleObj = PTR_CAST( SdrOle2Obj, pObj );
+                SdrOle2Obj* pOleObj = dynamic_cast<SdrOle2Obj*>(pObj);
                 if( pOleObj )
                 {
                     pOleObj->SetGraphic( NULL );
@@ -1012,7 +1012,7 @@ void SdXShape::SetEmptyPresObj( sal_Bool bEmpty ) throw()
                 if( pOutliner == NULL )
                     break;
 
-                SdPage* pPage = PTR_CAST(SdPage,pObj->GetPage());
+                SdPage* pPage = dynamic_cast<SdPage*>(pObj->GetPage());
                 DBG_ASSERT( pPage, "no page?" );
                 if( pPage == NULL )
                     break;
@@ -1051,7 +1051,7 @@ void SdXShape::SetMasterDepend( sal_Bool bDepend ) throw()
         {
             if( bDepend )
             {
-                SdPage* pPage = PTR_CAST(SdPage,pObj->GetPage());
+                SdPage* pPage = dynamic_cast<SdPage*>(pObj->GetPage());
                 pObj->SetUserCall( pPage );
             }
             else
diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx
index edd4eaf..7896151 100644
--- a/sd/source/ui/unoidl/unopback.cxx
+++ b/sd/source/ui/unoidl/unopback.cxx
@@ -90,7 +90,7 @@ SdUnoPageBackground::~SdUnoPageBackground() throw()
 
 void SdUnoPageBackground::Notify( SfxBroadcaster&, const SfxHint& rHint )
 {
-    const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint );
+    const SdrHint* pSdrHint = dynamic_cast<const SdrHint*>(&rHint);
 
     if( pSdrHint )
     {
-- 
1.7.3.4

From 178476dd338cc1e90897bb976ac008c3ec008f53 Mon Sep 17 00:00:00 2001
From: Rafael Dominguez <venccsralph@gmail.com>
Date: Sun, 18 Dec 2011 19:27:54 -0430
Subject: [PATCH 31/36] Replace deprecated PTR_CAST macro for dynamic_cast.

---
 sd/source/filter/html/htmlex.cxx |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index 152ad77..10f9fab 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -1404,7 +1404,7 @@ String HtmlExport::TextAttribToHTMLString( SfxItemSet* pSet, HtmlState* 
pState,
         SvxFieldItem* pItem = (SvxFieldItem*)pSet->GetItem( EE_FEATURE_FIELD );
         if(pItem)
         {
-            SvxURLField* pURL = PTR_CAST(SvxURLField, pItem->GetField());
+            const SvxURLField* pURL = dynamic_cast<const SvxURLField*>(pItem->GetField());
             if(pURL)
             {
                 aLink = pURL->GetURL();
-- 
1.7.3.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.