unotools.cxx (efeef26f) unotools.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

--- 418 unchanged lines hidden (view full) ---

427
428 uno::Reference< view::XViewSettingsSupplier > xSettings(_xController, uno::UNO_QUERY);
429 uno::Reference< beans::XPropertySet > xViewProps = xSettings->getViewSettings();
430
431 uno::Any aZoom = xViewProps->getPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_VALUE)));
432 sal_Int16 nZoom = 0;
433 aZoom >>= nZoom;
434
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

--- 418 unchanged lines hidden (view full) ---

427
428 uno::Reference< view::XViewSettingsSupplier > xSettings(_xController, uno::UNO_QUERY);
429 uno::Reference< beans::XPropertySet > xViewProps = xSettings->getViewSettings();
430
431 uno::Any aZoom = xViewProps->getPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_VALUE)));
432 sal_Int16 nZoom = 0;
433 aZoom >>= nZoom;
434
435 for(sal_uInt16 i = 0; i < 5; i++ )
435 for (sal_uInt16 i = 0;
436 i < (sizeof(nZoomValues)/sizeof(nZoomValues[0])); ++i)
436 {
437 String sTemp;
438 sTemp = String::CreateFromInt32(nZoomValues[i]);
439 sTemp += String::CreateFromAscii(" %");
440 aSubPop1.InsertItem( ITEM_ZOOM + i + 1, sTemp);
441 if(nZoom == nZoomValues[i])
442 aSubPop1.CheckItem(ITEM_ZOOM + i + 1);
443 }

--- 4 unchanged lines hidden (view full) ---

448
449}
450/* -----------------------------15.12.99 11:09--------------------------------
451
452 ---------------------------------------------------------------------------*/
453IMPL_LINK(SwOneExampleFrame, PopupHdl, Menu*, pMenu )
454{
455 sal_uInt16 nId = pMenu->GetCurItemId();
437 {
438 String sTemp;
439 sTemp = String::CreateFromInt32(nZoomValues[i]);
440 sTemp += String::CreateFromAscii(" %");
441 aSubPop1.InsertItem( ITEM_ZOOM + i + 1, sTemp);
442 if(nZoom == nZoomValues[i])
443 aSubPop1.CheckItem(ITEM_ZOOM + i + 1);
444 }

--- 4 unchanged lines hidden (view full) ---

449
450}
451/* -----------------------------15.12.99 11:09--------------------------------
452
453 ---------------------------------------------------------------------------*/
454IMPL_LINK(SwOneExampleFrame, PopupHdl, Menu*, pMenu )
455{
456 sal_uInt16 nId = pMenu->GetCurItemId();
456 if( nId > ITEM_ZOOM && nId < ITEM_ZOOM + 100 )
457 if ((nId > ITEM_ZOOM) &&
458 (nId <= (ITEM_ZOOM + (sizeof(nZoomValues)/sizeof(nZoomValues[0])))))
457 {
458 sal_Int16 nZoom = nZoomValues[nId - ITEM_ZOOM - 1];
459 uno::Reference< view::XViewSettingsSupplier > xSettings(_xController, uno::UNO_QUERY);
460 uno::Reference< beans::XPropertySet > xViewProps = xSettings->getViewSettings();
461
462 uno::Any aZoom;
463 aZoom <<= nZoom;
464 xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_VALUE)), aZoom);

--- 54 unchanged lines hidden ---
459 {
460 sal_Int16 nZoom = nZoomValues[nId - ITEM_ZOOM - 1];
461 uno::Reference< view::XViewSettingsSupplier > xSettings(_xController, uno::UNO_QUERY);
462 uno::Reference< beans::XPropertySet > xViewProps = xSettings->getViewSettings();
463
464 uno::Any aZoom;
465 aZoom <<= nZoom;
466 xViewProps->setPropertyValue(C2U(SW_PROP_NAME_STR(UNO_NAME_ZOOM_VALUE)), aZoom);

--- 54 unchanged lines hidden ---