Commits

Anonymous committed df03cae

#i10000#: fix CRLF. Sigh

Comments (0)

Files changed (10)

sd/source/core/anminfo.cxx

 
 void SdAnimationInfo::SetBookmark( const String& rBookmark )
 {
-    if( meClickAction == ::com::sun::star::presentation::ClickAction_BOOKMARK )
-    {
-        String sURL( '#' );
-        sURL += rBookmark;
+    if( meClickAction == ::com::sun::star::presentation::ClickAction_BOOKMARK )
+    {
+        String sURL( '#' );
+        sURL += rBookmark;
         SvxFieldItem aURLItem( SvxURLField( sURL, sURL ), EE_FEATURE_FIELD );
         mrObject.SetMergedItem( aURLItem );
     }

sd/source/core/drawdoc2.cxx

 #include <svx/eeitem.hxx>
 #include <svx/langitem.hxx>
 #include <svtools/itempool.hxx>
-#include <svx/svdpool.hxx>
+#include <svx/svdpool.hxx>
 #include <svx/flditem.hxx>
 
 #include <svx/linkmgr.hxx>
 	}
 }
 
-void SdDrawDocument::UpdatePageRelativeURLs(const String& rOldName, const String& rNewName)
-{
-    if (rNewName.Len() == 0)
-        return;
-
-    SfxItemPool& pPool(GetPool());
-    USHORT nCount = pPool.GetItemCount(EE_FEATURE_FIELD);
-    for (USHORT nOff = 0; nOff < nCount; nOff++)
-    {
-        const SfxPoolItem *pItem = pPool.GetItem(EE_FEATURE_FIELD, nOff);
-        const SvxFieldItem* pFldItem = dynamic_cast< const SvxFieldItem * > (pItem);
-
-        if(pFldItem)
-        {
-            SvxURLField* pURLField = const_cast< SvxURLField* >( dynamic_cast<const SvxURLField*>( pFldItem->GetField() ) );
-
-            if(pURLField)
-            {
-                XubString aURL = pURLField->GetURL();
-
-                if (aURL.Len() && (aURL.GetChar(0) == 35) && (aURL.Search(rOldName, 1) == 1))
-                {
-                    if (aURL.Len() == rOldName.Len() + 1) // standard page name
-                    {
-                        aURL.Erase (1, aURL.Len() - 1);
-                        aURL += rNewName;
-                        pURLField->SetURL(aURL);
-                    }
-                    else
-                    {
-                        const XubString sNotes = SdResId(STR_NOTES);
-                        if (aURL.Len() == rOldName.Len() + 2 + sNotes.Len() && aURL.Search(sNotes, rOldName.Len() + 2) == rOldName.Len() + 2)
-                        {
-                            aURL.Erase (1, aURL.Len() - 1);
-                            aURL += rNewName;
-                            aURL += ' ';
-                            aURL += sNotes;
-                            pURLField->SetURL(aURL);
-                        }
-                    }
-                }
-            }
-        }
-	}
-}
-
-void SdDrawDocument::UpdatePageRelativeURLs(SdPage* pPage, USHORT nPos, sal_Int32 nIncrement)
-{
-    bool bNotes = (pPage->GetPageKind() == PK_NOTES);
-
-    SfxItemPool& pPool(GetPool());
-    USHORT nCount = pPool.GetItemCount(EE_FEATURE_FIELD);
-    for (USHORT nOff = 0; nOff < nCount; nOff++)
-    {
-        const SfxPoolItem *pItem = pPool.GetItem(EE_FEATURE_FIELD, nOff);
-        const SvxFieldItem* pFldItem;
-
-        if ((pFldItem = dynamic_cast< const SvxFieldItem * > (pItem)) != 0)
-        {
-            SvxURLField* pURLField = const_cast< SvxURLField* >( dynamic_cast<const SvxURLField*>( pFldItem->GetField() ) );
-
-            if(pURLField)
-            {
-                XubString aURL = pURLField->GetURL();
-
-                if (aURL.Len() && (aURL.GetChar(0) == 35))
-                {
-                    XubString aHashSlide('#');
-                    aHashSlide += SdResId(STR_PAGE);
-
-                    if (aURL.CompareTo(aHashSlide, aHashSlide.Len()) == COMPARE_EQUAL)
-                    {
-                        XubString aURLCopy = aURL;
-                        const XubString sNotes = SdResId(STR_NOTES);
-
-                        aURLCopy.Erase(0, aHashSlide.Len());
-
-                        bool bNotesLink = (aURLCopy.Len() >= sNotes.Len() + 3 && aURLCopy.Search(sNotes, aURLCopy.Len() - sNotes.Len()) == aURLCopy.Len() - sNotes.Len());
-
-                        if (bNotesLink ^ bNotes)
-                            continue; // no compatible link and page
-
-                        if (bNotes)
-                            aURLCopy.Erase(aURLCopy.Len() - sNotes.Len(), sNotes.Len());
-
-                        sal_Int32 number = aURLCopy.ToInt32();
-                        USHORT realPageNumber = (nPos + 1)/ 2;
-
-                        if ( number >= realPageNumber )
-                        {
-                            // update link page number
-                            number += nIncrement;
-                            aURL.Erase (aHashSlide.Len() + 1, aURL.Len() - aHashSlide.Len() - 1);
-                            aURL += XubString::CreateFromInt32(number);
-                            if (bNotes)
-                            {
-                                aURL += ' ';
-                                aURL += sNotes;
-                            }
-                            pURLField->SetURL(aURL);
-                        }
-                    }
-                }
-            }
-        }
-	}
-}
+void SdDrawDocument::UpdatePageRelativeURLs(const String& rOldName, const String& rNewName)
+{
+    if (rNewName.Len() == 0)
+        return;
+
+    SfxItemPool& pPool(GetPool());
+    USHORT nCount = pPool.GetItemCount(EE_FEATURE_FIELD);
+    for (USHORT nOff = 0; nOff < nCount; nOff++)
+    {
+        const SfxPoolItem *pItem = pPool.GetItem(EE_FEATURE_FIELD, nOff);
+        const SvxFieldItem* pFldItem = dynamic_cast< const SvxFieldItem * > (pItem);
+
+        if(pFldItem)
+        {
+            SvxURLField* pURLField = const_cast< SvxURLField* >( dynamic_cast<const SvxURLField*>( pFldItem->GetField() ) );
+
+            if(pURLField)
+            {
+                XubString aURL = pURLField->GetURL();
+
+                if (aURL.Len() && (aURL.GetChar(0) == 35) && (aURL.Search(rOldName, 1) == 1))
+                {
+                    if (aURL.Len() == rOldName.Len() + 1) // standard page name
+                    {
+                        aURL.Erase (1, aURL.Len() - 1);
+                        aURL += rNewName;
+                        pURLField->SetURL(aURL);
+                    }
+                    else
+                    {
+                        const XubString sNotes = SdResId(STR_NOTES);
+                        if (aURL.Len() == rOldName.Len() + 2 + sNotes.Len() && aURL.Search(sNotes, rOldName.Len() + 2) == rOldName.Len() + 2)
+                        {
+                            aURL.Erase (1, aURL.Len() - 1);
+                            aURL += rNewName;
+                            aURL += ' ';
+                            aURL += sNotes;
+                            pURLField->SetURL(aURL);
+                        }
+                    }
+                }
+            }
+        }
+	}
+}
+
+void SdDrawDocument::UpdatePageRelativeURLs(SdPage* pPage, USHORT nPos, sal_Int32 nIncrement)
+{
+    bool bNotes = (pPage->GetPageKind() == PK_NOTES);
+
+    SfxItemPool& pPool(GetPool());
+    USHORT nCount = pPool.GetItemCount(EE_FEATURE_FIELD);
+    for (USHORT nOff = 0; nOff < nCount; nOff++)
+    {
+        const SfxPoolItem *pItem = pPool.GetItem(EE_FEATURE_FIELD, nOff);
+        const SvxFieldItem* pFldItem;
+
+        if ((pFldItem = dynamic_cast< const SvxFieldItem * > (pItem)) != 0)
+        {
+            SvxURLField* pURLField = const_cast< SvxURLField* >( dynamic_cast<const SvxURLField*>( pFldItem->GetField() ) );
+
+            if(pURLField)
+            {
+                XubString aURL = pURLField->GetURL();
+
+                if (aURL.Len() && (aURL.GetChar(0) == 35))
+                {
+                    XubString aHashSlide('#');
+                    aHashSlide += SdResId(STR_PAGE);
+
+                    if (aURL.CompareTo(aHashSlide, aHashSlide.Len()) == COMPARE_EQUAL)
+                    {
+                        XubString aURLCopy = aURL;
+                        const XubString sNotes = SdResId(STR_NOTES);
+
+                        aURLCopy.Erase(0, aHashSlide.Len());
+
+                        bool bNotesLink = (aURLCopy.Len() >= sNotes.Len() + 3 && aURLCopy.Search(sNotes, aURLCopy.Len() - sNotes.Len()) == aURLCopy.Len() - sNotes.Len());
+
+                        if (bNotesLink ^ bNotes)
+                            continue; // no compatible link and page
+
+                        if (bNotes)
+                            aURLCopy.Erase(aURLCopy.Len() - sNotes.Len(), sNotes.Len());
+
+                        sal_Int32 number = aURLCopy.ToInt32();
+                        USHORT realPageNumber = (nPos + 1)/ 2;
+
+                        if ( number >= realPageNumber )
+                        {
+                            // update link page number
+                            number += nIncrement;
+                            aURL.Erase (aHashSlide.Len() + 1, aURL.Len() - aHashSlide.Len() - 1);
+                            aURL += XubString::CreateFromInt32(number);
+                            if (bNotes)
+                            {
+                                aURL += ' ';
+                                aURL += sNotes;
+                            }
+                            pURLField->SetURL(aURL);
+                        }
+                    }
+                }
+            }
+        }
+	}
+}
 
 /*************************************************************************
 |*
 
 void SdDrawDocument::InsertPage(SdrPage* pPage, USHORT nPos)
 {
-    bool bLast = (nPos == GetPageCount());
+    bool bLast = (nPos == GetPageCount());
 
 	FmFormModel::InsertPage(pPage, nPos);
 
 
 	UpdatePageObjectsInNotes(nPos);
 
-    if (!bLast)
-        UpdatePageRelativeURLs(static_cast<SdPage*>( pPage ), nPos, 1);
+    if (!bLast)
+        UpdatePageRelativeURLs(static_cast<SdPage*>( pPage ), nPos, 1);
 
 }
 
 SdrPage* SdDrawDocument::RemovePage(USHORT nPgNum)
 {
 	SdrPage* pPage = FmFormModel::RemovePage(nPgNum);
-    
-    bool bLast = ((nPgNum+1)/2 == (GetPageCount()+1)/2);
+    
+    bool bLast = ((nPgNum+1)/2 == (GetPageCount()+1)/2);
 
 	((SdPage*)pPage)->DisconnectLink();
 	ReplacePageInCustomShows( dynamic_cast< SdPage* >( pPage ), 0 );
 	UpdatePageObjectsInNotes(nPgNum);
 
-    if (!bLast)
-        UpdatePageRelativeURLs((SdPage*)pPage, nPgNum, -1);
+    if (!bLast)
+        UpdatePageRelativeURLs((SdPage*)pPage, nPgNum, -1);
 
 	return pPage;
 }

sd/source/core/drawdoc4.cxx

 			if (mbHasOnlineSpellErrors)
 			{
 				sd::ModifyGuard aGuard( this );
-				SdrModel* pModel = pObj->GetModel();
-				sal_Bool bLock = sal_False;
-				if ( pModel )
-				{
-					bLock = pModel->isLocked();
-					pModel->setLock( sal_True );
-				}
+				SdrModel* pModel = pObj->GetModel();
+				sal_Bool bLock = sal_False;
+				if ( pModel )
+				{
+					bLock = pModel->isLocked();
+					pModel->setLock( sal_True );
+				}
 				// taking text from the outliner				
 				((SdrTextObj*) pObj)->SetOutlinerParaObject( pOutl->CreateParaObject() );
 
 				pObj->BroadcastObjectChange();
-				if ( pModel )
+				if ( pModel )
 					pModel->setLock( bLock );
 			}
 		}

sd/source/core/sdpage.cxx

 	meKind[2] = static_cast<PresObjKind>(k2 & (~VERTICAL)); mbVertical[2] = (k2 & VERTICAL) == VERTICAL;
 	meKind[3] = static_cast<PresObjKind>(k3 & (~VERTICAL)); mbVertical[3] = (k3 & VERTICAL) == VERTICAL;
 	meKind[4] = static_cast<PresObjKind>(k4 & (~VERTICAL)); mbVertical[4] = (k4 & VERTICAL) == VERTICAL;
-    meKind[5] = static_cast<PresObjKind>(k5 & (~VERTICAL)); mbVertical[5] = (k5 & VERTICAL) == VERTICAL;
+    meKind[5] = static_cast<PresObjKind>(k5 & (~VERTICAL)); mbVertical[5] = (k5 & VERTICAL) == VERTICAL;
 	meKind[6] = static_cast<PresObjKind>(k6 & (~VERTICAL)); mbVertical[6] = (k6	& VERTICAL) == VERTICAL;
 }
 
 		LayoutDescriptor( 9, PRESOBJ_TITLE, PRESOBJ_GRAPHIC, PRESOBJ_OUTLINE|VERTICAL ),	// AUTOLAYOUT_TITLE_VERTICAL_OUTLINE_CLIPART
 		LayoutDescriptor( 0 ),																// AUTOLAYOUT_HANDOUT9
         LayoutDescriptor( 10, PRESOBJ_TEXT, PRESOBJ_NONE ),                                 // AUTOLAYOUT_ONLY_TEXT
-        LayoutDescriptor( 6, PRESOBJ_TITLE, PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC,			    // AUTOLAYOUT_4CLIPART
+        LayoutDescriptor( 6, PRESOBJ_TITLE, PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC,			    // AUTOLAYOUT_4CLIPART
 			PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC ),
-        LayoutDescriptor( 11, PRESOBJ_TITLE, PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC,				// AUTOLAYOUT_6CLIPART
+        LayoutDescriptor( 11, PRESOBJ_TITLE, PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC,				// AUTOLAYOUT_6CLIPART
             PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC, PRESOBJ_GRAPHIC )
 	};
 
 	}
     case 10: // onlytext
     {
-        Size aSize( rRectangle[0].GetSize().Width(), rRectangle[1].BottomLeft().Y() - rRectangle[0].TopLeft().Y() );
-		rRectangle[0].SetSize( aSize );
-		rRectangle[0].SetPos( aTitlePos);
+        Size aSize( rRectangle[0].GetSize().Width(), rRectangle[1].BottomLeft().Y() - rRectangle[0].TopLeft().Y() );
+		rRectangle[0].SetSize( aSize );
+		rRectangle[0].SetPos( aTitlePos);
 		break;
     }
-    case 11: // title, 6 shapes
-	{
-		ULONG nX = long (aLayoutPos.X());
-
-		aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
-		aLayoutSize.Width()  = long (aLayoutSize.Width() * 0.322);
-		rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize);
-
-		aLayoutPos.X() = long (nX + aLayoutSize.Width() * 1.05);
-		rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
-
-		aLayoutPos.X() = long (nX + aLayoutSize.Width() * 2 * 1.05);
-		rRectangle[3] = Rectangle (aLayoutPos, aLayoutSize);
-
-		aLayoutPos.Y() = long (aLayoutPos.Y() + aLayoutSize.Height() * 1.095);
-		rRectangle[4] = Rectangle (aLayoutPos, aLayoutSize);
-
-		aLayoutPos.X() = long (nX + aLayoutSize.Width() * 1.05);
-		rRectangle[5] = Rectangle (aLayoutPos, aLayoutSize);
-
-		aLayoutPos.X() = nX;
-		rRectangle[6] = Rectangle (aLayoutPos, aLayoutSize);
-
-		break;
-    }    
+    case 11: // title, 6 shapes
+	{
+		ULONG nX = long (aLayoutPos.X());
+
+		aLayoutSize.Height() = long (aLayoutSize.Height() * 0.477);
+		aLayoutSize.Width()  = long (aLayoutSize.Width() * 0.322);
+		rRectangle[1] = Rectangle (aLayoutPos, aLayoutSize);
+
+		aLayoutPos.X() = long (nX + aLayoutSize.Width() * 1.05);
+		rRectangle[2] = Rectangle (aLayoutPos, aLayoutSize);
+
+		aLayoutPos.X() = long (nX + aLayoutSize.Width() * 2 * 1.05);
+		rRectangle[3] = Rectangle (aLayoutPos, aLayoutSize);
+
+		aLayoutPos.Y() = long (aLayoutPos.Y() + aLayoutSize.Height() * 1.095);
+		rRectangle[4] = Rectangle (aLayoutPos, aLayoutSize);
+
+		aLayoutPos.X() = long (nX + aLayoutSize.Width() * 1.05);
+		rRectangle[5] = Rectangle (aLayoutPos, aLayoutSize);
+
+		aLayoutPos.X() = nX;
+		rRectangle[6] = Rectangle (aLayoutPos, aLayoutSize);
+
+		break;
+    }    
 
 	}
 }

sd/source/ui/app/res_bmp.src

 {
 	File = "foil24_h.bmp" ;
 };
-Bitmap BMP_FOIL_25
-{
-	File = "foil25.bmp" ;
-};
-Bitmap BMP_FOIL_25_H
-{
-	File = "foil25_h.bmp" ;
+Bitmap BMP_FOIL_25
+{
+	File = "foil25.bmp" ;
 };
-Bitmap BMP_FOIL_26
-{
-	File = "foil26.bmp" ;
-};
-Bitmap BMP_FOIL_26_H
-{
-	File = "foil26_h.bmp" ;
+Bitmap BMP_FOIL_25_H
+{
+	File = "foil25_h.bmp" ;
 };
-Bitmap BMP_FOIL_27
-{
-	File = "foil27.bmp" ;
-};
-Bitmap BMP_FOIL_27_H
-{
-	File = "foil27_h.bmp" ;
+Bitmap BMP_FOIL_26
+{
+	File = "foil26.bmp" ;
+};
+Bitmap BMP_FOIL_26_H
+{
+	File = "foil26_h.bmp" ;
+};
+Bitmap BMP_FOIL_27
+{
+	File = "foil27.bmp" ;
+};
+Bitmap BMP_FOIL_27_H
+{
+	File = "foil27_h.bmp" ;
 };
 Bitmap BMP_FOILH_01
 {

sd/source/ui/app/strings.src

 {
 	Text [ en-US ] = "Title Only" ;
 };
-String STR_AUTOLAYOUT_ONLY_TEXT
-{
-	Text [ en-US ] = "Centered Text" ;
+String STR_AUTOLAYOUT_ONLY_TEXT
+{
+	Text [ en-US ] = "Centered Text" ;
 };
 String STR_AUTOLAYOUT_TITLE
 {
 {
 	Text [ en-US ] = "Title, 4 Objects" ;
 };
-String STR_AUTOLAYOUT_4CLIPART
-{
-	Text [ en-US ] = "Title, 4 Cliparts" ;
+String STR_AUTOLAYOUT_4CLIPART
+{
+	Text [ en-US ] = "Title, 4 Cliparts" ;
 };
 String STR_AL_TITLE_VERT_OUTLINE
 {
 {
 	Text [ en-US ] = "Vertical Title, Vertical Text" ;
 };
-String STR_AUTOLAYOUT_6CLIPART
-{
-	Text [ en-US ] = "Title, 6 Cliparts" ;
-};
+String STR_AUTOLAYOUT_6CLIPART
+{
+	Text [ en-US ] = "Title, 6 Cliparts" ;
+};
 
 String STR_AUTOLAYOUT_HANDOUT1
 {
 	Text [ en-US ] = "Set Background Picture for Slide ..." ;
 };
 
- 
+ 

sd/source/ui/inc/res_bmp.hrc

 #define BMP_COLLAPSE			RID_APP_START+52
 #define BMP_GRAPHIC 			RID_APP_START+53
 
-#define BMP_FOIL_26				RID_APP_START+54
+#define BMP_FOIL_26				RID_APP_START+54
 
 // Bimaps fuer ValueSet im EffekteWindow
 #define BMP_EFFECT_NONE						RID_APP_START+105

sd/source/ui/inc/strings.hrc

 #define STR_AUTOLAYOUT_HANDOUT6 	(RID_APP_START+235)
 #define STR_AUTOLAYOUT_NOTES		(RID_APP_START+236)
 #define STR_AUTOLAYOUT_HANDOUT9		(RID_APP_START+237)
-#define STR_AUTOLAYOUT_ONLY_TEXT	(RID_APP_START+238)
-#define STR_AUTOLAYOUT_4CLIPART    	(RID_APP_START+239)
+#define STR_AUTOLAYOUT_ONLY_TEXT	(RID_APP_START+238)
+#define STR_AUTOLAYOUT_4CLIPART    	(RID_APP_START+239)
 
 #define STR_TRANSFORM				(RID_APP_START+240)
-
-#define STR_AUTOLAYOUT_6CLIPART    	(RID_APP_START+241)
+
+#define STR_AUTOLAYOUT_6CLIPART    	(RID_APP_START+241)
 
 #define STR_EXPORT_HTML_NAME				(RID_APP_START+244)
 #define STR_EXPORT_HTML_FILTER				(RID_APP_START+245)

sd/source/ui/toolpanel/LayoutMenu.cxx

      AUTOLAYOUT_2TEXT},
     {BMP_FOIL_19, BMP_FOIL_19_H, STR_AUTOLAYOUT_ONLY_TITLE, WritingMode_LR_TB,
      AUTOLAYOUT_ONLY_TITLE},
-    {BMP_FOIL_25, BMP_FOIL_25_H, STR_AUTOLAYOUT_ONLY_TEXT, WritingMode_LR_TB,
+    {BMP_FOIL_25, BMP_FOIL_25_H, STR_AUTOLAYOUT_ONLY_TEXT, WritingMode_LR_TB,
      AUTOLAYOUT_ONLY_TEXT},
     {BMP_FOIL_11, BMP_FOIL_11_H, STR_AUTOLAYOUT_OBJ, WritingMode_LR_TB,
      AUTOLAYOUT_OBJ},

sd/source/ui/view/drtxtob1.cxx

 			{
 				pOLV->AdjustDepth( -1 );
 
-                // Ensure bold/italic etc. icon state updates
-				Invalidate();
+                // Ensure bold/italic etc. icon state updates
+				Invalidate();
 				// #96551# trigger preview refresh
 				mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_PREVIEW_STATE, TRUE, FALSE );
 			}
 			{
 				pOLV->AdjustDepth( 1 );
 
-                // Ensure bold/italic etc. icon state updates
-				Invalidate();
+                // Ensure bold/italic etc. icon state updates
+				Invalidate();
 				// #96551# trigger preview refresh
 				mpViewShell->GetViewFrame()->GetBindings().Invalidate( SID_PREVIEW_STATE, TRUE, FALSE );
 			}