docsh.cxx (efeef26f) | docsh.cxx (205b6fc7) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 1256 unchanged lines hidden (view full) --- 1265 // <-- 1266 aRet = GetView()->GetController(); 1267 return aRet; 1268} 1269 1270/* -----------------------------12.02.01 12:08-------------------------------- 1271 1272 ---------------------------------------------------------------------------*/ | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 1256 unchanged lines hidden (view full) --- 1265 // <-- 1266 aRet = GetView()->GetController(); 1267 return aRet; 1268} 1269 1270/* -----------------------------12.02.01 12:08-------------------------------- 1271 1272 ---------------------------------------------------------------------------*/ |
1273static const char* pEventNames[] = | 1273static const char* s_EventNames[] = |
1274{ 1275 "OnPageCountChange", 1276 "OnMailMerge", 1277 "OnMailMergeFinished", 1278 "OnFieldMerge", 1279 "OnFieldMergeFinished", 1280 "OnLayoutFinished" 1281}; | 1274{ 1275 "OnPageCountChange", 1276 "OnMailMerge", 1277 "OnMailMergeFinished", 1278 "OnFieldMerge", 1279 "OnFieldMergeFinished", 1280 "OnLayoutFinished" 1281}; |
1282static sal_Int32 const s_nEvents(sizeof(s_EventNames)/sizeof(s_EventNames[0])); |
|
1282 1283Sequence< OUString > SwDocShell::GetEventNames() 1284{ 1285 Sequence< OUString > aRet = SfxObjectShell::GetEventNames(); 1286 sal_Int32 nLen = aRet.getLength(); 1287 aRet.realloc(nLen + 6); 1288 OUString* pNames = aRet.getArray(); 1289 pNames[nLen++] = GetEventName(0); 1290 pNames[nLen++] = GetEventName(1); 1291 pNames[nLen++] = GetEventName(2); 1292 pNames[nLen++] = GetEventName(3); 1293 pNames[nLen++] = GetEventName(4); 1294 pNames[nLen] = GetEventName(5); 1295 1296 return aRet; 1297} 1298 | 1283 1284Sequence< OUString > SwDocShell::GetEventNames() 1285{ 1286 Sequence< OUString > aRet = SfxObjectShell::GetEventNames(); 1287 sal_Int32 nLen = aRet.getLength(); 1288 aRet.realloc(nLen + 6); 1289 OUString* pNames = aRet.getArray(); 1290 pNames[nLen++] = GetEventName(0); 1291 pNames[nLen++] = GetEventName(1); 1292 pNames[nLen++] = GetEventName(2); 1293 pNames[nLen++] = GetEventName(3); 1294 pNames[nLen++] = GetEventName(4); 1295 pNames[nLen] = GetEventName(5); 1296 1297 return aRet; 1298} 1299 |
1299static sal_Int32 nEvents=13; 1300 | |
1301rtl::OUString SwDocShell::GetEventName( sal_Int32 nIndex ) 1302{ | 1300rtl::OUString SwDocShell::GetEventName( sal_Int32 nIndex ) 1301{ |
1303 if ( nIndex<nEvents ) 1304 return ::rtl::OUString::createFromAscii(pEventNames[nIndex]); | 1302 if (nIndex < s_nEvents) 1303 { 1304 return ::rtl::OUString::createFromAscii(s_EventNames[nIndex]); 1305 } |
1305 return rtl::OUString(); 1306} 1307 1308const ::sfx2::IXmlIdRegistry* SwDocShell::GetXmlIdRegistry() const 1309{ 1310 return pDoc ? &pDoc->GetXmlIdRegistry() : 0; 1311} 1312 --- 75 unchanged lines hidden --- | 1306 return rtl::OUString(); 1307} 1308 1309const ::sfx2::IXmlIdRegistry* SwDocShell::GetXmlIdRegistry() const 1310{ 1311 return pDoc ? &pDoc->GetXmlIdRegistry() : 0; 1312} 1313 --- 75 unchanged lines hidden --- |