LCOV - code coverage report
Current view: top level - sd/source/core - drawdoc4.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 598 696 85.9 %
Date: 2012-08-25 Functions: 25 28 89.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 999 2128 46.9 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : 
      30                 :            : #include <com/sun/star/style/XStyle.hpp>
      31                 :            : #include <com/sun/star/container/XNameAccess.hpp>
      32                 :            : #include <i18npool/mslangid.hxx>
      33                 :            : #include <sfx2/docfile.hxx>
      34                 :            : #include <sfx2/dispatch.hxx>
      35                 :            : #include "Outliner.hxx"
      36                 :            : #include <comphelper/processfactory.hxx>
      37                 :            : #include <editeng/outliner.hxx>
      38                 :            : 
      39                 :            : #include "../ui/inc/DrawDocShell.hxx"
      40                 :            : #include <editeng/eeitem.hxx>
      41                 :            : #include <vcl/svapp.hxx>
      42                 :            : #include <eetext.hxx>
      43                 :            : 
      44                 :            : #include <editeng/akrnitem.hxx>
      45                 :            : 
      46                 :            : #include <svx/svxids.hrc>
      47                 :            : #include <svl/srchitem.hxx>
      48                 :            : #include <editeng/lrspitem.hxx>
      49                 :            : #include <editeng/ulspitem.hxx>
      50                 :            : #include <editeng/lspcitem.hxx>
      51                 :            : #include <editeng/adjitem.hxx>
      52                 :            : #include <svx/dialogs.hrc>
      53                 :            : #include <svx/dialmgr.hxx>                  // SVX_RESSTR
      54                 :            : #include <editeng/bulitem.hxx>
      55                 :            : #include <svx/xtable.hxx>
      56                 :            : #include <svx/sxmsuitm.hxx>
      57                 :            : #include <editeng/borderline.hxx>
      58                 :            : #include <editeng/boxitem.hxx>
      59                 :            : #include <svx/xit.hxx>
      60                 :            : #include <svx/xlineit0.hxx>
      61                 :            : #include <svx/sdshitm.hxx>
      62                 :            : #include <svx/svdotext.hxx>
      63                 :            : #include <svx/xfillit0.hxx>
      64                 :            : #include <svx/sdshcitm.hxx>
      65                 :            : #include <editeng/editstat.hxx>
      66                 :            : #include <editeng/colritem.hxx>
      67                 :            : #include <editeng/fhgtitem.hxx>
      68                 :            : #include <editeng/wghtitem.hxx>
      69                 :            : #include <editeng/postitem.hxx>
      70                 :            : #include <editeng/crsditem.hxx>
      71                 :            : #include <editeng/udlnitem.hxx>
      72                 :            : #include <editeng/cntritem.hxx>
      73                 :            : #include <editeng/emphitem.hxx>
      74                 :            : #include <editeng/fontitem.hxx>
      75                 :            : #include <editeng/shdditem.hxx>
      76                 :            : #include <svx/xbtmpit.hxx>
      77                 :            : #include <svx/xflhtit.hxx>
      78                 :            : #include <svx/xflgrit.hxx>
      79                 :            : #include <svx/xflclit.hxx>
      80                 :            : #include <svx/xlnedcit.hxx>
      81                 :            : #include <svx/xlnstcit.hxx>
      82                 :            : #include <svx/xlnedwit.hxx>
      83                 :            : #include <svx/xlnstwit.hxx>
      84                 :            : #include <svx/xlnedit.hxx>
      85                 :            : #include <editeng/charreliefitem.hxx>
      86                 :            : #include <svx/xlnstit.hxx>
      87                 :            : #include <svx/xlndsit.hxx>
      88                 :            : #include <svx/xlnwtit.hxx>
      89                 :            : #include <svx/xlnclit.hxx>
      90                 :            : #include <svx/svditer.hxx>
      91                 :            : #include <svx/svdogrp.hxx>
      92                 :            : #include <tools/shl.hxx>
      93                 :            : #include <editeng/numitem.hxx>
      94                 :            : #include <editeng/editeng.hxx>
      95                 :            : #include <editeng/unolingu.hxx>
      96                 :            : #include <com/sun/star/linguistic2/XHyphenator.hpp>
      97                 :            : #include <com/sun/star/lang/XMultiServiceFactory.hpp>
      98                 :            : #include <svl/itempool.hxx>
      99                 :            : #include <editeng/outlobj.hxx>
     100                 :            : #include <sfx2/viewfrm.hxx>
     101                 :            : #include <editeng/langitem.hxx>
     102                 :            : #include <editeng/frmdiritem.hxx>
     103                 :            : 
     104                 :            : #include "sdresid.hxx"
     105                 :            : #include "drawdoc.hxx"
     106                 :            : #include "sdpage.hxx"
     107                 :            : #include "glob.hrc"
     108                 :            : #include "glob.hxx"
     109                 :            : #include "stlpool.hxx"
     110                 :            : #include "helpids.h"
     111                 :            : #include "sdiocmpt.hxx"
     112                 :            : #include "shapelist.hxx"
     113                 :            : #include <basegfx/point/b2dpoint.hxx>
     114                 :            : #include <basegfx/polygon/b2dpolygon.hxx>
     115                 :            : #include <svl/itemset.hxx>
     116                 :            : #include "app.hrc"
     117                 :            : 
     118                 :            : using ::rtl::OUString;
     119                 :            : using namespace ::com::sun::star;
     120                 :            : using namespace ::com::sun::star::uno;
     121                 :            : using namespace ::com::sun::star::lang;
     122                 :            : using namespace ::com::sun::star::style;
     123                 :            : using namespace ::com::sun::star::container;
     124                 :            : using namespace ::com::sun::star::linguistic2;
     125                 :            : using namespace ::sd;
     126                 :            : 
     127                 :            : /*************************************************************************
     128                 :            : |*
     129                 :            : |* CreateLayoutTemplates, Layoutvorlagen erzeugen
     130                 :            : |*
     131                 :            : |* Z.Zt. (31.03.95) speichert der StyleSheetPool nur diejenigen Sheets, die
     132                 :            : |* ein ItemSet haben. Damit alle Sheets gespeichert werden, wird die ItemSet-
     133                 :            : |* Erzeugung mit einem GetItemSet-Aufruf erzwungen.
     134                 :            : |* Dies kann entfallen, sobald der Pool auch Sheets ohne ItemSet speichert.
     135                 :            : |*
     136                 :            : \************************************************************************/
     137                 :            : 
     138                 :        157 : void SdDrawDocument::CreateLayoutTemplates()
     139                 :            : {
     140         [ +  - ]:        157 :     SdStyleSheetPool*       pSSPool = (SdStyleSheetPool*)GetStyleSheetPool();
     141                 :        157 :     SfxStyleSheetBase*      pSheet = NULL;
     142         [ +  - ]:        157 :     String                  aHelpFile;
     143 [ +  - ][ +  - ]:        157 :     String                  aStdName = String(SdResId(STR_STANDARD_STYLESHEET_NAME));
     144                 :            : 
     145                 :            :     // ---- Standardvorlage -----------------------------------------------
     146                 :            : 
     147                 :            :     // nicht benutzt, nicht benutzerdefiniert
     148                 :            :     // SB hatte wahrscheinlich Probleme mit SFXSTYLEBIT_AUTO, da dann gar nichts
     149                 :            :     // mehr im Gestalter angezeigt wird. Dieses Problem ist zu 364 j behoben worden
     150                 :            :     // sal_uInt16 nMask = SFXSTYLEBIT_ALL & ~(SFXSTYLEBIT_USED | SFXSTYLEBIT_USERDEF);
     151                 :        157 :     sal_uInt16 nMask = SFXSTYLEBIT_AUTO;
     152                 :            : 
     153         [ +  - ]:        157 :     String aName(aStdName);
     154         [ +  - ]:        157 :     pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
     155         [ +  - ]:        157 :     pSheet->SetHelpId( aHelpFile, HID_STANDARD_STYLESHEET_NAME );
     156         [ +  - ]:        157 :     SfxItemSet& rISet = pSheet->GetItemSet();
     157                 :        157 :     SfxItemPool* pPool = rISet.GetPool();
     158                 :            : 
     159         [ +  - ]:        157 :     String   aNullStr;
     160                 :            : 
     161         [ +  - ]:        157 :     ::basegfx::B2DPolyPolygon aNullPolyPolygon;
     162         [ +  - ]:        157 :     Color    aNullCol(RGB_Color(COL_DEFAULT_SHAPE_STROKE));
     163                 :            : 
     164         [ +  - ]:        157 :     XDash     aNullDash;
     165 [ +  - ][ +  - ]:        157 :     XGradient aNullGrad(aNullCol,RGB_Color(COL_WHITE));
     166                 :        157 :               aNullGrad.SetStartIntens( 100 );
     167                 :        157 :               aNullGrad.SetEndIntens( 100 );
     168         [ +  - ]:        157 :     XHatch    aNullHatch(aNullCol);
     169                 :            : 
     170                 :            :                     // Linienattribute (Extended OutputDevice)
     171 [ +  - ][ +  - ]:        157 :     rISet.Put(XLineStyleItem(XLINE_SOLID));
                 [ +  - ]
     172 [ +  - ][ +  - ]:        157 :     rISet.Put(XLineColorItem(String(), RGB_Color(COL_DEFAULT_SHAPE_STROKE)));
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
     173 [ +  - ][ +  - ]:        157 :     rISet.Put(XLineWidthItem(0));
                 [ +  - ]
     174 [ +  - ][ +  - ]:        157 :     rISet.Put(XLineDashItem(pPool,aNullDash));
                 [ +  - ]
     175 [ +  - ][ +  - ]:        157 :     rISet.Put(XLineStartItem(pPool,aNullPolyPolygon));
                 [ +  - ]
     176 [ +  - ][ +  - ]:        157 :     rISet.Put(XLineEndItem(pPool,aNullPolyPolygon));
                 [ +  - ]
     177 [ +  - ][ +  - ]:        157 :     rISet.Put(XLineStartWidthItem(200));
                 [ +  - ]
     178 [ +  - ][ +  - ]:        157 :     rISet.Put(XLineEndWidthItem(200));
                 [ +  - ]
     179 [ +  - ][ +  - ]:        157 :     rISet.Put(XLineStartCenterItem());
                 [ +  - ]
     180 [ +  - ][ +  - ]:        157 :     rISet.Put(XLineEndCenterItem());
                 [ +  - ]
     181 [ +  - ][ +  - ]:        157 :     rISet.Put(SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_BLOCK));
                 [ +  - ]
     182                 :            : 
     183                 :            :                     // Fuellattribute (Extended OutputDevice)
     184 [ +  - ][ +  - ]:        157 :     rISet.Put(XFillStyleItem(XFILL_SOLID));
                 [ +  - ]
     185 [ +  - ][ +  - ]:        157 :     rISet.Put(XFillColorItem(String(), RGB_Color(COL_DEFAULT_SHAPE_FILLING)));
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
     186                 :            : 
     187 [ +  - ][ +  - ]:        157 :     rISet.Put( XFillGradientItem( aNullGrad) );
                 [ +  - ]
     188 [ +  - ][ +  - ]:        157 :     rISet.Put(XFillHatchItem(pPool,aNullHatch));
                 [ +  - ]
     189                 :        157 :     Size    aNullSize( 32, 32 );
     190                 :        157 :     Color   aNullColor( COL_WHITE );
     191         [ +  - ]:        157 :     Bitmap  aNullBmp( aNullSize, 8 );
     192         [ +  - ]:        157 :     aNullBmp.Erase( aNullColor );
     193 [ +  - ][ +  - ]:        157 :     rISet.Put(XFillBitmapItem(pPool,aNullBmp));
         [ +  - ][ +  - ]
                 [ +  - ]
     194                 :            : 
     195                 :            :                     // Schattenattribute (Drawing Engine)
     196 [ +  - ][ +  - ]:        157 :     rISet.Put(SdrShadowItem(sal_False));
                 [ +  - ]
     197 [ +  - ][ +  - ]:        157 :     rISet.Put(SdrShadowColorItem(aNullStr, RGB_Color(COL_GRAY)));
         [ +  - ][ +  - ]
     198 [ +  - ][ +  - ]:        157 :     rISet.Put(SdrShadowXDistItem(200));         // 3 mm Schattendistanz
                 [ +  - ]
     199 [ +  - ][ +  - ]:        157 :     rISet.Put(SdrShadowYDistItem(200));
                 [ +  - ]
     200                 :            : 
     201 [ +  - ][ +  - ]:        157 :     Font aLatinFont, aCJKFont, aCTLFont;
                 [ +  - ]
     202                 :            : 
     203         [ +  - ]:        157 :     getDefaultFonts( aLatinFont, aCJKFont, aCTLFont );
     204                 :            : 
     205 [ +  - ][ +  - ]:        157 :     SvxFontItem aSvxFontItem( aLatinFont.GetFamily(), aLatinFont.GetName(), aLatinFont.GetStyleName(), aLatinFont.GetPitch(),
     206 [ +  - ][ +  - ]:        314 :                               aLatinFont.GetCharSet(), EE_CHAR_FONTINFO );
         [ +  - ][ +  - ]
     207                 :            : 
     208 [ +  - ][ +  - ]:        157 :     SvxFontItem aSvxFontItemCJK( aCJKFont.GetFamily(), aCJKFont.GetName(), aCJKFont.GetStyleName(), aCJKFont.GetPitch(),
     209 [ +  - ][ +  - ]:        314 :                                  aCJKFont.GetCharSet(), EE_CHAR_FONTINFO_CJK );
         [ +  - ][ +  - ]
     210                 :            : 
     211 [ +  - ][ +  - ]:        157 :     SvxFontItem aSvxFontItemCTL( aCTLFont.GetFamily(), aCTLFont.GetName(), aCTLFont.GetStyleName(), aCTLFont.GetPitch(),
     212 [ +  - ][ +  - ]:        314 :                                  aCTLFont.GetCharSet(), EE_CHAR_FONTINFO_CTL );
         [ +  - ][ +  - ]
     213                 :            : 
     214         [ +  - ]:        157 :     rISet.Put( aSvxFontItem );
     215         [ +  - ]:        157 :     rISet.Put( aSvxFontItemCJK );
     216         [ +  - ]:        157 :     rISet.Put( aSvxFontItemCTL );
     217                 :            : 
     218 [ +  - ][ +  - ]:        157 :     rISet.Put( SvxFontHeightItem( 635, 100, EE_CHAR_FONTHEIGHT ) );     // sj: (i33745) changed default from 24 to 18 pt
                 [ +  - ]
     219 [ +  - ][ +  - ]:        157 :     rISet.Put( SvxFontHeightItem( 635, 100, EE_CHAR_FONTHEIGHT_CJK ) ); // 18 pt
                 [ +  - ]
     220 [ +  - ][ +  - ]:        157 :     rISet.Put( SvxFontHeightItem( convertFontHeightToCTL( 635 ), 100, EE_CHAR_FONTHEIGHT_CTL ) ); // 18 pt
         [ +  - ][ +  - ]
     221                 :            : 
     222 [ +  - ][ +  - ]:        157 :     rISet.Put( SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT ) );
                 [ +  - ]
     223 [ +  - ][ +  - ]:        157 :     rISet.Put( SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CJK ) );
                 [ +  - ]
     224 [ +  - ][ +  - ]:        157 :     rISet.Put( SvxWeightItem( WEIGHT_NORMAL, EE_CHAR_WEIGHT_CTL ) );
                 [ +  - ]
     225                 :            : 
     226 [ +  - ][ +  - ]:        157 :     rISet.Put( SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC ) );
                 [ +  - ]
     227 [ +  - ][ +  - ]:        157 :     rISet.Put( SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CJK ) );
                 [ +  - ]
     228 [ +  - ][ +  - ]:        157 :     rISet.Put( SvxPostureItem( ITALIC_NONE, EE_CHAR_ITALIC_CTL ) );
                 [ +  - ]
     229                 :            : 
     230 [ +  - ][ +  - ]:        157 :     rISet.Put(SvxContourItem(sal_False, EE_CHAR_OUTLINE ));
                 [ +  - ]
     231 [ +  - ][ +  - ]:        157 :     rISet.Put(SvxShadowedItem(sal_False, EE_CHAR_SHADOW ));
                 [ +  - ]
     232 [ +  - ][ +  - ]:        157 :     rISet.Put(SvxUnderlineItem(UNDERLINE_NONE, EE_CHAR_UNDERLINE));
                 [ +  - ]
     233 [ +  - ][ +  - ]:        157 :     rISet.Put(SvxOverlineItem(UNDERLINE_NONE, EE_CHAR_OVERLINE));
                 [ +  - ]
     234 [ +  - ][ +  - ]:        157 :     rISet.Put(SvxCrossedOutItem(STRIKEOUT_NONE, EE_CHAR_STRIKEOUT ));
                 [ +  - ]
     235 [ +  - ][ +  - ]:        157 :     rISet.Put(SvxEmphasisMarkItem(EMPHASISMARK_NONE, EE_CHAR_EMPHASISMARK));
                 [ +  - ]
     236 [ +  - ][ +  - ]:        157 :     rISet.Put(SvxCharReliefItem(RELIEF_NONE, EE_CHAR_RELIEF));
                 [ +  - ]
     237 [ +  - ][ +  - ]:        157 :     rISet.Put(SvxColorItem(Color(COL_AUTO), EE_CHAR_COLOR ));
                 [ +  - ]
     238                 :            : 
     239                 :            :     // Absatzattribute (Edit Engine)
     240 [ +  - ][ +  - ]:        157 :     rISet.Put(SvxLRSpaceItem(EE_PARA_LRSPACE));
                 [ +  - ]
     241 [ +  - ][ +  - ]:        157 :     rISet.Put(SvxULSpaceItem(EE_PARA_ULSPACE));
                 [ +  - ]
     242                 :            : 
     243 [ +  - ][ +  - ]:        157 :     rISet.Put( SdrTextLeftDistItem( 250 ) );    // sj: (i33745) using text frame distances seems to be a better default
                 [ +  - ]
     244 [ +  - ][ +  - ]:        157 :     rISet.Put( SdrTextRightDistItem( 250 ) );
                 [ +  - ]
     245 [ +  - ][ +  - ]:        157 :     rISet.Put( SdrTextUpperDistItem( 125 ) );
                 [ +  - ]
     246 [ +  - ][ +  - ]:        157 :     rISet.Put( SdrTextLowerDistItem( 125 ) );
                 [ +  - ]
     247                 :            : 
     248 [ +  - ][ +  - ]:        157 :     rISet.Put( SvxLineSpacingItem( LINE_SPACE_DEFAULT_HEIGHT, EE_PARA_SBL ) );
                 [ +  - ]
     249                 :            : 
     250                 :            :     // #i16874# enable kerning by default but only for new documents
     251 [ +  - ][ +  - ]:        157 :     rISet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) );
                 [ +  - ]
     252                 :            : 
     253                 :            :     // Bullet
     254                 :            :     // BulletItem und BulletFont fuer Titel und Gliederung
     255         [ +  - ]:        157 :     SvxBulletItem aBulletItem(EE_PARA_BULLET);
     256                 :            :                             // die sind in allen Ebenen identisch
     257                 :        157 :     aBulletItem.SetStyle(BS_BULLET);
     258                 :        157 :     aBulletItem.SetStart(1);
     259                 :        157 :     aBulletItem.SetScale(45);           // in Prozent
     260                 :            : 
     261         [ +  - ]:        157 :     Font aBulletFont( pSSPool->GetBulletFont() );
     262                 :            : 
     263         [ +  - ]:        157 :     aBulletFont.SetSize(Size(0,635));   // sj: (i33745) changed default from 24 to 18 pt
     264                 :            : 
     265         [ +  - ]:        157 :     aBulletItem.SetFont(aBulletFont);
     266                 :        157 :     aBulletItem.SetSymbol( 0x25CF );                    // Punkt
     267         [ +  - ]:        157 :     rISet.Put(aBulletItem);
     268                 :            : 
     269                 :            :     // Neues BulletItem
     270         [ +  - ]:        157 :     pSSPool->PutNumBulletItem( pSheet, aBulletFont );
     271                 :            : 
     272                 :        157 :     SfxItemSet* pISet = NULL;
     273                 :            : 
     274                 :            :     // ---- Objekt mit Pfeilspitze ----------------------------------------
     275                 :            : 
     276 [ +  - ][ +  - ]:        157 :     aName = String(SdResId(STR_POOLSHEET_OBJWITHARROW));
         [ +  - ][ +  - ]
     277         [ +  - ]:        157 :     pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
     278         [ +  - ]:        157 :     pSheet->SetParent(aStdName);
     279         [ +  - ]:        157 :     pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OBJWITHARROW );
     280         [ +  - ]:        157 :     pISet = &pSheet->GetItemSet();
     281                 :            : 
     282 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineStyleItem(XLINE_SOLID));
                 [ +  - ]
     283 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineColorItem(String(), RGB_Color(COL_BLACK)));
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
     284 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineWidthItem(150));
                 [ +  - ]
     285                 :            : 
     286         [ +  - ]:        157 :     ::basegfx::B2DPolygon aArrow;
     287         [ +  - ]:        157 :     aArrow.append(::basegfx::B2DPoint(10.0, 0.0));
     288         [ +  - ]:        157 :     aArrow.append(::basegfx::B2DPoint(0.0, 30.0));
     289         [ +  - ]:        157 :     aArrow.append(::basegfx::B2DPoint(20.0, 30.0));
     290         [ +  - ]:        157 :     aArrow.setClosed(true);
     291 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineStartItem(SVX_RESSTR(RID_SVXSTR_ARROW),::basegfx::B2DPolyPolygon(aArrow)));
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
                 [ +  - ]
     292                 :            : 
     293 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineStartWidthItem(700));
                 [ +  - ]
     294 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineEndWidthItem(300));
                 [ +  - ]
     295 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineStartCenterItem(sal_True));
                 [ +  - ]
     296                 :            : 
     297                 :            :     // ---- Objekt mit Schatten -------------------------------------------
     298                 :            : 
     299 [ +  - ][ +  - ]:        157 :     aName = String(SdResId(STR_POOLSHEET_OBJWITHSHADOW));
         [ +  - ][ +  - ]
     300         [ +  - ]:        157 :     pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
     301         [ +  - ]:        157 :     pSheet->SetParent(aStdName);
     302         [ +  - ]:        157 :     pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OBJWITHSHADOW );
     303         [ +  - ]:        157 :     pISet = &pSheet->GetItemSet();
     304                 :            : 
     305 [ +  - ][ +  - ]:        157 :     pISet->Put(SdrShadowItem(sal_True));
                 [ +  - ]
     306 [ +  - ][ +  - ]:        157 :     pISet->Put(SdrShadowColorItem(aNullStr, RGB_Color(COL_GRAY)));
         [ +  - ][ +  - ]
     307 [ +  - ][ +  - ]:        157 :     pISet->Put(SdrShadowXDistItem(200));        // 3 mm Schattendistanz
                 [ +  - ]
     308 [ +  - ][ +  - ]:        157 :     pISet->Put(SdrShadowYDistItem(200));
                 [ +  - ]
     309                 :            : 
     310                 :            :     // ---- Objekt ohne F�llung -------------------------------------------
     311                 :            : 
     312 [ +  - ][ +  - ]:        157 :     aName = String(SdResId(STR_POOLSHEET_OBJWITHOUTFILL));
         [ +  - ][ +  - ]
     313         [ +  - ]:        157 :     pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
     314         [ +  - ]:        157 :     pSheet->SetParent(aStdName);
     315         [ +  - ]:        157 :     pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_OBJWITHOUTFILL );
     316         [ +  - ]:        157 :     pISet = &pSheet->GetItemSet();
     317                 :            : 
     318 [ +  - ][ +  - ]:        157 :     pISet->Put(XFillStyleItem(XFILL_NONE));
                 [ +  - ]
     319 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineColorItem(String(), RGB_Color(COL_BLACK)));
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
     320                 :            : 
     321                 :            :     // ---- Text ----------------------------------------------------------
     322                 :            : 
     323 [ +  - ][ +  - ]:        157 :     aName = String(SdResId(STR_POOLSHEET_TEXT));
         [ +  - ][ +  - ]
     324         [ +  - ]:        157 :     pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
     325         [ +  - ]:        157 :     pSheet->SetParent(aStdName);
     326         [ +  - ]:        157 :     pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TEXT );
     327         [ +  - ]:        157 :     pISet = &pSheet->GetItemSet();
     328                 :            : 
     329 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineStyleItem(XLINE_NONE));
                 [ +  - ]
     330 [ +  - ][ +  - ]:        157 :     pISet->Put(XFillStyleItem(XFILL_NONE));
                 [ +  - ]
     331                 :            : 
     332                 :            :     // ---- Textk�rper ----------------------------------------------------
     333                 :            : 
     334 [ +  - ][ +  - ]:        157 :     aName = String(SdResId(STR_POOLSHEET_TEXTBODY));
         [ +  - ][ +  - ]
     335         [ +  - ]:        157 :     pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
     336         [ +  - ]:        157 :     pSheet->SetParent(aStdName);
     337         [ +  - ]:        157 :     pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TEXTBODY );
     338         [ +  - ]:        157 :     pISet = &pSheet->GetItemSet();
     339                 :            : 
     340 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineStyleItem(XLINE_NONE));
                 [ +  - ]
     341 [ +  - ][ +  - ]:        157 :     pISet->Put(XFillStyleItem(XFILL_NONE));
                 [ +  - ]
     342                 :            : 
     343 [ +  - ][ +  - ]:        157 :     pISet->Put(SvxFontHeightItem(564, 100, EE_CHAR_FONTHEIGHT));        // 16 pt
                 [ +  - ]
     344                 :            : 
     345                 :            :     // ---- Textk�rper mit Blocksatz --------------------------------------
     346                 :            : 
     347 [ +  - ][ +  - ]:        157 :     aName = String(SdResId(STR_POOLSHEET_TEXTBODY_JUSTIFY));
         [ +  - ][ +  - ]
     348         [ +  - ]:        157 :     pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
     349         [ +  - ]:        157 :     pSheet->SetParent(aStdName);
     350         [ +  - ]:        157 :     pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TEXTBODY_JUSTIFY );
     351         [ +  - ]:        157 :     pISet = &pSheet->GetItemSet();
     352                 :            : 
     353 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineStyleItem(XLINE_NONE));
                 [ +  - ]
     354 [ +  - ][ +  - ]:        157 :     pISet->Put(XFillStyleItem(XFILL_NONE));
                 [ +  - ]
     355                 :            : 
     356 [ +  - ][ +  - ]:        157 :     pISet->Put(SvxAdjustItem(SVX_ADJUST_BLOCK, EE_PARA_JUST ));
                 [ +  - ]
     357                 :            : 
     358                 :            :     // ---- Textkoerper mit Einzug -----------------------------------------
     359                 :            : 
     360 [ +  - ][ +  - ]:        157 :     aName = String(SdResId(STR_POOLSHEET_TEXTBODY_INDENT));
         [ +  - ][ +  - ]
     361         [ +  - ]:        157 :     pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
     362         [ +  - ]:        157 :     pSheet->SetParent(aStdName);
     363         [ +  - ]:        157 :     pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TEXTBODY_INDENT );
     364         [ +  - ]:        157 :     pISet = &pSheet->GetItemSet();
     365                 :            : 
     366 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineStyleItem(XLINE_NONE));
                 [ +  - ]
     367 [ +  - ][ +  - ]:        157 :     pISet->Put(XFillStyleItem(XFILL_NONE));
                 [ +  - ]
     368                 :            : 
     369         [ +  - ]:        157 :     SvxLRSpaceItem aLRSpaceItem( EE_PARA_LRSPACE );
     370         [ +  - ]:        157 :     aLRSpaceItem.SetTxtFirstLineOfst(600);      // Erstzeileneinzug 6mm, rechts 0
     371         [ +  - ]:        157 :     pISet->Put(aLRSpaceItem);
     372                 :            : 
     373                 :            :     // ---- Titel ---------------------------------------------------------
     374                 :            : 
     375 [ +  - ][ +  - ]:        157 :     aName = String(SdResId(STR_POOLSHEET_TITLE));
         [ +  - ][ +  - ]
     376         [ +  - ]:        157 :     pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
     377         [ +  - ]:        157 :     pSheet->SetParent(aStdName);
     378         [ +  - ]:        157 :     pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TITLE );
     379         [ +  - ]:        157 :     pISet = &pSheet->GetItemSet();
     380                 :            : 
     381 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineStyleItem(XLINE_NONE));
                 [ +  - ]
     382 [ +  - ][ +  - ]:        157 :     pISet->Put(XFillStyleItem(XFILL_NONE));
                 [ +  - ]
     383                 :            : 
     384 [ +  - ][ +  - ]:        157 :     pISet->Put(SvxFontHeightItem(1551, 100, EE_CHAR_FONTHEIGHT ));      // 44 pt
                 [ +  - ]
     385                 :            : 
     386                 :            :     // ---- Titel1 --------------------------------------------------------
     387                 :            : 
     388 [ +  - ][ +  - ]:        157 :     aName = String(SdResId(STR_POOLSHEET_TITLE1));
         [ +  - ][ +  - ]
     389         [ +  - ]:        157 :     pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
     390         [ +  - ]:        157 :     pSheet->SetParent(aStdName);
     391         [ +  - ]:        157 :     pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TITLE1 );
     392         [ +  - ]:        157 :     pISet = &pSheet->GetItemSet();
     393                 :            : 
     394 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineStyleItem(XLINE_NONE));
                 [ +  - ]
     395 [ +  - ][ +  - ]:        157 :     pISet->Put(XFillStyleItem(XFILL_SOLID));
                 [ +  - ]
     396 [ +  - ][ +  - ]:        157 :     pISet->Put(XFillColorItem(String(), RGB_Color(COL_CYAN)));
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
     397                 :            : 
     398 [ +  - ][ +  - ]:        157 :     pISet->Put(SdrShadowItem(sal_True));
                 [ +  - ]
     399 [ +  - ][ +  - ]:        157 :     pISet->Put(SdrShadowColorItem(aNullStr, RGB_Color(COL_GRAY)));
         [ +  - ][ +  - ]
     400 [ +  - ][ +  - ]:        157 :     pISet->Put(SdrShadowXDistItem(200));        // 2 mm Schattendistanz
                 [ +  - ]
     401 [ +  - ][ +  - ]:        157 :     pISet->Put(SdrShadowYDistItem(200));
                 [ +  - ]
     402                 :            : 
     403 [ +  - ][ +  - ]:        157 :     pISet->Put(SvxFontHeightItem(846, 100, EE_CHAR_FONTHEIGHT ));       // 24 pt
                 [ +  - ]
     404                 :            : 
     405 [ +  - ][ +  - ]:        157 :     pISet->Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST ));
                 [ +  - ]
     406                 :            : 
     407                 :            :     // ---- Titel2 --------------------------------------------------------
     408                 :            : 
     409 [ +  - ][ +  - ]:        157 :     aName = String(SdResId(STR_POOLSHEET_TITLE2));
         [ +  - ][ +  - ]
     410         [ +  - ]:        157 :     pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
     411         [ +  - ]:        157 :     pSheet->SetParent(aStdName);
     412         [ +  - ]:        157 :     pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_TITLE2 );
     413         [ +  - ]:        157 :     pISet = &pSheet->GetItemSet();
     414                 :            : 
     415 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineWidthItem(50));
                 [ +  - ]
     416                 :            : 
     417                 :            :     // Farbe nicht aus der Farbtabelle holen, denn da kann diese Farbe
     418                 :            :     // geloescht oder veraendert sein
     419                 :        157 :     Color aOrange4(255, 204, 153);
     420 [ +  - ][ +  - ]:        157 :     pISet->Put(XFillColorItem(String(), aOrange4));
         [ +  - ][ +  - ]
                 [ +  - ]
     421                 :            : 
     422 [ +  - ][ +  - ]:        157 :     pISet->Put(SdrShadowItem(sal_True));
                 [ +  - ]
     423 [ +  - ][ +  - ]:        157 :     pISet->Put(SdrShadowColorItem(aNullStr, RGB_Color(COL_GRAY)));
         [ +  - ][ +  - ]
     424 [ +  - ][ +  - ]:        157 :     pISet->Put(SdrShadowXDistItem(200));        // 2 mm Schattendistanz
                 [ +  - ]
     425 [ +  - ][ +  - ]:        157 :     pISet->Put(SdrShadowYDistItem(200));
                 [ +  - ]
     426                 :            : 
     427 [ +  - ][ +  - ]:        157 :     pISet->Put(SvxFontHeightItem(1270, 100, EE_CHAR_FONTHEIGHT ));      // 36 pt
                 [ +  - ]
     428                 :            : 
     429         [ +  - ]:        157 :     SvxLRSpaceItem aLRSpItem( 200, 200, 0, 0, EE_PARA_LRSPACE);
     430         [ +  - ]:        157 :     pISet->Put( aLRSpItem );    // Erstzeileneinzug 0 mm, links und rechts 2 mm
     431                 :            : 
     432 [ +  - ][ +  - ]:        157 :     pISet->Put(SvxULSpaceItem(100, 100, EE_PARA_ULSPACE ));      // Absatzrand oben/unten 1 mm
                 [ +  - ]
     433                 :            : 
     434 [ +  - ][ +  - ]:        157 :     pISet->Put(SvxAdjustItem(SVX_ADJUST_CENTER, EE_PARA_JUST ));
                 [ +  - ]
     435                 :            : 
     436                 :            :     // ---- Ueberschrift ---------------------------------------------------
     437                 :            : 
     438 [ +  - ][ +  - ]:        157 :     aName = String(SdResId(STR_POOLSHEET_HEADLINE));
         [ +  - ][ +  - ]
     439         [ +  - ]:        157 :     pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
     440         [ +  - ]:        157 :     pSheet->SetParent(aStdName);
     441         [ +  - ]:        157 :     pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_HEADLINE );
     442         [ +  - ]:        157 :     pISet = &pSheet->GetItemSet();
     443                 :            : 
     444 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineStyleItem(XLINE_NONE));
                 [ +  - ]
     445 [ +  - ][ +  - ]:        157 :     pISet->Put(XFillStyleItem(XFILL_NONE));
                 [ +  - ]
     446                 :            : 
     447 [ +  - ][ +  - ]:        157 :     pISet->Put(SvxFontHeightItem(846, 100, EE_CHAR_FONTHEIGHT ));        // 24 pt
                 [ +  - ]
     448                 :            : 
     449 [ +  - ][ +  - ]:        157 :     pISet->Put(SvxULSpaceItem(420, 210, EE_PARA_ULSPACE ));      // Absatzrand oben 4,2 mm,
                 [ +  - ]
     450                 :            :                                                 // unten 2,1 mm
     451                 :            : 
     452                 :            :     // ---- Ueberschrift1 --------------------------------------------------
     453                 :            : 
     454 [ +  - ][ +  - ]:        157 :     aName = String(SdResId(STR_POOLSHEET_HEADLINE1));
         [ +  - ][ +  - ]
     455         [ +  - ]:        157 :     pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
     456         [ +  - ]:        157 :     pSheet->SetParent(aStdName);
     457         [ +  - ]:        157 :     pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_HEADLINE1 );
     458         [ +  - ]:        157 :     pISet = &pSheet->GetItemSet();
     459                 :            : 
     460 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineStyleItem(XLINE_NONE));
                 [ +  - ]
     461 [ +  - ][ +  - ]:        157 :     pISet->Put(XFillStyleItem(XFILL_NONE));
                 [ +  - ]
     462                 :            : 
     463 [ +  - ][ +  - ]:        157 :     pISet->Put(SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT ));
                 [ +  - ]
     464                 :            : 
     465 [ +  - ][ +  - ]:        157 :     pISet->Put(SvxFontHeightItem(635, 100, EE_CHAR_FONTHEIGHT ));       // 18 pt
                 [ +  - ]
     466                 :            : 
     467 [ +  - ][ +  - ]:        157 :     pISet->Put(SvxULSpaceItem(420, 210, EE_PARA_ULSPACE ));      // Absatzrand oben 4,2 mm,
                 [ +  - ]
     468                 :            :                                                 // unten 2,1 mm
     469                 :            : 
     470                 :            :     // ---- Ueberschrift2 --------------------------------------------------
     471                 :            : 
     472 [ +  - ][ +  - ]:        157 :     aName = String(SdResId(STR_POOLSHEET_HEADLINE2));
         [ +  - ][ +  - ]
     473         [ +  - ]:        157 :     pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
     474         [ +  - ]:        157 :     pSheet->SetParent(aStdName);
     475         [ +  - ]:        157 :     pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_HEADLINE2 );
     476         [ +  - ]:        157 :     pISet = &pSheet->GetItemSet();
     477                 :            : 
     478 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineStyleItem(XLINE_NONE));
                 [ +  - ]
     479 [ +  - ][ +  - ]:        157 :     pISet->Put(XFillStyleItem(XFILL_NONE));
                 [ +  - ]
     480                 :            : 
     481 [ +  - ][ +  - ]:        157 :     pISet->Put(SvxPostureItem(ITALIC_NORMAL, EE_CHAR_ITALIC ));
                 [ +  - ]
     482 [ +  - ][ +  - ]:        157 :     pISet->Put(SvxWeightItem(WEIGHT_BOLD, EE_CHAR_WEIGHT));
                 [ +  - ]
     483                 :            : 
     484 [ +  - ][ +  - ]:        157 :     pISet->Put(SvxFontHeightItem(494, 100, EE_CHAR_FONTHEIGHT ));        // 14 pt
                 [ +  - ]
     485                 :            : 
     486 [ +  - ][ +  - ]:        157 :     pISet->Put(SvxULSpaceItem(420, 210, EE_PARA_ULSPACE ));      // Absatzrand oben 4,2 mm,
                 [ +  - ]
     487                 :            :                                                 // unten 2,1 mm
     488                 :            : 
     489                 :            :     // ---- Bemassung --------------------------------------------------
     490                 :            : 
     491 [ +  - ][ +  - ]:        157 :     aName = String(SdResId(STR_POOLSHEET_MEASURE));
         [ +  - ][ +  - ]
     492         [ +  - ]:        157 :     pSheet = &(pSSPool->Make(aName, SD_STYLE_FAMILY_GRAPHICS, nMask));
     493         [ +  - ]:        157 :     pSheet->SetParent(aStdName);
     494         [ +  - ]:        157 :     pSheet->SetHelpId( aHelpFile, HID_POOLSHEET_MEASURE );
     495         [ +  - ]:        157 :     pISet = &pSheet->GetItemSet();
     496                 :            : 
     497 [ +  - ][ +  - ]:        157 :     pISet->Put(XFillStyleItem(XFILL_NONE));
                 [ +  - ]
     498 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineColorItem(String(), RGB_Color(COL_BLACK)));
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
     499                 :            : 
     500 [ +  - ][ +  - ]:        157 :     pISet->Put(SvxFontHeightItem(423, 100, EE_CHAR_FONTHEIGHT ));         // 12 pt
                 [ +  - ]
     501                 :            : 
     502 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineStartItem(SVX_RESSTR(RID_SVXSTR_ARROW),::basegfx::B2DPolyPolygon(aArrow)));
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
                 [ +  - ]
     503 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineStartWidthItem(200));
                 [ +  - ]
     504 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineEndItem(SVX_RESSTR(RID_SVXSTR_ARROW),::basegfx::B2DPolyPolygon(aArrow)));
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
                 [ +  - ]
     505 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineEndWidthItem(200));
                 [ +  - ]
     506 [ +  - ][ +  - ]:        157 :     pISet->Put(XLineStyleItem(XLINE_SOLID));
                 [ +  - ]
     507 [ +  - ][ +  - ]:        157 :     pISet->Put(SdrMeasureShowUnitItem(true));
                 [ +  - ]
     508                 :            : 
     509                 :            :     // Praesentationsvorlagen fuer das Standardlayout erzeugen
     510 [ +  - ][ +  - ]:        157 :     String aPrefix = String(SdResId(STR_LAYOUT_DEFAULT_NAME));
     511 [ +  - ][ +  - ]:        157 :     pSSPool->CreateLayoutStyleSheets(aPrefix);
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
                 [ +  - ]
     512                 :        157 : }
     513                 :            : 
     514                 :       5181 : static Any implMakeSolidCellStyle( SdStyleSheetPool* pSSPool, const OUString& rName, const OUString rParent, const Color& rColor )
     515                 :            : {
     516         [ +  - ]:       5181 :     SfxStyleSheetBase* pSheet = &(pSSPool->Make(rName, SD_STYLE_FAMILY_CELL, SFXSTYLEBIT_AUTO));
     517         [ +  - ]:       5181 :     pSheet->SetParent(rParent);
     518                 :       5181 :     SfxItemSet* pISet = &pSheet->GetItemSet();
     519         [ +  - ]:       5181 :     pISet->Put(XFillStyleItem(XFILL_SOLID));
     520 [ +  - ][ +  - ]:       5181 :     pISet->Put(XFillColorItem(String(), rColor));
                 [ +  - ]
     521                 :            : 
     522         [ +  - ]:       5181 :     return Any( Reference< XStyle >( static_cast< XWeak* >( pSheet ), UNO_QUERY ) );
     523                 :            : }
     524                 :            : 
     525                 :       1727 : static void implCreateTableTemplate( const Reference< XNameContainer >& xTableFamily, const OUString& rName, const Any& rBody, const Any& rHeading, const Any& rBanding )
     526                 :            : {
     527         [ +  - ]:       1727 :     if( xTableFamily.is() ) try
     528                 :            :     {
     529 [ +  - ][ +  - ]:       1727 :         if( !xTableFamily->hasByName( OUString( rName ) ) )
                 [ +  - ]
     530                 :            :         {
     531         [ +  - ]:       1727 :             Reference< XSingleServiceFactory > xFactory( xTableFamily, UNO_QUERY_THROW );
     532 [ +  - ][ +  - ]:       1727 :             Reference< XNameReplace > xDefaultTableStyle( xFactory->createInstance(), UNO_QUERY_THROW );
                 [ +  - ]
     533 [ +  - ][ +  - ]:       1727 :             xTableFamily->insertByName( OUString( rName ), Any( xDefaultTableStyle ) );
                 [ +  - ]
     534                 :            : 
     535 [ +  - ][ +  - ]:       1727 :             xDefaultTableStyle->replaceByName( "body", rBody  );
     536 [ +  - ][ +  - ]:       1727 :             xDefaultTableStyle->replaceByName( "odd-rows" , rBanding );
     537 [ +  - ][ +  - ]:       1727 :             xDefaultTableStyle->replaceByName( "odd-columns" , rBanding );
     538 [ +  - ][ +  - ]:       1727 :             xDefaultTableStyle->replaceByName( "first-row" , rHeading );
     539 [ +  - ][ +  - ]:       1727 :             xDefaultTableStyle->replaceByName( "first-column" , rHeading );
     540 [ +  - ][ +  - ]:       1727 :             xDefaultTableStyle->replaceByName( "last-row" , rHeading );
     541 [ +  - ][ #  # ]:       1727 :             xDefaultTableStyle->replaceByName( "last-column" , rHeading );
                 [ +  - ]
     542                 :            :         }
     543                 :            :     }
     544                 :          0 :     catch( Exception& )
     545                 :            :     {
     546                 :            :         OSL_FAIL("sd::implCreateTableTemplate(), exception caught!");
     547                 :            :     }
     548                 :       1727 : }
     549                 :            : 
     550                 :        157 : void SdDrawDocument::CreateDefaultCellStyles()
     551                 :            : {
     552         [ +  - ]:        157 :     SdStyleSheetPool*       pSSPool = static_cast< SdStyleSheetPool* >(GetStyleSheetPool());
     553                 :        157 :     SfxStyleSheetBase*      pSheet = NULL;
     554         [ +  - ]:        157 :     String                  aHelpFile;
     555                 :            : 
     556 [ +  - ][ +  - ]:        157 :     Reference< XNameContainer > xTableFamily( pSSPool->getByName( "table" ), UNO_QUERY );
     557                 :            : 
     558                 :            :     // ---- Default -----------------------------------------------
     559                 :            : 
     560                 :        157 :     sal_uInt16 nMask = SFXSTYLEBIT_AUTO;
     561                 :            : 
     562                 :        157 :     OUString aDefaultCellStyleName( "default" );
     563                 :            : 
     564 [ +  - ][ +  - ]:        157 :     pSheet = &(pSSPool->Make(aDefaultCellStyleName, SD_STYLE_FAMILY_CELL, nMask));
                 [ +  - ]
     565         [ +  - ]:        157 :     pSheet->SetHelpId( aHelpFile, HID_SD_CELL_STYLE_DEFAULT );
     566         [ +  - ]:        157 :     SfxItemSet& rISet = pSheet->GetItemSet();
     567                 :            : 
     568         [ +  - ]:        157 :     String   aNullStr;
     569                 :            : 
     570         [ +  - ]:        157 :     Color    aNullCol(RGB_Color(COL_BLACK));
     571                 :            : 
     572         [ +  - ]:        157 :     XDash     aNullDash;
     573 [ +  - ][ +  - ]:        157 :     XGradient aNullGrad(aNullCol,RGB_Color(COL_WHITE));
     574                 :        157 :               aNullGrad.SetStartIntens( 100 );
     575                 :        157 :               aNullGrad.SetEndIntens( 100 );
     576         [ +  - ]:        157 :     XHatch    aNullHatch(aNullCol);
     577                 :            : 
     578 [ +  - ][ +  - ]:        157 :     rISet.Put(XFillStyleItem(XFILL_SOLID));
                 [ +  - ]
     579 [ +  - ][ +  - ]:        157 :     rISet.Put(XFillColorItem(String(), RGB_Color(0x00ccccff)));
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
     580                 :            : 
     581 [ +  - ][ +  - ]:        157 :     Font aLatinFont, aCJKFont, aCTLFont;
                 [ +  - ]
     582                 :            : 
     583         [ +  - ]:        157 :     getDefaultFonts( aLatinFont, aCJKFont, aCTLFont );
     584                 :            : 
     585 [ +  - ][ +  - ]:        157 :     SvxFontItem aSvxFontItem( aLatinFont.GetFamily(), aLatinFont.GetName(), aLatinFont.GetStyleName(), aLatinFont.GetPitch(),
     586 [ +  - ][ +  - ]:        314 :                               aLatinFont.GetCharSet(), EE_CHAR_FONTINFO );
         [ +  - ][ +  - ]
     587                 :            : 
     588 [ +  - ][ +  - ]:        157 :     SvxFontItem aSvxFontItemCJK( aCJKFont.GetFamily(), aCJKFont.GetName(), aCJKFont.GetStyleName(), aCJKFont.GetPitch(),
     589 [ +  - ][ +  - ]:        314 :                                  aCJKFont.GetCharSet(), EE_CHAR_FONTINFO_CJK );
         [ +  - ][ +  - ]
     590                 :            : 
     591 [ +  - ][ +  - ]:        157 :     SvxFontItem aSvxFontItemCTL( aCTLFont.GetFamily(), aCTLFont.GetName(), aCTLFont.GetStyleName(), aCTLFont.GetPitch(),
     592 [ +  - ][ +  - ]:        314 :                                  aCTLFont.GetCharSet(), EE_CHAR_FONTINFO_CTL );
         [ +  - ][ +  - ]
     593                 :            : 
     594         [ +  - ]:        157 :     rISet.Put( aSvxFontItem );
     595         [ +  - ]:        157 :     rISet.Put( aSvxFontItemCJK );
     596         [ +  - ]:        157 :     rISet.Put( aSvxFontItemCTL );
     597                 :            : 
     598 [ +  - ][ +  - ]:        157 :     rISet.Put( SvxFontHeightItem( 635, 100, EE_CHAR_FONTHEIGHT ) );     // sj: (i33745) changed default from 24 to 18 pt
                 [ +  - ]
     599 [ +  - ][ +  - ]:        157 :     rISet.Put( SvxFontHeightItem( 635, 100, EE_CHAR_FONTHEIGHT_CJK ) ); // 18 pt
                 [ +  - ]
     600 [ +  - ][ +  - ]:        157 :     rISet.Put( SvxFontHeightItem( convertFontHeightToCTL( 635 ), 100, EE_CHAR_FONTHEIGHT_CTL ) ); // 18 pt
         [ +  - ][ +  - ]
     601                 :            : 
     602 [ +  - ][ +  - ]:        157 :     rISet.Put(SvxColorItem(Color(COL_AUTO), EE_CHAR_COLOR ));
                 [ +  - ]
     603                 :            : 
     604                 :            :     // Absatzattribute (Edit Engine)
     605 [ +  - ][ +  - ]:        157 :     rISet.Put(SvxLRSpaceItem(EE_PARA_LRSPACE));
                 [ +  - ]
     606 [ +  - ][ +  - ]:        157 :     rISet.Put(SvxULSpaceItem(EE_PARA_ULSPACE));
                 [ +  - ]
     607                 :            : 
     608 [ +  - ][ +  - ]:        157 :     rISet.Put( SdrTextLeftDistItem( 250 ) );
                 [ +  - ]
     609 [ +  - ][ +  - ]:        157 :     rISet.Put( SdrTextRightDistItem( 250 ) );
                 [ +  - ]
     610 [ +  - ][ +  - ]:        157 :     rISet.Put( SdrTextUpperDistItem( 130 ) );
                 [ +  - ]
     611 [ +  - ][ +  - ]:        157 :     rISet.Put( SdrTextLowerDistItem( 130 ) );
                 [ +  - ]
     612                 :            : 
     613 [ +  - ][ +  - ]:        157 :     rISet.Put( SvxLineSpacingItem( LINE_SPACE_DEFAULT_HEIGHT, EE_PARA_SBL ) );
                 [ +  - ]
     614 [ +  - ][ +  - ]:        157 :     rISet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) );
                 [ +  - ]
     615 [ +  - ][ +  - ]:        157 :     rISet.Put( SdrTextVertAdjustItem(SDRTEXTVERTADJUST_TOP) );
                 [ +  - ]
     616 [ +  - ][ +  - ]:        157 :     rISet.Put( SdrTextHorzAdjustItem(SDRTEXTHORZADJUST_LEFT) );
                 [ +  - ]
     617                 :            : 
     618                 :        157 :     Color aWhite( COL_WHITE );
     619                 :            :     ::editeng::SvxBorderLine aBorderLine(
     620         [ +  - ]:        157 :             &aWhite, 1, table::BorderLineStyle::SOLID);
     621                 :            : 
     622         [ +  - ]:        157 :     SvxBoxItem aBoxItem( SDRATTR_TABLE_BORDER );
     623         [ +  - ]:        157 :     aBoxItem.SetLine( &aBorderLine, BOX_LINE_TOP );
     624         [ +  - ]:        157 :     aBoxItem.SetLine( &aBorderLine, BOX_LINE_BOTTOM );
     625         [ +  - ]:        157 :     aBoxItem.SetLine( &aBorderLine, BOX_LINE_LEFT );
     626         [ +  - ]:        157 :     aBoxItem.SetLine( &aBorderLine, BOX_LINE_RIGHT );
     627                 :            : 
     628         [ +  - ]:        157 :     rISet.Put( aBoxItem );
     629                 :            : 
     630 [ +  - ][ +  - ]:        157 :     Any aDefaultCellStyle( Reference< XStyle >( static_cast< XWeak* >( pSheet ), UNO_QUERY ) );
     631                 :            : 
     632                 :            :     // ---- default --------------------------------------------------
     633                 :            : 
     634         [ +  - ]:        157 :     Any aGray1( implMakeSolidCellStyle( pSSPool, "gray1" , aDefaultCellStyleName, RGB_COLORDATA(230,230,230)));
     635         [ +  - ]:        157 :     Any aGray2( implMakeSolidCellStyle( pSSPool, "gray2" , aDefaultCellStyleName, RGB_COLORDATA(204,204,204)));
     636         [ +  - ]:        157 :     Any aGray3( implMakeSolidCellStyle( pSSPool, "gray3" , aDefaultCellStyleName, RGB_COLORDATA(179,179,179)));
     637                 :            : 
     638         [ +  - ]:        157 :     implCreateTableTemplate( xTableFamily, "default" , aGray1, aGray3, aGray2 );
     639                 :            : 
     640                 :            :     // ---- BW ------------------------------------------------
     641                 :            : 
     642         [ +  - ]:        157 :     Any aBW1( implMakeSolidCellStyle( pSSPool, "bw1" , aDefaultCellStyleName, RGB_COLORDATA(255,255,255)));
     643         [ +  - ]:        157 :     Any aBW2( implMakeSolidCellStyle( pSSPool, "bw2" , aDefaultCellStyleName, RGB_COLORDATA(230,230,230)));
     644         [ +  - ]:        157 :     Any aBW3( implMakeSolidCellStyle( pSSPool, "bw3" , aDefaultCellStyleName, RGB_COLORDATA(0,0,0)));
     645                 :            : 
     646         [ +  - ]:        157 :     implCreateTableTemplate( xTableFamily, "bw" , aBW1, aBW3, aBW2 );
     647                 :            : 
     648                 :            :     // ---- Orange --------------------------------------------------
     649                 :            : 
     650         [ +  - ]:        157 :     Any aOrange1( implMakeSolidCellStyle( pSSPool, "orange1" , aDefaultCellStyleName, RGB_COLORDATA(255,204,153)));
     651         [ +  - ]:        157 :     Any aOrange2( implMakeSolidCellStyle( pSSPool, "orange2" , aDefaultCellStyleName, RGB_COLORDATA(255,153,102)));
     652         [ +  - ]:        157 :     Any aOrange3( implMakeSolidCellStyle( pSSPool, "orange3" , aDefaultCellStyleName, RGB_COLORDATA(255,102,51)));
     653                 :            : 
     654         [ +  - ]:        157 :     implCreateTableTemplate( xTableFamily, "orange" , aOrange1, aOrange3, aOrange2 );
     655                 :            : 
     656                 :            :     // ---- Turquise --------------------------------------------------
     657                 :            : 
     658         [ +  - ]:        157 :     Any aTurquise1( implMakeSolidCellStyle( pSSPool, "turquise1" , aDefaultCellStyleName, RGB_COLORDATA(71,184,184)));
     659         [ +  - ]:        157 :     Any aTurquise2( implMakeSolidCellStyle( pSSPool, "turquise2" , aDefaultCellStyleName, RGB_COLORDATA(51,163,163)));
     660         [ +  - ]:        157 :     Any aTurquise3( implMakeSolidCellStyle( pSSPool, "turquise3" , aDefaultCellStyleName, RGB_COLORDATA(25,138,138)));
     661                 :            : 
     662         [ +  - ]:        157 :     implCreateTableTemplate( xTableFamily, "turquise" , aTurquise1, aTurquise3, aTurquise2 );
     663                 :            : 
     664                 :            :     // ---- Gray ------------------------------------------------
     665                 :            : 
     666         [ +  - ]:        157 :     Any aBlue1( implMakeSolidCellStyle( pSSPool, "blue1" , aDefaultCellStyleName, RGB_COLORDATA(153,204,255)));
     667         [ +  - ]:        157 :     Any aBlue2( implMakeSolidCellStyle( pSSPool, "blue2" , aDefaultCellStyleName, RGB_COLORDATA(0,153,255)));
     668         [ +  - ]:        157 :     Any aBlue3( implMakeSolidCellStyle( pSSPool, "blue3" , aDefaultCellStyleName, RGB_COLORDATA(0,102,204)));
     669                 :            : 
     670         [ +  - ]:        157 :     implCreateTableTemplate( xTableFamily, "blue" , aBlue1, aBlue3, aBlue2 );
     671                 :            : 
     672                 :            :     // ---- Sun ------------------------------------------------
     673                 :            : 
     674         [ +  - ]:        157 :     Any aSun1( implMakeSolidCellStyle( pSSPool, "sun1" , aDefaultCellStyleName, RGB_COLORDATA(230,230,255)));
     675         [ +  - ]:        157 :     Any aSun2( implMakeSolidCellStyle( pSSPool, "sun2" , aDefaultCellStyleName, RGB_COLORDATA(204,204,255)));
     676         [ +  - ]:        157 :     Any aSun3( implMakeSolidCellStyle( pSSPool, "sun3" , aDefaultCellStyleName, RGB_COLORDATA(153,153,255)));
     677                 :            : 
     678         [ +  - ]:        157 :     implCreateTableTemplate( xTableFamily, "sun" , aSun1, aSun3, aSun2 );
     679                 :            : 
     680                 :            :     // ---- Earth ----------------------------------------------
     681                 :            : 
     682         [ +  - ]:        157 :     Any aEarth1( implMakeSolidCellStyle( pSSPool, "earth1" , aDefaultCellStyleName, RGB_COLORDATA(255,255,204)));
     683         [ +  - ]:        157 :     Any aEarth2( implMakeSolidCellStyle( pSSPool, "earth2" , aDefaultCellStyleName, RGB_COLORDATA(255,204,153)));
     684         [ +  - ]:        157 :     Any aEarth3( implMakeSolidCellStyle( pSSPool, "earth3" , aDefaultCellStyleName, RGB_COLORDATA(204,102,51)));
     685                 :            : 
     686         [ +  - ]:        157 :     implCreateTableTemplate( xTableFamily, "earth" , aEarth1, aEarth3, aEarth2 );
     687                 :            : 
     688                 :            :     // ---- Green ----------------------------------------------
     689                 :            : 
     690         [ +  - ]:        157 :     Any aGreen1( implMakeSolidCellStyle( pSSPool, "green1" , aDefaultCellStyleName, RGB_COLORDATA(255,255,204)));
     691         [ +  - ]:        157 :     Any aGreen2( implMakeSolidCellStyle( pSSPool, "green2" , aDefaultCellStyleName, RGB_COLORDATA(148,189,94)));
     692         [ +  - ]:        157 :     Any aGreen3( implMakeSolidCellStyle( pSSPool, "green3" , aDefaultCellStyleName, RGB_COLORDATA(92,133,38)));
     693                 :            : 
     694         [ +  - ]:        157 :     implCreateTableTemplate( xTableFamily, "green" , aGreen1, aGreen3, aGreen2 );
     695                 :            : 
     696                 :            :     // ---- Seetang ----------------------------------------------
     697                 :            : 
     698         [ +  - ]:        157 :     Any aSeetang1( implMakeSolidCellStyle( pSSPool, "seetang1" , aDefaultCellStyleName, RGB_COLORDATA(204,255,255)));
     699         [ +  - ]:        157 :     Any aSeetang2( implMakeSolidCellStyle( pSSPool, "seetang2" , aDefaultCellStyleName, RGB_COLORDATA(71,184,184)));
     700         [ +  - ]:        157 :     Any aSeetang3( implMakeSolidCellStyle( pSSPool, "seetang3" , aDefaultCellStyleName, RGB_COLORDATA(51,163,163)));
     701                 :            : 
     702         [ +  - ]:        157 :     implCreateTableTemplate( xTableFamily, "seetang" , aSeetang1, aSeetang3, aSeetang2 );
     703                 :            : 
     704                 :            :     // ---- LightBlue ----------------------------------------------
     705                 :            : 
     706         [ +  - ]:        157 :     Any aLightBlue1( implMakeSolidCellStyle( pSSPool, "lightblue1" , aDefaultCellStyleName, RGB_COLORDATA(255,255,255)));
     707         [ +  - ]:        157 :     Any aLightBlue2( implMakeSolidCellStyle( pSSPool, "lightblue2" , aDefaultCellStyleName, RGB_COLORDATA(230,230,255)));
     708         [ +  - ]:        157 :     Any aLightBlue3( implMakeSolidCellStyle( pSSPool, "lightblue3" , aDefaultCellStyleName, RGB_COLORDATA(153,153,204)));
     709                 :            : 
     710         [ +  - ]:        157 :     implCreateTableTemplate( xTableFamily, "lightblue" , aLightBlue1, aLightBlue3, aLightBlue2 );
     711                 :            : 
     712                 :            :     // ---- Yellow ----------------------------------------------
     713                 :            : 
     714         [ +  - ]:        157 :     Any aYellow1( implMakeSolidCellStyle( pSSPool, "yellow1" , aDefaultCellStyleName, RGB_COLORDATA(255,255,204)));
     715         [ +  - ]:        157 :     Any aYellow2( implMakeSolidCellStyle( pSSPool, "yellow2" , aDefaultCellStyleName, RGB_COLORDATA(255,255,153)));
     716         [ +  - ]:        157 :     Any aYellow3( implMakeSolidCellStyle( pSSPool, "yellow3" , aDefaultCellStyleName, RGB_COLORDATA(255,204,153)));
     717                 :            : 
     718 [ +  - ][ +  - ]:        157 :     implCreateTableTemplate( xTableFamily, "yellow" , aYellow1, aYellow3, aYellow2 );
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
     719                 :        157 : }
     720                 :            : 
     721                 :            : /*************************************************************************
     722                 :            : |*
     723                 :            : |* Anzahl der Seiten, die eine masterPage referenzieren
     724                 :            : |*
     725                 :            : \************************************************************************/
     726                 :            : 
     727                 :          2 : sal_uInt16 SdDrawDocument::GetMasterPageUserCount(SdrPage* pMaster) const
     728                 :            : {
     729                 :          2 :     sal_uInt16 nResult = 0;
     730                 :            :     sal_uInt16 nPage;
     731                 :          2 :     sal_uInt16 nPageCount = GetPageCount();
     732                 :            : 
     733         [ +  + ]:          8 :     for (nPage = 0; nPage < nPageCount; nPage++)
     734                 :            :     {
     735                 :          6 :         const SdrPage* pPage = GetPage(nPage);
     736                 :            : 
     737         [ +  - ]:          6 :         if(pPage->TRG_HasMasterPage())
     738                 :            :         {
     739         [ -  + ]:          6 :             if(&(pPage->TRG_GetMasterPage()) == pMaster)
     740                 :            :             {
     741                 :          0 :                 nResult++;
     742                 :            :             }
     743                 :            :         }
     744                 :            :     }
     745                 :          2 :     return nResult;
     746                 :            : }
     747                 :            : 
     748                 :            : 
     749                 :            : /*************************************************************************
     750                 :            : |*
     751                 :            : |* OnlineSpelling im Hintergrund beenden
     752                 :            : |*
     753                 :            : \************************************************************************/
     754                 :            : 
     755                 :        688 : void SdDrawDocument::StopOnlineSpelling()
     756                 :            : {
     757 [ +  + ][ +  + ]:        688 :     if (mpOnlineSpellingTimer && mpOnlineSpellingTimer->IsActive())
                 [ +  + ]
     758                 :            :     {
     759                 :        319 :         mpOnlineSpellingTimer->Stop();
     760                 :            :     }
     761                 :            : 
     762         [ +  + ]:        688 :     delete mpOnlineSpellingTimer;
     763                 :        688 :     mpOnlineSpellingTimer = NULL;
     764                 :            : 
     765         [ +  + ]:        688 :     delete mpOnlineSpellingList;
     766                 :        688 :     mpOnlineSpellingList = NULL;
     767                 :        688 : }
     768                 :            : 
     769                 :            : /*************************************************************************
     770                 :            : |*
     771                 :            : |* OnlineSpelling im Hintergrund starten
     772                 :            : |*
     773                 :            : \************************************************************************/
     774                 :            : 
     775                 :        416 : void SdDrawDocument::StartOnlineSpelling(sal_Bool bForceSpelling)
     776                 :            : {
     777 [ +  - ][ +  + ]:        832 :     if (mbOnlineSpell && (bForceSpelling || mbInitialOnlineSpellingEnabled) &&
                 [ +  - ]
           [ +  -  +  - ]
                 [ +  - ]
     778                 :        416 :         mpDocSh && !mpDocSh->IsReadOnly() )
     779                 :            :     {
     780         [ +  - ]:        416 :         StopOnlineSpelling();
     781                 :            : 
     782         [ +  - ]:        416 :         ::sd::Outliner* pOutl = GetInternalOutliner(sal_True);
     783                 :            : 
     784         [ +  - ]:        416 :         Reference< XSpellChecker1 > xSpellChecker( LinguMgr::GetSpellChecker() );
     785         [ +  - ]:        416 :         if ( xSpellChecker.is() )
     786         [ +  - ]:        416 :             pOutl->SetSpeller( xSpellChecker );
     787                 :            : 
     788         [ +  - ]:        416 :         Reference< XHyphenator > xHyphenator( LinguMgr::GetHyphenator() );
     789         [ +  - ]:        416 :         if( xHyphenator.is() )
     790         [ +  - ]:        416 :             pOutl->SetHyphenator( xHyphenator );
     791                 :            : 
     792         [ +  - ]:        416 :         pOutl->SetDefaultLanguage( meLanguage );
     793                 :            : 
     794 [ +  - ][ +  - ]:        416 :         mpOnlineSpellingList = new ShapeList;
     795                 :            :         sal_uInt16 nPage;
     796                 :            : 
     797 [ +  - ][ +  + ]:       1298 :         for ( nPage = 0; nPage < GetPageCount(); nPage++ )
     798                 :            :         {
     799                 :            :             // Alle Pages durchsuchen
     800 [ +  - ][ +  - ]:        882 :             FillOnlineSpellingList((SdPage*) GetPage(nPage));
     801                 :            :         }
     802                 :            : 
     803 [ +  - ][ +  + ]:       1298 :         for (nPage = 0; nPage < GetMasterPageCount(); nPage++)
     804                 :            :         {
     805                 :            :             // Alle MasterPages durchsuchen
     806 [ +  - ][ +  - ]:        882 :             FillOnlineSpellingList((SdPage*) GetMasterPage(nPage));
     807                 :            :         }
     808                 :            : 
     809         [ +  - ]:        416 :         mpOnlineSpellingList->seekShape(0);
     810 [ +  - ][ +  - ]:        416 :         mpOnlineSpellingTimer = new Timer();
     811         [ +  - ]:        416 :         mpOnlineSpellingTimer->SetTimeoutHdl( LINK(this, SdDrawDocument, OnlineSpellingHdl) );
     812         [ +  - ]:        416 :         mpOnlineSpellingTimer->SetTimeout(250);
     813         [ +  - ]:        416 :         mpOnlineSpellingTimer->Start();
     814                 :            :     }
     815                 :        416 : }
     816                 :            : 
     817                 :            : /*************************************************************************
     818                 :            : |*
     819                 :            : |* OnlineSpelling-Liste fuellen
     820                 :            : |*
     821                 :            : \************************************************************************/
     822                 :            : 
     823                 :       1764 : void SdDrawDocument::FillOnlineSpellingList(SdPage* pPage)
     824                 :            : {
     825                 :       1764 :     SdrObject* pObj = NULL;
     826         [ +  - ]:       1764 :     SdrObjListIter aIter(*pPage, IM_FLAT);
     827                 :            : 
     828         [ +  + ]:       4150 :     while (aIter.IsMore())
     829                 :            :     {
     830         [ +  - ]:       2386 :         pObj = aIter.Next();
     831                 :            : 
     832         [ -  + ]:       2386 :         if( !pObj )
     833                 :          0 :             continue;
     834                 :            : 
     835 [ +  - ][ +  + ]:       2386 :         if (pObj->GetOutlinerParaObject())
     836                 :            :         {
     837                 :            :             // Textobjekt gefunden
     838         [ +  - ]:       1600 :             mpOnlineSpellingList->addShape(*pObj);
     839                 :            :         }
     840 [ +  - ][ -  + ]:        786 :         else if (pObj->GetObjIdentifier() == OBJ_GRUP)
     841                 :            :         {
     842                 :            :             // Gruppenobjekt gefunden
     843         [ #  # ]:          0 :             SdrObjListIter aGroupIter(*((SdrObjGroup*)pObj)->GetSubList(),
     844         [ #  # ]:          0 :                                       IM_DEEPNOGROUPS);
     845                 :            : 
     846                 :          0 :             sal_Bool bSubTextObjFound = sal_False;
     847                 :            : 
     848 [ #  # ][ #  # ]:          0 :             while (aGroupIter.IsMore() && !bSubTextObjFound)
                 [ #  # ]
     849                 :            :             {
     850 [ #  # ][ #  # ]:          0 :                 if (aGroupIter.Next()->GetOutlinerParaObject())
                 [ #  # ]
     851                 :            :                 {
     852                 :            :                     // Textobjekt im Gruppenobjekt gefunden
     853                 :          0 :                     bSubTextObjFound = sal_True;
     854                 :            :                 }
     855                 :            :             }
     856                 :            : 
     857         [ #  # ]:          0 :             if (bSubTextObjFound)
     858                 :            :             {
     859         [ #  # ]:          0 :                 mpOnlineSpellingList->addShape(*pObj);
     860                 :          0 :             }
     861                 :            :         }
     862                 :       1764 :     }
     863                 :       1764 : }
     864                 :            : 
     865                 :            : /*************************************************************************
     866                 :            : |*
     867                 :            : |* OnlineSpelling im Hintergrund
     868                 :            : |*
     869                 :            : \************************************************************************/
     870                 :            : 
     871                 :        306 : IMPL_LINK_NOARG(SdDrawDocument, OnlineSpellingHdl)
     872                 :            : {
     873         [ +  - ]:        612 :     if (mpOnlineSpellingList!=NULL
           [ +  -  +  + ]
                 [ +  + ]
     874                 :        306 :         && ( !mbOnlineSpell || mpOnlineSpellingList->hasMore()))
     875                 :            :     {
     876                 :            :         /**********************************************************************
     877                 :            :         * Naechstes Objekt spellen
     878                 :            :         **********************************************************************/
     879                 :        209 :         SdrObject* pObj = mpOnlineSpellingList->getNextShape();
     880                 :            : 
     881         [ +  - ]:        209 :         if (pObj)
     882                 :            :         {
     883 [ +  - ][ +  - ]:        209 :             if (pObj->GetOutlinerParaObject() && pObj->ISA(SdrTextObj))
                 [ +  - ]
     884                 :            :             {
     885                 :            :                 // Textobjekt spellen
     886                 :        209 :                 SpellObject((SdrTextObj*) pObj);
     887                 :            :             }
     888         [ #  # ]:          0 :             else if (pObj->GetObjIdentifier() == OBJ_GRUP)
     889                 :            :             {
     890                 :            :                 // Gruppenobjekt gefunden
     891         [ #  # ]:          0 :                 SdrObjListIter aGroupIter(*((SdrObjGroup*)pObj)->GetSubList(),
     892         [ #  # ]:          0 :                                           IM_DEEPNOGROUPS);
     893                 :            : 
     894                 :          0 :                 SdrObject* pSubObj = NULL;
     895                 :            : 
     896         [ #  # ]:          0 :                 while (aGroupIter.IsMore())
     897                 :            :                 {
     898         [ #  # ]:          0 :                     pSubObj = aGroupIter.Next();
     899                 :            : 
     900 [ #  # ][ #  # ]:          0 :                     if (pSubObj->GetOutlinerParaObject() && pSubObj->ISA(SdrTextObj))
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
     901                 :            :                     {
     902                 :            :                         // Textobjekt im Gruppenobjekt gefunden
     903         [ #  # ]:          0 :                         SpellObject((SdrTextObj*) pSubObj);
     904                 :            :                     }
     905                 :          0 :                 }
     906                 :            :             }
     907                 :            :         }
     908                 :            : 
     909                 :            :         // Weitersuchen
     910                 :        209 :         mpOnlineSpellingTimer->Start();
     911                 :            :     }
     912                 :            :     else
     913                 :            :     {
     914                 :            :         // Spelling wurde initial durchgefuehrt
     915                 :         97 :         mbInitialOnlineSpellingEnabled = sal_False;
     916                 :            : 
     917                 :            :         // Suche beenden
     918                 :         97 :         StopOnlineSpelling();
     919                 :            : 
     920         [ -  + ]:         97 :         delete mpOnlineSearchItem;
     921                 :         97 :         mpOnlineSearchItem = NULL;
     922                 :            :     }
     923                 :            : 
     924                 :        306 :     return(0);
     925                 :            : }
     926                 :            : 
     927                 :            : /*************************************************************************
     928                 :            : |*
     929                 :            : |* Objekt spellen (fuer OnlineSpelling)
     930                 :            : |*
     931                 :            : \************************************************************************/
     932                 :            : 
     933                 :        209 : void SdDrawDocument::SpellObject(SdrTextObj* pObj)
     934                 :            : {
     935 [ +  - ][ +  - ]:        209 :     if (pObj && pObj->GetOutlinerParaObject() /* && pObj != pView->GetTextEditObject() */)
                 [ +  - ]
     936                 :            :     {
     937                 :        209 :         mbHasOnlineSpellErrors = sal_False;
     938         [ +  - ]:        209 :         ::sd::Outliner* pOutl = GetInternalOutliner(sal_True);
     939         [ +  - ]:        209 :         pOutl->SetUpdateMode(sal_True);
     940         [ +  - ]:        209 :         Link aEvtHdl = pOutl->GetStatusEventHdl();
     941 [ +  - ][ +  - ]:        209 :         pOutl->SetStatusEventHdl(LINK(this, SdDrawDocument, OnlineSpellEventHdl));
     942                 :            : 
     943                 :        209 :         sal_uInt16 nOldOutlMode = pOutl->GetMode();
     944                 :        209 :         sal_uInt16 nOutlMode = OUTLINERMODE_TEXTOBJECT;
     945 [ +  - ][ +  + ]:        418 :         if (((SdrTextObj*) pObj)->GetObjInventor() == SdrInventor &&
         [ +  + ][ +  - ]
     946         [ +  - ]:        209 :             ((SdrTextObj*) pObj)->GetObjIdentifier() == OBJ_OUTLINETEXT)
     947                 :            :         {
     948                 :          3 :             nOutlMode = OUTLINERMODE_OUTLINEOBJECT;
     949                 :            :         }
     950         [ +  - ]:        209 :         pOutl->Init( nOutlMode );
     951                 :            : 
     952                 :            :         // Text in den Outliner setzen
     953 [ +  - ][ +  - ]:        209 :         pOutl->SetText(*((SdrTextObj*) pObj)->GetOutlinerParaObject());
     954                 :            : 
     955 [ -  + ][ #  # ]:        209 :         if (!mpOnlineSearchItem || pOutl->HasText(*mpOnlineSearchItem))
         [ #  # ][ +  - ]
     956                 :            :         {
     957                 :            :             // Spelling
     958         [ +  - ]:        209 :             pOutl->CompleteOnlineSpelling();
     959                 :            : 
     960         [ -  + ]:        209 :             if (mbHasOnlineSpellErrors)
     961                 :            :             {
     962         [ #  # ]:          0 :                 sd::ModifyGuard aGuard( this );
     963         [ #  # ]:          0 :                 SdrModel* pModel = pObj->GetModel();
     964                 :          0 :                 bool bLock = sal_False;
     965         [ #  # ]:          0 :                 if ( pModel )
     966                 :            :                 {
     967                 :          0 :                     bLock = pModel->isLocked();
     968         [ #  # ]:          0 :                     pModel->setLock(true);
     969                 :            :                 }
     970                 :            :                 // taking text from the outliner
     971 [ #  # ][ #  # ]:          0 :                 ((SdrTextObj*) pObj)->SetOutlinerParaObject( pOutl->CreateParaObject() );
     972                 :            : 
     973         [ #  # ]:          0 :                 pObj->BroadcastObjectChange();
     974         [ #  # ]:          0 :                 if ( pModel )
     975 [ #  # ][ #  # ]:          0 :                     pModel->setLock(bLock);
     976                 :            :             }
     977                 :            :         }
     978                 :            : 
     979         [ +  - ]:        209 :         pOutl->SetStatusEventHdl(aEvtHdl);
     980         [ +  - ]:        209 :         pOutl->SetUpdateMode(sal_False);
     981         [ +  - ]:        209 :         pOutl->Init( nOldOutlMode );
     982                 :        209 :         mbHasOnlineSpellErrors = sal_False;
     983                 :            :     }
     984                 :        209 : }
     985                 :            : 
     986                 :            : /*************************************************************************
     987                 :            : |*
     988                 :            : |* Objekt wurde ins Model eingefuegt
     989                 :            : |*
     990                 :            : \************************************************************************/
     991                 :       2427 : void SdDrawDocument::InsertObject(SdrObject* pObj, SdPage* /*pPage*/)
     992                 :            : {
     993 [ +  + ][ +  - ]:       2427 :     if(mpOnlineSpellingList && pObj)
     994                 :            :     {
     995 [ +  - ][ +  + ]:        798 :         if (pObj->GetOutlinerParaObject() || (pObj->GetObjIdentifier() == OBJ_GRUP))
                 [ +  + ]
     996                 :            :         {
     997                 :            :             // Objekt in OnlineSpelling-Liste aufnehmen
     998                 :          1 :             mpOnlineSpellingList->addShape(*pObj);
     999                 :            :         }
    1000                 :            :     }
    1001                 :       2427 : }
    1002                 :            : 
    1003                 :            : /*************************************************************************
    1004                 :            : |*
    1005                 :            : |* Objekt wurde aus dem Model entfernt
    1006                 :            : |*
    1007                 :            : \************************************************************************/
    1008                 :        548 : void SdDrawDocument::RemoveObject(SdrObject* pObj, SdPage* /*pPage*/)
    1009                 :            : {
    1010 [ +  + ][ +  - ]:        548 :     if(mpOnlineSpellingList && pObj)
    1011                 :            :     {
    1012 [ +  + ][ -  + ]:         19 :         if (pObj->GetOutlinerParaObject() || (pObj->GetObjIdentifier() == OBJ_GRUP))
                 [ +  + ]
    1013                 :            :         {
    1014                 :            :             // Objekt in OnlineSpelling-Liste durch NULL-Pointer ersetzt
    1015                 :          4 :             mpOnlineSpellingList->removeShape(*pObj);
    1016                 :            :         }
    1017                 :            :     }
    1018                 :        548 : }
    1019                 :            : 
    1020                 :            : /*************************************************************************
    1021                 :            : |*
    1022                 :            : |* Callback fuer ExecuteSpellPopup()
    1023                 :            : |*
    1024                 :            : \************************************************************************/
    1025                 :        418 : IMPL_LINK(SdDrawDocument, OnlineSpellEventHdl, EditStatus*, pEditStat)
    1026                 :            : {
    1027                 :        418 :     sal_uLong nStat = pEditStat->GetStatusWord();
    1028                 :        418 :     mbHasOnlineSpellErrors = (nStat & EE_STAT_WRONGWORDCHANGED) != 0;
    1029                 :            : 
    1030                 :        418 :     return(0);
    1031                 :            : }
    1032                 :            : 
    1033                 :            : /*************************************************************************
    1034                 :            : |*
    1035                 :            : |* Callback fuer ExecuteSpellPopup()
    1036                 :            : |*
    1037                 :            : \************************************************************************/
    1038                 :            : 
    1039                 :            : // removed link and replaced with Imp method
    1040                 :          0 : void SdDrawDocument::ImpOnlineSpellCallback(SpellCallbackInfo* pInfo, SdrObject* pObj, SdrOutliner* pOutl)
    1041                 :            : {
    1042         [ #  # ]:          0 :     delete mpOnlineSearchItem;
    1043                 :          0 :     mpOnlineSearchItem = NULL;
    1044                 :            : 
    1045                 :          0 :     sal_uInt16 nCommand = pInfo->nCommand;
    1046                 :            : 
    1047 [ #  # ][ #  # ]:          0 :     if (nCommand == SPELLCMD_IGNOREWORD
    1048                 :            :         // restart when add to dictionary takes place, too.
    1049                 :            :         || nCommand == SPELLCMD_ADDTODICTIONARY)
    1050                 :            :     {
    1051 [ #  # ][ #  # ]:          0 :         if(pObj && pOutl && pObj->ISA(SdrTextObj))
         [ #  # ][ #  # ]
    1052                 :            :         {
    1053                 :          0 :             sal_Bool bModified(IsChanged());
    1054                 :          0 :             ((SdrTextObj*)pObj)->SetOutlinerParaObject(pOutl->CreateParaObject());
    1055                 :          0 :             SetChanged(bModified);
    1056                 :          0 :             pObj->BroadcastObjectChange();
    1057                 :            :         }
    1058                 :            : 
    1059         [ #  # ]:          0 :         mpOnlineSearchItem = new SvxSearchItem( SID_SEARCH_ITEM );
    1060                 :          0 :         mpOnlineSearchItem->SetSearchString(pInfo->aWord);
    1061                 :          0 :         StartOnlineSpelling();
    1062                 :            :     }
    1063         [ #  # ]:          0 :     else if (nCommand == SPELLCMD_STARTSPELLDLG)
    1064                 :            :     {
    1065                 :            :         SfxViewFrame::Current()->GetDispatcher()->Execute( SID_SPELL_DIALOG,
    1066                 :          0 :             SFX_CALLMODE_ASYNCHRON );
    1067                 :            :     }
    1068                 :          0 : }
    1069                 :            : 
    1070                 :            : /*************************************************************************
    1071                 :            : |*
    1072                 :            : |* Eindeutige Namen der StandardLayer durch sprachabhaengige Namen ersetzen
    1073                 :            : |*
    1074                 :            : \************************************************************************/
    1075                 :          0 : void SdDrawDocument::RestoreLayerNames()
    1076                 :            : {
    1077                 :          0 :     SdrLayerAdmin& rLayerAdmin = GetLayerAdmin();
    1078                 :          0 :     sal_uInt16 nLayerCount = rLayerAdmin.GetLayerCount();
    1079                 :            : 
    1080         [ #  # ]:          0 :     for (sal_uInt16 nLayer = 0; nLayer < nLayerCount; nLayer++)
    1081                 :            :     {
    1082                 :          0 :         SdrLayer* pLayer = rLayerAdmin.GetLayer(nLayer);
    1083                 :            : 
    1084         [ #  # ]:          0 :         if (pLayer)
    1085                 :            :         {
    1086         [ #  # ]:          0 :             String aLayerName(pLayer->GetName());
    1087                 :            : 
    1088 [ #  # ][ #  # ]:          0 :             if (aLayerName.EqualsAscii( "LAYER_LAYOUT" ))
    1089                 :            :             {
    1090 [ #  # ][ #  # ]:          0 :                 pLayer->SetName(String(SdResId(STR_LAYER_LAYOUT)));
         [ #  # ][ #  # ]
    1091                 :            :             }
    1092 [ #  # ][ #  # ]:          0 :             else if (aLayerName.EqualsAscii( "LAYER_BCKGRND" ))
    1093                 :            :             {
    1094 [ #  # ][ #  # ]:          0 :                 pLayer->SetName(String(SdResId(STR_LAYER_BCKGRND)));
         [ #  # ][ #  # ]
    1095                 :            :             }
    1096 [ #  # ][ #  # ]:          0 :             else if (aLayerName.EqualsAscii( "LAYER_BACKGRNDOBJ" ))
    1097                 :            :             {
    1098 [ #  # ][ #  # ]:          0 :                 pLayer->SetName(String(SdResId(STR_LAYER_BCKGRNDOBJ)));
         [ #  # ][ #  # ]
    1099                 :            :             }
    1100 [ #  # ][ #  # ]:          0 :             else if (aLayerName.EqualsAscii( "LAYER_CONTROLS" ))
    1101                 :            :             {
    1102 [ #  # ][ #  # ]:          0 :                 pLayer->SetName(String(SdResId(STR_LAYER_CONTROLS)));
         [ #  # ][ #  # ]
    1103                 :            :             }
    1104 [ #  # ][ #  # ]:          0 :             else if (aLayerName.EqualsAscii( "LAYER_MEASURELINES" ))
    1105                 :            :             {
    1106 [ #  # ][ #  # ]:          0 :                 pLayer->SetName(String(SdResId(STR_LAYER_MEASURELINES)));
         [ #  # ][ #  # ]
    1107         [ #  # ]:          0 :             }
    1108                 :            :         }
    1109                 :            :     }
    1110                 :          0 : }
    1111                 :            : 
    1112                 :            : /*************************************************************************
    1113                 :            : |*
    1114                 :            : |* Formatierte Seitennummer zurueckgeben (1, I, i, a, usw.)
    1115                 :            : |*
    1116                 :            : \************************************************************************/
    1117                 :            : 
    1118                 :       2239 : String SdDrawDocument::CreatePageNumValue(sal_uInt16 nNum) const
    1119                 :            : {
    1120                 :       2239 :     String aPageNumValue;
    1121                 :       2239 :     sal_Bool bUpper = sal_False;
    1122                 :            : 
    1123   [ -  -  -  -  :       2239 :     switch (mePageNumType)
                   -  + ]
    1124                 :            :     {
    1125                 :            :         case SVX_CHARS_UPPER_LETTER:
    1126         [ #  # ]:          0 :             aPageNumValue += (sal_Unicode)(char)((nNum - 1) % 26 + 'A');
    1127                 :          0 :             break;
    1128                 :            :         case SVX_CHARS_LOWER_LETTER:
    1129         [ #  # ]:          0 :             aPageNumValue += (sal_Unicode)(char)((nNum - 1) % 26 + 'a');
    1130                 :          0 :             break;
    1131                 :            :         case SVX_ROMAN_UPPER:
    1132                 :          0 :             bUpper = sal_True;
    1133                 :            :         case SVX_ROMAN_LOWER:
    1134 [ #  # ][ #  # ]:          0 :             aPageNumValue += SvxNumberFormat::CreateRomanString(nNum, bUpper);
                 [ #  # ]
    1135                 :          0 :             break;
    1136                 :            :         case SVX_NUMBER_NONE:
    1137         [ #  # ]:          0 :             aPageNumValue.Erase();
    1138         [ #  # ]:          0 :             aPageNumValue += sal_Unicode(' ');
    1139                 :          0 :             break;
    1140                 :            :         default:
    1141         [ +  - ]:       2239 :             aPageNumValue += rtl::OUString::valueOf(static_cast<sal_Int32>(nNum));
    1142                 :            :     }
    1143                 :            : 
    1144                 :       2239 :     return(aPageNumValue);
    1145                 :            : }
    1146                 :            : 
    1147                 :            : 
    1148                 :            : 
    1149                 :            : /*************************************************************************
    1150                 :            : |*
    1151                 :            : |* Layout-Template umbenennen
    1152                 :            : |* Zu beachten ist, das rOldLayoutName im Gegensatz zu rNewName den
    1153                 :            : |* kompletten Layout(!)-Namen enthaelt (inkl. ~LT~)!
    1154                 :            : |*
    1155                 :            : \************************************************************************/
    1156                 :            : 
    1157                 :         13 : void SdDrawDocument::RenameLayoutTemplate(const String& rOldLayoutName, const String& rNewName)
    1158                 :            : {
    1159         [ +  - ]:         13 :     String aOldName(rOldLayoutName);
    1160         [ +  - ]:         13 :     sal_uInt16 nPos = aOldName.SearchAscii( SD_LT_SEPARATOR );
    1161                 :            : 
    1162                 :            :     // erase everything after '~LT~'
    1163         [ +  - ]:         13 :     aOldName.Erase(nPos + sizeof(SD_LT_SEPARATOR) - 1 );
    1164                 :         13 :     sal_uInt16 nLen = aOldName.Len();
    1165                 :            : 
    1166         [ +  - ]:         13 :     std::vector<StyleReplaceData> aReplList;
    1167         [ +  - ]:         13 :     SfxStyleSheetIterator aIter(mxStyleSheetPool.get(), SD_STYLE_FAMILY_MASTERPAGE);
    1168         [ +  - ]:         13 :     SfxStyleSheetBase* pSheet = aIter.First();
    1169                 :            : 
    1170         [ +  + ]:        195 :     while (pSheet)
    1171                 :            :     {
    1172 [ +  - ][ +  - ]:        182 :         String aSheetName = pSheet->GetName();
    1173                 :            : 
    1174                 :            :         // if the sheetname starts with aOldName + "~LT~"
    1175 [ +  - ][ +  - ]:        182 :         if (aSheetName.Match(aOldName) == nLen)
    1176                 :            :         {
    1177         [ +  - ]:        182 :             aSheetName.Erase(0, nLen - sizeof(SD_LT_SEPARATOR) + 1 );
    1178         [ +  - ]:        182 :             aSheetName.Insert(rNewName, 0);
    1179                 :            : 
    1180         [ +  - ]:        182 :             StyleReplaceData aReplData;
    1181                 :        182 :             aReplData.nFamily     = pSheet->GetFamily();
    1182                 :        182 :             aReplData.nNewFamily = pSheet->GetFamily();
    1183 [ +  - ][ +  - ]:        182 :             aReplData.aName   = pSheet->GetName();
    1184         [ +  - ]:        182 :             aReplData.aNewName   = aSheetName;
    1185         [ +  - ]:        182 :             aReplList.push_back(aReplData);
    1186                 :            : 
    1187 [ +  - ][ +  - ]:        182 :             pSheet->SetName(aSheetName);
    1188                 :            :         }
    1189                 :            : 
    1190         [ +  - ]:        182 :         pSheet = aIter.Next();
    1191         [ +  - ]:        182 :     }
    1192                 :            : 
    1193                 :            :     // jetzt noch den Layoutnamen der Zeichen- und der Notizseite
    1194                 :            :     // sowie ihrer Masterpages setzen
    1195         [ +  - ]:         13 :     String aPageLayoutName(rNewName);
    1196         [ +  - ]:         13 :     aPageLayoutName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( SD_LT_SEPARATOR ));
    1197 [ +  - ][ +  - ]:         13 :     aPageLayoutName += String(SdResId(STR_LAYOUT_OUTLINE));
         [ +  - ][ +  - ]
    1198                 :            : 
    1199                 :            :     // an allen Seiten, die das jetzt umbeannte Layout benutzen, die
    1200                 :            :     // Textobjekte von der Aenderung unterrichten und Layoutnamen setzen
    1201                 :            :     sal_uInt16 nPage;
    1202 [ +  - ][ +  + ]:         52 :     for (nPage = 0; nPage < GetPageCount(); nPage++)
    1203                 :            :     {
    1204         [ +  - ]:         39 :         SdPage* pPage = (SdPage*) GetPage(nPage);
    1205         [ +  - ]:         39 :         String aTemp(pPage->GetLayoutName());
    1206                 :            : 
    1207 [ +  - ][ +  - ]:         39 :         if (aTemp == rOldLayoutName)
    1208                 :            :         {
    1209 [ +  - ][ +  - ]:         39 :             pPage->SetLayoutName(aPageLayoutName);
                 [ +  - ]
    1210                 :            : 
    1211 [ +  - ][ +  + ]:         83 :             for (sal_uLong nObj = 0; nObj < pPage->GetObjCount(); nObj++)
    1212                 :            :             {
    1213         [ +  - ]:         44 :                 SdrObject* pObj = pPage->GetObj(nObj);
    1214                 :            : 
    1215 [ +  - ][ +  - ]:         44 :                 if (pObj->GetObjInventor() == SdrInventor)
    1216                 :            :                 {
    1217 [ +  - ][ +  + ]:         44 :                     switch( pObj->GetObjIdentifier() )
    1218                 :            :                     {
    1219                 :            :                         case OBJ_TEXT:
    1220                 :            :                         case OBJ_OUTLINETEXT:
    1221                 :            :                         case OBJ_TITLETEXT:
    1222                 :            :                         {
    1223         [ +  - ]:         31 :                             OutlinerParaObject* pOPO = ((SdrTextObj*) pObj)->GetOutlinerParaObject();
    1224                 :            : 
    1225         [ +  - ]:         31 :                             if (pOPO)
    1226                 :            :                             {
    1227                 :         31 :                                 std::vector<StyleReplaceData>::iterator it;
    1228 [ +  - ][ +  + ]:        465 :                                 for (it = aReplList.begin(); it != aReplList.end(); ++it)
    1229         [ +  - ]:        434 :                                     pOPO->ChangeStyleSheets( it->aName, it->nFamily, it->aNewName, it->nNewFamily );
    1230                 :            :                             }
    1231                 :            :                         }
    1232                 :         31 :                         break;
    1233                 :            : 
    1234                 :            :                         default:
    1235                 :         44 :                         break;
    1236                 :            :                     }
    1237                 :            :                 }
    1238                 :            :             }
    1239                 :            :         }
    1240         [ +  - ]:         39 :     }
    1241                 :            : 
    1242                 :            :     // und nochmal fuer die Masterpages
    1243                 :            :     // die betroffenen Masterpages erhalten als Seitennamen den Namen
    1244                 :            :     // des Layouts
    1245 [ +  - ][ +  + ]:         52 :     for (nPage = 0; nPage < GetMasterPageCount(); nPage++)
    1246                 :            :     {
    1247         [ +  - ]:         39 :         SdPage* pPage = (SdPage*) GetMasterPage(nPage);
    1248         [ +  - ]:         39 :         String aTemp(pPage->GetLayoutName());
    1249                 :            : 
    1250 [ +  - ][ +  - ]:         39 :         if (aTemp == rOldLayoutName)
    1251                 :            :         {
    1252 [ +  - ][ +  - ]:         39 :             pPage->SetLayoutName(aPageLayoutName);
                 [ +  - ]
    1253         [ +  - ]:         39 :             pPage->SetName(rNewName);
    1254                 :            : 
    1255 [ +  - ][ +  + ]:        255 :             for (sal_uLong nObj = 0; nObj < pPage->GetObjCount(); nObj++)
    1256                 :            :             {
    1257         [ +  - ]:        216 :                 SdrObject* pObj = pPage->GetObj(nObj);
    1258                 :            : 
    1259 [ +  - ][ +  - ]:        216 :                 if (pObj->GetObjInventor() == SdrInventor)
    1260                 :            :                 {
    1261 [ +  - ][ +  + ]:        216 :                     switch(pObj->GetObjIdentifier())
    1262                 :            :                     {
    1263                 :            :                         case OBJ_TEXT:
    1264                 :            :                         case OBJ_OUTLINETEXT:
    1265                 :            :                         case OBJ_TITLETEXT:
    1266                 :            :                         {
    1267         [ +  - ]:         90 :                             OutlinerParaObject* pOPO = ((SdrTextObj*)pObj)->GetOutlinerParaObject();
    1268                 :            : 
    1269         [ +  - ]:         90 :                             if (pOPO)
    1270                 :            :                             {
    1271                 :         90 :                                 std::vector<StyleReplaceData>::iterator it;
    1272 [ +  - ][ +  + ]:       1350 :                                 for (it = aReplList.begin(); it != aReplList.end(); ++it)
    1273         [ +  - ]:       1260 :                                     pOPO->ChangeStyleSheets( it->aName, it->nFamily, it->aNewName, it->nNewFamily );
    1274                 :            :                             }
    1275                 :            :                         }
    1276                 :         90 :                         break;
    1277                 :            : 
    1278                 :            :                         default:
    1279                 :        216 :                         break;
    1280                 :            :                     }
    1281                 :            :                 }
    1282                 :            :             }
    1283                 :            :         }
    1284 [ +  - ][ +  - ]:         52 :     }
         [ +  - ][ +  - ]
    1285                 :         13 : }
    1286                 :            : 
    1287                 :            : /*************************************************************************
    1288                 :            : |*
    1289                 :            : |* Outliner-Defaults setzen (Pool-Defaults)
    1290                 :            : |*
    1291                 :            : \************************************************************************/
    1292                 :        178 : void SdDrawDocument::SetTextDefaults() const
    1293                 :            : {
    1294                 :            :     // BulletItem und BulletFont fuer Titel und Gliederung
    1295         [ +  - ]:        178 :     SvxBulletItem aBulletItem(EE_PARA_BULLET);
    1296         [ +  - ]:        178 :     Font aBulletFont( static_cast<SdStyleSheetPool*>( mxStyleSheetPool.get())->GetBulletFont() );
    1297         [ +  - ]:        178 :     aBulletFont.SetSize(Size(0,846));       // 24 pt
    1298         [ +  - ]:        178 :     aBulletItem.SetFont(aBulletFont);
    1299                 :        178 :     aBulletItem.SetStyle(BS_BULLET);
    1300                 :        178 :     aBulletItem.SetStart(1);
    1301                 :        178 :     aBulletItem.SetScale(45);               // in Prozent
    1302                 :        178 :     aBulletItem.SetSymbol( 0x25CF );                // Punkt
    1303         [ +  - ]:        178 :     pItemPool->SetPoolDefaultItem( aBulletItem );
    1304                 :            : 
    1305                 :            :     // Neues BulletItem
    1306         [ +  - ]:        178 :     SvxNumberFormat aNumberFormat(SVX_NUM_CHAR_SPECIAL);
    1307         [ +  - ]:        178 :     aNumberFormat.SetBulletFont(&aBulletFont);
    1308                 :        178 :     aNumberFormat.SetBulletChar( 0x25CF );  // StarBats: 0xF000 + 34
    1309                 :        178 :     aNumberFormat.SetBulletRelSize(45);
    1310                 :        178 :     aNumberFormat.SetBulletColor(Color(COL_AUTO));
    1311                 :        178 :     aNumberFormat.SetStart(1);
    1312                 :        178 :     aNumberFormat.SetNumAdjust(SVX_ADJUST_LEFT);
    1313                 :            : 
    1314         [ +  - ]:        178 :     SvxNumRule aNumRule( NUM_BULLET_REL_SIZE|NUM_BULLET_COLOR|NUM_CHAR_TEXT_DISTANCE, 10, sal_False);
    1315                 :            : 
    1316                 :        178 :     aNumberFormat.SetLSpace( 0 );
    1317                 :        178 :     aNumberFormat.SetAbsLSpace( 0 );
    1318                 :        178 :     aNumberFormat.SetFirstLineOffset( 0 );
    1319         [ +  - ]:        178 :     aNumRule.SetLevel( 0, aNumberFormat );
    1320                 :            : 
    1321         [ +  + ]:       1780 :     for( sal_uInt16 i = 1; i < aNumRule.GetLevelCount(); i++ )
    1322                 :            :     {
    1323                 :       1602 :         const short nLSpace = (i + 1) * 600;
    1324                 :       1602 :         aNumberFormat.SetLSpace(nLSpace);
    1325                 :       1602 :         aNumberFormat.SetAbsLSpace(nLSpace);
    1326                 :       1602 :         aNumberFormat.SetFirstLineOffset(-600);
    1327         [ +  - ]:       1602 :         aNumRule.SetLevel( i, aNumberFormat );
    1328                 :            :     }
    1329                 :            : 
    1330         [ +  - ]:        178 :     SvxNumBulletItem aNumBulletItem( aNumRule, EE_PARA_NUMBULLET );
    1331 [ +  - ][ +  - ]:        178 :     pItemPool->SetPoolDefaultItem( aNumBulletItem );
         [ +  - ][ +  - ]
         [ +  - ][ +  - ]
    1332                 :        178 : }
    1333                 :            : 
    1334                 :        444 : ::com::sun::star::text::WritingMode SdDrawDocument::GetDefaultWritingMode() const
    1335                 :            : {
    1336         [ +  - ]:        444 :     const SfxPoolItem*                  pItem = ( pItemPool ? pItemPool->GetPoolDefaultItem( EE_PARA_WRITINGDIR ) : NULL );
    1337                 :        444 :     ::com::sun::star::text::WritingMode eRet = ::com::sun::star::text::WritingMode_LR_TB;
    1338                 :            : 
    1339         [ +  + ]:        444 :     if( pItem )
    1340                 :            :     {
    1341   [ +  -  -  - ]:         52 :         switch( ( (SvxFrameDirectionItem&)( *pItem ) ).GetValue() )
    1342                 :            :         {
    1343                 :         52 :             case( FRMDIR_HORI_LEFT_TOP ): eRet = ::com::sun::star::text::WritingMode_LR_TB; break;
    1344                 :          0 :             case( FRMDIR_HORI_RIGHT_TOP ): eRet = ::com::sun::star::text::WritingMode_RL_TB; break;
    1345                 :          0 :             case( FRMDIR_VERT_TOP_RIGHT ): eRet = ::com::sun::star::text::WritingMode_TB_RL; break;
    1346                 :            : 
    1347                 :            :             default:
    1348                 :            :                 OSL_FAIL( "Frame direction not supported yet" );
    1349                 :         52 :             break;
    1350                 :            :         }
    1351                 :            :     }
    1352                 :            : 
    1353                 :        444 :     return eRet;
    1354                 :            : }
    1355                 :            : 
    1356                 :          0 : void SdDrawDocument::SetDefaultWritingMode(::com::sun::star::text::WritingMode eMode )
    1357                 :            : {
    1358         [ #  # ]:          0 :     if( pItemPool )
    1359                 :            :     {
    1360                 :            :         SvxFrameDirection nVal;
    1361   [ #  #  #  # ]:          0 :         switch( eMode )
    1362                 :            :         {
    1363                 :          0 :         case ::com::sun::star::text::WritingMode_LR_TB: nVal = FRMDIR_HORI_LEFT_TOP; break;
    1364                 :          0 :         case ::com::sun::star::text::WritingMode_RL_TB: nVal = FRMDIR_HORI_RIGHT_TOP; break;
    1365                 :          0 :         case ::com::sun::star::text::WritingMode_TB_RL: nVal = FRMDIR_VERT_TOP_RIGHT; break;
    1366                 :            :         default:
    1367                 :            :             OSL_FAIL( "Frame direction not supported yet" );
    1368                 :          0 :             return;
    1369                 :            :         }
    1370                 :            : 
    1371         [ #  # ]:          0 :         SvxFrameDirectionItem aModeItem( nVal, EE_PARA_WRITINGDIR );
    1372         [ #  # ]:          0 :         pItemPool->SetPoolDefaultItem( aModeItem );
    1373                 :            : 
    1374         [ #  # ]:          0 :         SvxAdjustItem aAdjust( SVX_ADJUST_LEFT, EE_PARA_JUST );
    1375                 :            : 
    1376         [ #  # ]:          0 :         if( eMode == ::com::sun::star::text::WritingMode_RL_TB )
    1377         [ #  # ]:          0 :             aAdjust.SetEnumValue( SVX_ADJUST_RIGHT );
    1378                 :            : 
    1379 [ #  # ][ #  # ]:          0 :         pItemPool->SetPoolDefaultItem( aAdjust );
                 [ #  # ]
    1380                 :            : 
    1381                 :            : 
    1382                 :            :     }
    1383                 :            : }
    1384                 :            : 
    1385                 :        479 : void SdDrawDocument::getDefaultFonts( Font& rLatinFont, Font& rCJKFont, Font& rCTLFont )
    1386                 :            : {
    1387                 :        479 :     LanguageType eLatin = GetLanguage( EE_CHAR_LANGUAGE );
    1388                 :            : 
    1389                 :            :     //  If the UI language is Korean, the default Latin font has to
    1390                 :            :     //  be queried for Korean, too (the Latin language from the document can't be Korean).
    1391                 :            :     //  This is the same logic as in SwDocShell::InitNew.
    1392                 :        479 :     LanguageType eUiLanguage = Application::GetSettings().GetUILanguage();
    1393         [ -  + ]:        479 :     if (MsLangId::isKorean(eUiLanguage))
    1394                 :          0 :         eLatin = eUiLanguage;
    1395                 :            : 
    1396         [ +  - ]:        479 :     rLatinFont = OutputDevice::GetDefaultFont( DEFAULTFONT_LATIN_PRESENTATION, eLatin, DEFAULTFONT_FLAGS_ONLYONE );
    1397         [ +  - ]:        479 :     rCJKFont = OutputDevice::GetDefaultFont( DEFAULTFONT_CJK_PRESENTATION, GetLanguage( EE_CHAR_LANGUAGE_CJK ), DEFAULTFONT_FLAGS_ONLYONE );
    1398         [ +  - ]:        479 :     rCTLFont = OutputDevice::GetDefaultFont( DEFAULTFONT_CTL_PRESENTATION, GetLanguage( EE_CHAR_LANGUAGE_CTL ), DEFAULTFONT_FLAGS_ONLYONE ) ;
    1399                 :        479 : }
    1400                 :            : 
    1401                 :            : /* converts the given western font height to a corresponding ctl font height, deppending on the system language */
    1402                 :       2294 : sal_uInt32 SdDrawDocument::convertFontHeightToCTL( sal_uInt32 nWesternFontHeight )
    1403                 :            : {
    1404                 :       2294 :     LanguageType eRealCTLLanguage = Application::GetSettings().GetLanguage();
    1405         [ -  + ]:       2294 :     if( LANGUAGE_THAI == eRealCTLLanguage )
    1406                 :            :     {
    1407                 :            :         // http://specs.openoffice.org/g11n/font_sizes/42775_42725_Individual_configurable_font_size_for_default_fonts.odt
    1408                 :          0 :         double fTemp = double(nWesternFontHeight) * 1.333;
    1409                 :          0 :         nWesternFontHeight = (sal_uInt32)fTemp;
    1410                 :            :         // make some nice values for UI that displays PT instead of 1/100th mm
    1411                 :          0 :         nWesternFontHeight = ((nWesternFontHeight * 72) + 1270) / 2540L;
    1412                 :          0 :         nWesternFontHeight = ((nWesternFontHeight * 2540L) + 36) / 72;
    1413                 :            :     }
    1414                 :       2294 :     return nWesternFontHeight;
    1415                 :            : }
    1416                 :            : 
    1417                 :         15 : SdStyleSheetPool* SdDrawDocument::GetSdStyleSheetPool() const
    1418                 :            : {
    1419         [ +  - ]:         15 :     return dynamic_cast< SdStyleSheetPool* >( GetStyleSheetPool() );
    1420                 :            : }
    1421                 :            : 
    1422                 :       1508 : ModifyGuard::ModifyGuard( SdDrawDocument* pDoc )
    1423                 :       1508 : : mpDocShell( 0 ), mpDoc( pDoc )
    1424                 :            : {
    1425                 :       1508 :     init();
    1426                 :       1508 : }
    1427                 :            : 
    1428                 :       1508 : void ModifyGuard::init()
    1429                 :            : {
    1430         [ -  + ]:       1508 :     if( mpDocShell )
    1431                 :            :     {
    1432                 :          0 :         mpDoc = mpDocShell->GetDoc();
    1433                 :            :     }
    1434         [ +  - ]:       1508 :     else if( mpDoc )
    1435                 :            :     {
    1436                 :       1508 :         mpDocShell = mpDoc->GetDocSh();
    1437                 :            :     }
    1438                 :            : 
    1439         [ +  - ]:       1508 :     mbIsEnableSetModified = mpDocShell ? mpDocShell->IsEnableSetModified() : sal_False;
    1440         [ +  - ]:       1508 :     mbIsDocumentChanged = mpDoc ? mpDoc->IsChanged() : sal_False;
    1441                 :            : 
    1442         [ +  + ]:       1508 :     if( mbIsEnableSetModified )
    1443                 :        739 :         mpDocShell->EnableSetModified( sal_False );
    1444                 :       1508 : }
    1445                 :            : 
    1446                 :       1508 : ModifyGuard::~ModifyGuard()
    1447                 :            : {
    1448         [ +  + ]:       1508 :     if( mbIsEnableSetModified )
    1449                 :        739 :         mpDocShell->EnableSetModified( sal_True );
    1450                 :            : 
    1451 [ +  - ][ -  + ]:       1508 :     if( mpDoc && (mpDoc->IsChanged() != mbIsDocumentChanged) )
                 [ -  + ]
    1452                 :          0 :         mpDoc->SetChanged(mbIsDocumentChanged);
    1453                 :       1508 : }
    1454                 :            : 
    1455                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10