/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
// #FIXME - seems suspect should we not walk through the properties // to find the FilterName if ( aArgs[0].Name == "FilterName" ) {
aArgs[0].Value >>= aFilterName;
} else {
aArgs[1].Value >>= aFilterName;
}
if (aFilterName == SC_TEXT_CSV_FILTER_NAME) {
aFileFormat = excel::XlFileFormat::xlCSV; //xlFileFormat.
}
void SAL_CALL
ScVbaWorkbook::SaveAs( const uno::Any& FileName, const uno::Any& FileFormat, const uno::Any& /*Password*/, const uno::Any& /*WriteResPassword*/, const uno::Any& /*ReadOnlyRecommended*/, const uno::Any& /*CreateBackup*/, const uno::Any& /*AccessMode*/, const uno::Any& /*ConflictResolution*/, const uno::Any& /*AddToMru*/, const uno::Any& /*TextCodepage*/, const uno::Any& /*TextVisualLayout*/, const uno::Any& /*Local*/ )
{
OUString sFileName;
FileName >>= sFileName;
OUString sURL;
osl::FileBase::getFileURLFromSystemPath( sFileName, sURL ); // detect if there is no path then we need // to use the current folder
INetURLObject aURL( sURL );
sURL = aURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ); if( sURL.isEmpty() )
{ // need to add cur dir ( of this workbook ) or else the 'Work' dir
sURL = getModel()->getURL();
if ( sURL.isEmpty() )
{ // not path available from 'this' document // need to add the 'document'/work directory then
uno::Reference< excel::XApplication > xApplication ( Application(),uno::UNO_QUERY_THROW );
OUString sWorkPath = xApplication->getDefaultFilePath();
OUString sWorkURL;
osl::FileBase::getFileURLFromSystemPath( sWorkPath, sWorkURL );
aURL.SetURL( sWorkURL );
} else
{
aURL.SetURL( sURL );
aURL.Append( sFileName );
}
sURL = aURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
excel::ExportAsFixedFormatHelper(xModel, xApplication, Type, FileName, Quality,
IncludeDocProperties, From, To, OpenAfterPublish);
}
css::uno::Any SAL_CALL
ScVbaWorkbook::Styles( const uno::Any& Item )
{ // quick look and Styles object doesn't seem to have a valid parent // or a least the object browser just shows an object that has no // variables ( therefore... leave as NULL for now )
uno::Reference< XCollection > dStyles = new ScVbaStyles( uno::Reference< XHelperInterface >(), mxContext, getModel() ); if ( Item.hasValue() ) return dStyles->Item( Item, uno::Any() ); return uno::Any( dStyles );
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.