1*859212d1SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*859212d1SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*859212d1SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*859212d1SAndrew Rist * distributed with this work for additional information 6*859212d1SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*859212d1SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*859212d1SAndrew Rist * "License"); you may not use this file except in compliance 9*859212d1SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*859212d1SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*859212d1SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*859212d1SAndrew Rist * software distributed under the License is distributed on an 15*859212d1SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*859212d1SAndrew Rist * KIND, either express or implied. See the License for the 17*859212d1SAndrew Rist * specific language governing permissions and limitations 18*859212d1SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*859212d1SAndrew Rist *************************************************************/ 21*859212d1SAndrew Rist 22*859212d1SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #include "ids.hrc" 25cdf0e10cSrcweir #include "alreadyopen.hxx" 26cdf0e10cSrcweir 27cdf0e10cSrcweir AlreadyOpenQueryBox::AlreadyOpenQueryBox( Window* pParent, ResMgr* pResMgr, const String& aMessage, sal_Bool bIsStoring ) : 28cdf0e10cSrcweir MessBox(pParent, 0, 29cdf0e10cSrcweir String( ResId( STR_ALREADYOPEN_TITLE, *pResMgr ) ), 30cdf0e10cSrcweir aMessage ) 31cdf0e10cSrcweir { 32cdf0e10cSrcweir SetImage( QueryBox::GetStandardImage() ); 33cdf0e10cSrcweir 34cdf0e10cSrcweir if ( bIsStoring ) 35cdf0e10cSrcweir { 36cdf0e10cSrcweir AddButton( String( ResId( STR_ALREADYOPEN_RETRY_SAVE_BTN, *pResMgr ) ), RET_YES, 37cdf0e10cSrcweir BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON ); 38cdf0e10cSrcweir AddButton( String( ResId( STR_ALREADYOPEN_SAVE_BTN, *pResMgr ) ), RET_NO, 0 ); 39cdf0e10cSrcweir AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON ); 40cdf0e10cSrcweir } 41cdf0e10cSrcweir else 42cdf0e10cSrcweir { 43cdf0e10cSrcweir AddButton( String( ResId( STR_ALREADYOPEN_READONLY_BTN, *pResMgr ) ), RET_YES, 44cdf0e10cSrcweir BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON ); 45cdf0e10cSrcweir AddButton( String( ResId( STR_ALREADYOPEN_OPEN_BTN, *pResMgr ) ), RET_NO, 0 ); 46cdf0e10cSrcweir AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON ); 47cdf0e10cSrcweir } 48cdf0e10cSrcweir 49cdf0e10cSrcweir SetButtonHelpText( RET_YES, String::EmptyString() ); 50cdf0e10cSrcweir SetButtonHelpText( RET_NO, String::EmptyString() ); 51cdf0e10cSrcweir } 52cdf0e10cSrcweir 53cdf0e10cSrcweir AlreadyOpenQueryBox::~AlreadyOpenQueryBox() 54cdf0e10cSrcweir { 55cdf0e10cSrcweir } 56cdf0e10cSrcweir 57