OfficeFilePicker.cxx (07a3d7f1) OfficeFilePicker.cxx (1aa1f6e5)
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

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

166
167//------------------------------------------------------------------------------------
168void SvtFilePicker::prepareExecute()
169{
170 // set the default directory
171 // --**-- doesn't match the spec yet
172 if ( m_aDisplayDirectory.getLength() > 0 || m_aDefaultName.getLength() > 0 )
173 {
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

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

166
167//------------------------------------------------------------------------------------
168void SvtFilePicker::prepareExecute()
169{
170 // set the default directory
171 // --**-- doesn't match the spec yet
172 if ( m_aDisplayDirectory.getLength() > 0 || m_aDefaultName.getLength() > 0 )
173 {
174 sal_Bool isFileSet = sal_False;
174 if ( m_aDisplayDirectory.getLength() > 0 )
175 {
176
175 if ( m_aDisplayDirectory.getLength() > 0 )
176 {
177
177 INetURLObject aPath( m_aDisplayDirectory );
178 INetURLObject aPath;
179 INetURLObject givenPath( m_aDisplayDirectory );
180 if (!givenPath.HasError())
181 aPath = givenPath;
182 else
183 {
184 INetURLObject aStdDirObj( SvtPathOptions().GetWorkPath() );
185 aPath = aStdDirObj;
186 }
178 if ( m_aDefaultName.getLength() > 0 )
179 {
180 aPath.insertName( m_aDefaultName );
181 getDialog()->SetHasFilename( true );
182 }
183 String sPath = aPath.GetMainURL( INetURLObject::NO_DECODE );
187 if ( m_aDefaultName.getLength() > 0 )
188 {
189 aPath.insertName( m_aDefaultName );
190 getDialog()->SetHasFilename( true );
191 }
192 String sPath = aPath.GetMainURL( INetURLObject::NO_DECODE );
184 getDialog()->SetPath( aPath.GetMainURL( INetURLObject::NO_DECODE ) );
193 getDialog()->SetPath( sPath );
194 isFileSet = sal_True;
185 }
195 }
186 else if ( m_aDefaultName.getLength() > 0 )
196 if ( !isFileSet && m_aDefaultName.getLength() > 0 )
187 {
188 getDialog()->SetPath( m_aDefaultName );
189 getDialog()->SetHasFilename( true );
190 }
191 }
192 else
193 {
194 // Default-Standard-Dir setzen

--- 988 unchanged lines hidden ---
197 {
198 getDialog()->SetPath( m_aDefaultName );
199 getDialog()->SetHasFilename( true );
200 }
201 }
202 else
203 {
204 // Default-Standard-Dir setzen

--- 988 unchanged lines hidden ---