salprn.cxx (cd426cce) | salprn.cxx (8a718ffc) |
---|---|
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 --- 393 unchanged lines hidden (view full) --- 402 403void AquaSalInfoPrinter::GetPageInfo( const ImplJobSetup*, 404 long& o_rOutWidth, long& o_rOutHeight, 405 long& o_rPageOffX, long& o_rPageOffY, 406 long& o_rPageWidth, long& o_rPageHeight ) 407{ 408 if( mpPrintInfo ) 409 { | 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 --- 393 unchanged lines hidden (view full) --- 402 403void AquaSalInfoPrinter::GetPageInfo( const ImplJobSetup*, 404 long& o_rOutWidth, long& o_rOutHeight, 405 long& o_rPageOffX, long& o_rPageOffY, 406 long& o_rPageWidth, long& o_rPageHeight ) 407{ 408 if( mpPrintInfo ) 409 { |
410 long nDPIX = 72, nDPIY = 72; | 410 sal_Int32 nDPIX = 72, nDPIY = 72; |
411 mpGraphics->GetResolution( nDPIX, nDPIY ); 412 const double fXScaling = static_cast<double>(nDPIX)/72.0, 413 fYScaling = static_cast<double>(nDPIY)/72.0; 414 415 NSSize aPaperSize = [mpPrintInfo paperSize]; 416 o_rPageWidth = static_cast<long>( double(aPaperSize.width) * fXScaling ); 417 o_rPageHeight = static_cast<long>( double(aPaperSize.height) * fYScaling ); 418 --- 404 unchanged lines hidden --- | 411 mpGraphics->GetResolution( nDPIX, nDPIY ); 412 const double fXScaling = static_cast<double>(nDPIX)/72.0, 413 fYScaling = static_cast<double>(nDPIY)/72.0; 414 415 NSSize aPaperSize = [mpPrintInfo paperSize]; 416 o_rPageWidth = static_cast<long>( double(aPaperSize.width) * fXScaling ); 417 o_rPageHeight = static_cast<long>( double(aPaperSize.height) * fYScaling ); 418 --- 404 unchanged lines hidden --- |